Skip to content

Commit

Permalink
fix: avoid default sendenabled for module accounts (#20419)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored May 17, 2024
1 parent 24762d7 commit 9e892fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/bank/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ func (k BaseKeeper) SendCoinsFromModuleToAccount(
}

for _, coin := range amt {
if ok := k.IsSendEnabledDenom(ctx, coin.Denom); !ok {
sendEnabled, found := k.getSendEnabled(ctx, coin.Denom)
if found && !sendEnabled {
return fmt.Errorf("denom: %s, is prohibited from being sent at this time", coin.Denom)
}
}
Expand Down

0 comments on commit 9e892fc

Please sign in to comment.