Skip to content

Commit

Permalink
fix: unwrap all bet wager errors
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpioborn committed Oct 31, 2023
1 parent c27c5da commit ec45289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/bet/keeper/msg_server_bet.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (k msgServer) Wager(
bet := types.NewBet(msg.Creator, msg.Props, payload.SelectedOdds, payload.Meta)

if err := k.Keeper.Wager(ctx, bet, payload.OddsMap()); err != nil {
return nil, sdkerrors.Wrapf(types.ErrInWager, "%s", err)
return nil, err
}

msg.EmitEvent(&ctx)
Expand Down
2 changes: 1 addition & 1 deletion x/bet/keeper/wager.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (k Keeper) Wager(ctx sdk.Context, bet *types.Bet, betOdds map[string]*types
bettorAddress, bet.Fee, bet.OddsValue, betID, betOdds, market.OddsUIDS(),
)
if err != nil {
return sdkerrors.Wrapf(types.ErrInOBWagerProcessing, "%s", err)
return err
}

// set bet as placed
Expand Down

0 comments on commit ec45289

Please sign in to comment.