@@ -253,7 +253,11 @@ contract Marketplace is
253253
254254 // Tokens listed for sale in an auction are escrowed in Marketplace.
255255 if (newListing.listingType == ListingType.Auction) {
256- require (newListing.buyoutPricePerToken >= newListing.reservePricePerToken, "RESERVE " );
256+ require (
257+ newListing.buyoutPricePerToken == 0 ||
258+ newListing.buyoutPricePerToken >= newListing.reservePricePerToken,
259+ "RESERVE "
260+ );
257261 transferListingTokens (tokenOwner, address (this ), tokenAmountToList, newListing);
258262 }
259263
@@ -279,7 +283,7 @@ contract Marketplace is
279283 // Can only edit auction listing before it starts.
280284 if (isAuction) {
281285 require (block .timestamp < targetListing.startTime, "STARTED " );
282- require (_buyoutPricePerToken >= _reservePricePerToken, "RESERVE " );
286+ require (_buyoutPricePerToken == 0 || _buyoutPricePerToken >= _reservePricePerToken, "RESERVE " );
283287 }
284288
285289 if (_startTime < block .timestamp ) {
@@ -304,7 +308,7 @@ contract Marketplace is
304308 listingType: targetListing.listingType
305309 });
306310
307- // Must validate ownership and approval of the new quantity of tokens for diret listing.
311+ // Must validate ownership and approval of the new quantity of tokens for direct listing.
308312 if (targetListing.quantity != safeNewQuantity) {
309313 // Transfer all escrowed tokens back to the lister, to be reflected in the lister's
310314 // balance for the upcoming ownership and approval check.
@@ -461,6 +465,7 @@ contract Marketplace is
461465 if (targetListing.listingType == ListingType.Auction) {
462466 // A bid to an auction must be made in the auction's desired currency.
463467 require (newOffer.currency == targetListing.currency, "must use approved currency to bid " );
468+ require (newOffer.pricePerToken != 0 , "bidding zero amount " );
464469
465470 // A bid must be made for all auction items.
466471 newOffer.quantityWanted = getSafeQuantity (targetListing.tokenType, targetListing.quantity);
@@ -518,7 +523,7 @@ contract Marketplace is
518523 _closeAuctionForBidder (_targetListing, _incomingBid);
519524 } else {
520525 /**
521- * If there's an exisitng winning bid, incoming bid amount must be bid buffer % greater.
526+ * If there's an existng winning bid, incoming bid amount must be bid buffer % greater.
522527 * Else, bid amount must be at least as great as reserve price
523528 */
524529 require (
0 commit comments