diff --git a/x/auction/types/auctions.go b/x/auction/types/auctions.go index fe9ec321..ffdbcac4 100644 --- a/x/auction/types/auctions.go +++ b/x/auction/types/auctions.go @@ -88,12 +88,6 @@ func (a BaseAuction) Validate() error { if a.EndTime.After(a.MaxEndTime) { return fmt.Errorf("MaxEndTime < EndTime (%s < %s)", a.MaxEndTime, a.EndTime) } - if a.HasReceivedBids && !a.Bid.IsPositive() { - return fmt.Errorf("cannot have a zero value bid when auction has a true HasReceivedBids flag value") - } - if !a.HasReceivedBids && a.Bid.IsPositive() { - return fmt.Errorf("cannot have a positive value bid when auction has a false HasReceivedBids flag value") - } return nil } @@ -193,7 +187,7 @@ func NewDebtAuction(buyerModAccName string, bid sdk.Coin, initialLot sdk.Coin, e Lot: initialLot, Bidder: supply.NewModuleAddress(buyerModAccName), // send proceeds from the first bid to the buyer. Bid: bid, // amount that the buyer is buying - doesn't change over course of auction - HasReceivedBids: true, // new auctions don't have any bids + HasReceivedBids: true, EndTime: endTime, MaxEndTime: endTime, }, diff --git a/x/auction/types/auctions_test.go b/x/auction/types/auctions_test.go index 0a1cdd60..b857fc18 100644 --- a/x/auction/types/auctions_test.go +++ b/x/auction/types/auctions_test.go @@ -196,34 +196,6 @@ func TestBaseAuctionValidate(t *testing.T) { }, false, }, - { - "zero bid with received bids", - BaseAuction{ - ID: 1, - Initiator: testAccAddress1, - Lot: c("kava", 1), - Bidder: addr1, - Bid: c("kava", 0), - EndTime: now, - MaxEndTime: now, - HasReceivedBids: true, - }, - false, - }, - { - "positive bid without receiving bids", - BaseAuction{ - ID: 1, - Initiator: testAccAddress1, - Lot: c("kava", 1), - Bidder: addr1, - Bid: c("kava", 1), - EndTime: now, - MaxEndTime: now, - HasReceivedBids: false, - }, - false, - }, } for _, tc := range tests {