Skip to content

Commit

Permalink
feat: apply send restrictions for multi sends
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed Jun 26, 2024
1 parent 8fac7fa commit 928be03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x/bank/keeper/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input,
if err != nil {
return err
}

for _, in := range inputs {
inAddress, _ := sdk.AccAddressFromBech32(in.Address)

outAddress, err = k.sendCoinsRestrictionFn(ctx, inAddress, outAddress, out.Coins)
if err != nil {
return err
}
}

err = k.addCoins(ctx, outAddress, out.Coins)
if err != nil {
return err
Expand Down

0 comments on commit 928be03

Please sign in to comment.