Skip to content

Commit

Permalink
fix modify bid rand int error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Aug 15, 2024
1 parent 06f9e6d commit ceaaf18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions x/fundraising/simulation/modify_bid.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func SimulateMsgModifyBid(
if err != nil {
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "failed to get auctions"), nil, nil
}
if len(auctions) == 0 {
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "no auction to modify a bid"), nil, nil
}

// Select a random auction
auction := auctions[r.Intn(len(auctions))]
Expand Down
1 change: 0 additions & 1 deletion x/fundraising/simulation/place_bid.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func SimulateMsgPlaceBid(
if err != nil {
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "failed to get auctions"), nil, nil
}

if len(auctions) == 0 {
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "no auction to place a bid"), nil, nil
}
Expand Down

0 comments on commit ceaaf18

Please sign in to comment.