set lease start on auction finalization
parent
c330f4fb77
commit
f1ea4edca8
|
@ -69,6 +69,9 @@ func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lease period starts now
|
||||||
|
auction.LeaseStart = uint64(ctx.BlockTime().Unix())
|
||||||
|
|
||||||
// end auction
|
// end auction
|
||||||
k.SetAuction(ctx, auction)
|
k.SetAuction(ctx, auction)
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,9 @@ func (k msgServer) NewAuction(goCtx context.Context, msg *types.MsgNewAuction) (
|
||||||
Denom: msg.Denom,
|
Denom: msg.Denom,
|
||||||
Owner: msg.Creator,
|
Owner: msg.Creator,
|
||||||
Ceiling: msg.Ceiling,
|
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,
|
LeaseEnd: msg.LeaseEnd,
|
||||||
// remaining payout -> null
|
// remaining payout -> null
|
||||||
// Remaining: "0",
|
// Remaining: "0",
|
||||||
|
|
Loading…
Reference in New Issue