Skip to content

Commit

Permalink
fix: applying send restriction logic
Browse files Browse the repository at this point in the history
  • Loading branch information
poorphd committed Sep 4, 2024
1 parent 7340e43 commit db9b13a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/bank/keeper/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input,
// SendCoins transfers amt coins from a sending account to a receiving account.
// An error is returned upon failure.
func (k BaseSendKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error {
err := k.subUnlockedCoins(ctx, fromAddr, amt)
toAddr, err := k.sendCoinsRestrictionFn(ctx, fromAddr, toAddr, amt)
if err != nil {
return err
}

toAddr, err = k.sendCoinsRestrictionFn(ctx, fromAddr, toAddr, amt)
err = k.subUnlockedCoins(ctx, fromAddr, amt)
if err != nil {
return err
}
Expand Down

0 comments on commit db9b13a

Please sign in to comment.