diff --git a/x/cosmostest/keeper/auction_state.go b/x/cosmostest/keeper/auction_state.go index 4647c98..c0e6a7f 100644 --- a/x/cosmostest/keeper/auction_state.go +++ b/x/cosmostest/keeper/auction_state.go @@ -69,6 +69,9 @@ func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) { } } + // lease period starts now + auction.LeaseStart = uint64(ctx.BlockTime().Unix()) + // end auction k.SetAuction(ctx, auction) } diff --git a/x/cosmostest/keeper/msg_server_new_auction.go b/x/cosmostest/keeper/msg_server_new_auction.go index 8c1d4f2..76895df 100644 --- a/x/cosmostest/keeper/msg_server_new_auction.go +++ b/x/cosmostest/keeper/msg_server_new_auction.go @@ -28,12 +28,14 @@ func (k msgServer) NewAuction(goCtx context.Context, msg *types.MsgNewAuction) ( Description: msg.Description, // best bid -> null // Best: new(types.Bid), - Deadline: uint64(ctx.BlockHeight()) + auctionconfig.AuctionTime, - Denom: msg.Denom, - Owner: msg.Creator, - Ceiling: msg.Ceiling, - LeaseStart: uint64(ctx.BlockTime().Unix()), - LeaseEnd: msg.LeaseEnd, + Deadline: uint64(ctx.BlockHeight()) + auctionconfig.AuctionTime, + Denom: msg.Denom, + Owner: msg.Creator, + Ceiling: msg.Ceiling, + // lease start -> null + // instead, initialize when auction is finalized + // LeaseStart: uint64(ctx.BlockTime().Unix()), + LeaseEnd: msg.LeaseEnd, // remaining payout -> null // Remaining: "0", }