Skip to content

Commit

Permalink
Merge pull request #250 from comdex-official/testdev_auction
Browse files Browse the repository at this point in the history
time check added
  • Loading branch information
cgsingh33 authored Jun 15, 2022
2 parents 2571024 + 5b9b880 commit 8ae1cd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/auction/keeper/debt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions x/auction/keeper/surplus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ae1cd9

Please sign in to comment.