Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Contains all the PRs that improved the code without changing the behaviours.
### Fixed

- [#414](https://github.com/archway-network/archway/pull/414) - Preventing user from setting contract flat fee if rewards address is not set
- [#418](https://github.com/archway-network/archway/pull/418) - Fixing authz msg decoding in x/rewards antehandlers

## [v1.0.1]

Expand Down
14 changes: 7 additions & 7 deletions x/rewards/ante/ante_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ func GetContractFlatFees(ctx sdk.Context, rk RewardsKeeperExpected, codec codec.
}
return nil, true, nil
}
case *authz.MsgExec: // if msg is authz msg, unwrap the msg and check if any are wasmTypes.MsgExecuteContract
case *authz.MsgExec: // if msg is authz msg, get the unwrapped msgs and check if any are wasmTypes.MsgExecuteContract
{
for _, v := range msg.Msgs {
var wrappedMsg sdk.Msg
err := codec.UnpackAny(v, &wrappedMsg)
if err != nil {
return nil, false, sdkErrors.Wrapf(sdkErrors.ErrUnauthorized, "error decoding authz messages")
}
authzMsgs, err := msg.GetMessages()
if err != nil {
return nil, false, sdkErrors.Wrapf(sdkErrors.ErrUnauthorized, "error decoding authz messages")
}

for _, wrappedMsg := range authzMsgs {
cff, hasWasmMsgs, err := GetContractFlatFees(ctx, rk, codec, wrappedMsg)
if err != nil {
return nil, hasWasmMsgs, err
Expand Down