From c26c39d8127d2dc79155f3113ace68b8c2ad5477 Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Thu, 24 Oct 2024 03:38:11 -0300 Subject: [PATCH] improve action error message --- x/fundraising/keeper/auction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/fundraising/keeper/auction.go b/x/fundraising/keeper/auction.go index 89a67be..830a55a 100644 --- a/x/fundraising/keeper/auction.go +++ b/x/fundraising/keeper/auction.go @@ -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 { @@ -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 {