@@ -253,7 +253,11 @@ contract Marketplace is
253
253
254
254
// Tokens listed for sale in an auction are escrowed in Marketplace.
255
255
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
+ );
257
261
transferListingTokens (tokenOwner, address (this ), tokenAmountToList, newListing);
258
262
}
259
263
@@ -279,7 +283,7 @@ contract Marketplace is
279
283
// Can only edit auction listing before it starts.
280
284
if (isAuction) {
281
285
require (block .timestamp < targetListing.startTime, "STARTED " );
282
- require (_buyoutPricePerToken >= _reservePricePerToken, "RESERVE " );
286
+ require (_buyoutPricePerToken == 0 || _buyoutPricePerToken >= _reservePricePerToken, "RESERVE " );
283
287
}
284
288
285
289
if (_startTime < block .timestamp ) {
@@ -304,7 +308,7 @@ contract Marketplace is
304
308
listingType: targetListing.listingType
305
309
});
306
310
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.
308
312
if (targetListing.quantity != safeNewQuantity) {
309
313
// Transfer all escrowed tokens back to the lister, to be reflected in the lister's
310
314
// balance for the upcoming ownership and approval check.
@@ -461,6 +465,7 @@ contract Marketplace is
461
465
if (targetListing.listingType == ListingType.Auction) {
462
466
// A bid to an auction must be made in the auction's desired currency.
463
467
require (newOffer.currency == targetListing.currency, "must use approved currency to bid " );
468
+ require (newOffer.pricePerToken != 0 , "bidding zero amount " );
464
469
465
470
// A bid must be made for all auction items.
466
471
newOffer.quantityWanted = getSafeQuantity (targetListing.tokenType, targetListing.quantity);
@@ -518,7 +523,7 @@ contract Marketplace is
518
523
_closeAuctionForBidder (_targetListing, _incomingBid);
519
524
} else {
520
525
/**
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.
522
527
* Else, bid amount must be at least as great as reserve price
523
528
*/
524
529
require (
0 commit comments