fix: avoid default sendenabled for module accounts (#20419)

This commit is contained in:
Marko 2024-05-17 12:06:38 +02:00 committed by GitHub
parent 24762d74c7
commit 9e892fc59a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
}
}