Skip to content

Commit

Permalink
improve action error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Oct 24, 2024
1 parent e1ad529 commit c26c39d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/fundraising/keeper/auction.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func (k Keeper) CreateFixedPriceAuction(ctx context.Context, msg *types.MsgCreat
sdkCtx := sdk.UnwrapSDKContext(ctx)
blockTime := sdkCtx.BlockTime()
if blockTime.After(msg.EndTime) { // EndTime < CurrentTime
return nil, sdkerrors.Wrap(errors.ErrInvalidRequest, "end time must be set after the current time")
return nil, sdkerrors.Wrapf(errors.ErrInvalidRequest, "end time (%s) must be set after the current time (%s)", msg.EndTime.Unix(), blockTime.Unix())
}

if len(msg.VestingSchedules) > types.MaxNumVestingSchedules {
Expand Down Expand Up @@ -526,7 +526,7 @@ func (k Keeper) CreateBatchAuction(ctx context.Context, msg *types.MsgCreateBatc
sdkCtx := sdk.UnwrapSDKContext(ctx)
blockTime := sdkCtx.BlockTime()
if blockTime.After(msg.EndTime) { // EndTime < CurrentTime
return nil, sdkerrors.Wrap(errors.ErrInvalidRequest, "end time must be set after the current time")
return nil, sdkerrors.Wrapf(errors.ErrInvalidRequest, "end time (%d) must be set after the current time (%d)", msg.EndTime.Unix(), blockTime.Unix())
}

if len(msg.VestingSchedules) > types.MaxNumVestingSchedules {
Expand Down

0 comments on commit c26c39d

Please sign in to comment.