Skip to content

Commit

Permalink
fix: check denom of SpendLimit (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic authored Jul 21, 2022
1 parent b81ad24 commit 0aca1df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion simapp/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import (
)

// SimAppChainID hardcoded chainID for simulation
// TODO: Implement a tool to check for gas growth. For now,
// we must increase this across the board for longer runs to work
const (
DefaultGenTxGas = 1000000
DefaultGenTxGas = 2000000
SimAppChainID = "simulation-app"
)

Expand Down
2 changes: 1 addition & 1 deletion x/authz/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe
return simtypes.NoOpMsg(authz.ModuleName, TypeMsgExec, "not a send authorization"), nil, nil
}

if sendAuth.SpendLimit.IsAllLTE(coins) {
if !sendAuth.SpendLimit.IsAllGTE(coins) || !coins.DenomsSubsetOf(sendAuth.SpendLimit) {
return simtypes.NoOpMsg(authz.ModuleName, TypeMsgExec, "over spend limit"), nil, nil
}

Expand Down

0 comments on commit 0aca1df

Please sign in to comment.