Skip to content

Commit

Permalink
cherry pick: 3a97c08
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Dec 19, 2023
1 parent 562218d commit 4bb2d50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x/bank/keeper/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,12 @@ func (k BaseSendKeeper) InputOutputCoins(ctx context.Context, input 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 context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error {
var err error
err = k.subUnlockedCoins(ctx, fromAddr, amt)
toAddr, err := k.sendRestriction.apply(ctx, fromAddr, toAddr, amt)
if err != nil {
return err
}

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

0 comments on commit 4bb2d50

Please sign in to comment.