Skip to content

Commit

Permalink
fix bank send hooks to use keeper method instead of hooks directly
Browse files Browse the repository at this point in the history
  • Loading branch information
randy75828 committed Dec 22, 2022
1 parent 222790a commit 9733ed3
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 @@ -155,7 +155,7 @@ func (k BaseSendKeeper) InputOutputCoins(ctx sdk.Context, inputs []types.Input,
// Sender and recipient address will be mapped to their corresponding cosmos addresses should they already be mapped
// Creates new account only if there is no mapping available for the recipient address AND recipient address account absent
func (k BaseSendKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error {
err := k.hooks.BeforeSend(ctx, fromAddr, toAddr, amt)
err := k.BeforeSend(ctx, fromAddr, toAddr, amt)
if err != nil {
return err
}
Expand All @@ -180,7 +180,7 @@ func (k BaseSendKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAd
k.ak.SetAccount(ctx, k.ak.NewAccountWithAddress(ctx, toAddr))
}

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

0 comments on commit 9733ed3

Please sign in to comment.