diff --git a/x/auction/keeper/debt.go b/x/auction/keeper/debt.go index de14cb0f2..402e8709d 100644 --- a/x/auction/keeper/debt.go +++ b/x/auction/keeper/debt.go @@ -389,6 +389,9 @@ func (k Keeper) PlaceDebtAuctionBid(ctx sdk.Context, appId, auctionMappingId, au auction.CurrentBidAmount = bid auction.ExpectedMintedToken = bid auction.BidEndTime = ctx.BlockTime().Add(time.Second * time.Duration(auctionParam.BidDurationSeconds)) + if auction.BidEndTime.After((auction.EndTime)){ + auction.BidEndTime = auction.EndTime + } err = k.SetDebtAuction(ctx, auction) if err != nil { return err diff --git a/x/auction/keeper/surplus.go b/x/auction/keeper/surplus.go index 0b700f69c..ea91cbc24 100644 --- a/x/auction/keeper/surplus.go +++ b/x/auction/keeper/surplus.go @@ -386,6 +386,9 @@ func (k Keeper) PlaceSurplusAuctionBid(ctx sdk.Context, appId, auctionMappingId, auction.Bidder = bidder auction.Bid = bid auction.BidEndTime = ctx.BlockTime().Add(time.Second * time.Duration(auctionParam.BidDurationSeconds)) + if auction.BidEndTime.After((auction.EndTime)){ + auction.BidEndTime = auction.EndTime + } err = k.SetSurplusAuction(ctx, auction) if err != nil { return err