set lease start on auction finalization

master
michael 2022-09-05 22:07:05 +00:00
parent c330f4fb77
commit f1ea4edca8
2 changed files with 11 additions and 6 deletions

View File

@ -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)
}

View File

@ -32,7 +32,9 @@ func (k msgServer) NewAuction(goCtx context.Context, msg *types.MsgNewAuction) (
Denom: msg.Denom,
Owner: msg.Creator,
Ceiling: msg.Ceiling,
LeaseStart: uint64(ctx.BlockTime().Unix()),
// lease start -> null
// instead, initialize when auction is finalized
// LeaseStart: uint64(ctx.BlockTime().Unix()),
LeaseEnd: msg.LeaseEnd,
// remaining payout -> null
// Remaining: "0",