File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package interpreter
33import (
44 "fmt"
55 "math/big"
6+
7+ "github.com/formancehq/numscript/internal/utils"
68)
79
810type VirtualAccount struct {
@@ -34,14 +36,14 @@ func NewVirtualAccount() VirtualAccount {
3436}
3537
3638func (vacc * VirtualAccount ) getCredits (asset string ) * fundsStack {
37- return defaultMapGet (vacc .credits , asset , func () * fundsStack {
39+ return utils . MapGetOrPutDefault (vacc .credits , asset , func () * fundsStack {
3840 fs := newFundsStack (nil )
3941 return & fs
4042 })
4143}
4244
4345func (vacc * VirtualAccount ) getDebits (asset string ) * fundsStack {
44- return defaultMapGet (vacc .debits , asset , func () * fundsStack {
46+ return utils . MapGetOrPutDefault (vacc .debits , asset , func () * fundsStack {
4547 fs := newFundsStack (nil )
4648 return & fs
4749 })
You can’t perform that action at this time.
0 commit comments