Skip to content

Commit

Permalink
do not enforce non initial deposit to contain each time all coins
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 20, 2023
1 parent 601a1f2 commit 11f1eaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions x/gov/keeper/deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,6 @@ func (keeper Keeper) validateDepositDenom(ctx context.Context, params v1.Params,
denoms = append(denoms, coin.Denom)
}

if len(depositAmount) > len(params.MinDeposit) {
return errors.Wrapf(types.ErrInvalidDepositDenom, "deposited %s, but gov accepts only the following denom(s): %v", depositAmount, denoms)
}

for _, coin := range depositAmount {
if _, ok := acceptedDenoms[coin.Denom]; !ok {
return errors.Wrapf(types.ErrInvalidDepositDenom, "deposited %s, but gov accepts only the following denom(s): %v", coin, denoms)
Expand Down
4 changes: 2 additions & 2 deletions x/gov/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() {
)
},
expErr: true,
expErrMsg: "deposited 100stake,100invalid, but gov accepts only the following denom(s): [stake]: invalid deposit denom",
expErrMsg: "deposited 100invalid, but gov accepts only the following denom(s): [stake]: invalid deposit denom",
},
"all good": {
preRun: func() (*v1.MsgSubmitProposal, error) {
Expand Down Expand Up @@ -838,7 +838,7 @@ func (suite *KeeperTestSuite) TestMsgDeposit() {
depositor: proposer,
deposit: append(minDeposit, sdk.NewCoin("ibc/badcoin", sdkmath.NewInt(1000))),
expErr: true,
expErrMsg: "deposited 10000000stake,1000ibc/badcoin, but gov accepts only the following denom(s): [stake]",
expErrMsg: "deposited 1000ibc/badcoin, but gov accepts only the following denom(s): [stake]",
},
"all good": {
preRun: func() uint64 {
Expand Down

0 comments on commit 11f1eaf

Please sign in to comment.