Skip to content

Commit

Permalink
check the chainid (#1750)
Browse files Browse the repository at this point in the history
change the spec name in the tests to create the case where the specs names are the same at the start

Co-authored-by: Yaroms <[email protected]>
  • Loading branch information
Yaroms and Yaroms authored Oct 20, 2024
1 parent 3dc3e32 commit 7eb86a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions x/rewards/keeper/base_pay.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ func (k Keeper) popAllBasePayForChain(ctx sdk.Context, chainID string) (list []t
k.cdc.MustUnmarshal(iterator.Value(), &val)
bs := types.BasePayKeyRecover(string(iterator.Key()))
bs.BasePay = val
list = append(list, bs)
store.Delete(iterator.Key())
if bs.ChainId == chainID {
list = append(list, bs)
store.Delete(iterator.Key())
}
}

return
Expand Down
2 changes: 1 addition & 1 deletion x/rewards/keeper/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
sdk.NewCoin(commontypes.TokenDenom, sdk.NewInt(1100)),
sdk.NewCoin(ibcDenom, sdk.NewInt(500)),
)
mockSpec2 string = "mock2"
mockSpec2 string = "mockspec2"
)

type tester struct {
Expand Down

0 comments on commit 7eb86a4

Please sign in to comment.