Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamer committed Mar 10, 2022
1 parent 315e0aa commit 0837a95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/token/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,13 @@ func SimulateBurnToken(k keeper.Keeper, ak types.AccountKeeper, bk types.BankKee
if !amount.IsPositive() {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBurnToken, "Insufficient funds"), nil, nil
}
amount2 := r.Int63n(amount.Int64())
spendable, hasNeg := spendable.SafeSub(sdk.Coins{sdk.NewCoin(token.GetSymbol(), sdk.NewInt(int64(amount2)))})
amount2 := simtypes.RandomAmount(r, amount)
spendable, hasNeg := spendable.SafeSub(sdk.Coins{sdk.NewCoin(token.GetSymbol(), amount2)})
if hasNeg {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBurnToken, "Insufficient funds"), nil, nil
}

msg := types.NewMsgBurnToken(token.GetSymbol(), token.GetOwner().String(), uint64(amount2))
msg := types.NewMsgBurnToken(token.GetSymbol(), token.GetOwner().String(), amount2.Uint64())

ownerAccount, found := simtypes.FindAccount(accs, token.GetOwner())
if !found {
Expand Down

0 comments on commit 0837a95

Please sign in to comment.