Skip to content

Commit

Permalink
fixed raffle expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan.balea committed Sep 10, 2024
1 parent 0db961a commit 54746ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/burner/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func (k msgServer) JoinRaffle(goCtx context.Context, msg *types.MsgJoinRaffle) (
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "raffle not found for provided denom")
}

if raffle.EndAt >= (k.GetRaffleCurrentEpoch(ctx) - 1) {
//do not allow participants to join close to expiration
if raffle.EndAt <= (k.GetRaffleCurrentEpoch(ctx) - (raffleDelayHeight + 1)) {
return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "raffle has expired")
}

Expand Down

0 comments on commit 54746ba

Please sign in to comment.