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
3
3
import (
4
4
"fmt"
5
5
"math/big"
6
+
7
+ "github.com/formancehq/numscript/internal/utils"
6
8
)
7
9
8
10
type VirtualAccount struct {
@@ -34,14 +36,14 @@ func NewVirtualAccount() VirtualAccount {
34
36
}
35
37
36
38
func (vacc * VirtualAccount ) getCredits (asset string ) * fundsStack {
37
- return defaultMapGet (vacc .credits , asset , func () * fundsStack {
39
+ return utils . MapGetOrPutDefault (vacc .credits , asset , func () * fundsStack {
38
40
fs := newFundsStack (nil )
39
41
return & fs
40
42
})
41
43
}
42
44
43
45
func (vacc * VirtualAccount ) getDebits (asset string ) * fundsStack {
44
- return defaultMapGet (vacc .debits , asset , func () * fundsStack {
46
+ return utils . MapGetOrPutDefault (vacc .debits , asset , func () * fundsStack {
45
47
fs := newFundsStack (nil )
46
48
return & fs
47
49
})
You can’t perform that action at this time.
0 commit comments