Skip to content

Commit afaa35a

Browse files
committed
fix after rebase
1 parent 88a343d commit afaa35a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/interpreter/virtual_account.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package interpreter
33
import (
44
"fmt"
55
"math/big"
6+
7+
"github.com/formancehq/numscript/internal/utils"
68
)
79

810
type VirtualAccount struct {
@@ -34,14 +36,14 @@ func NewVirtualAccount() VirtualAccount {
3436
}
3537

3638
func (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

4345
func (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
})

0 commit comments

Comments
 (0)