-
Notifications
You must be signed in to change notification settings - Fork 621
Closed
Description
Update listing requires that either the start timestamp has not passed, or the start timestamp is unchanged and the end timestamp is after now.
require(startTime < endTime, "Marketplace: endTimestamp not greater than startTimestamp.");
require(
listing.startTimestamp > block.timestamp ||
(startTime == listing.startTimestamp && endTime > block.timestamp),
"Marketplace: listing already active."
);However, the logic used in createListing was also copied into updateListing with no way to override it:
js/packages/thirdweb/src/extensions/marketplace/direct-listings/write/updateListing.ts
Lines 137 to 140 in 08eea95
| if (startTimestamp <= lastestBlock.timestamp) { | |
| // set the start time to the next block if it is in the past | |
| startTimestamp = lastestBlock.timestamp + 1n; | |
| } |
Can either the enforcement be removed or an override be added?
Metadata
Metadata
Assignees
Labels
No labels