Check end time during open edition creation - 2
This commit is contained in:
parent
0ed370aa67
commit
8990175b03
@ -305,6 +305,11 @@ export const OpenEditionMinterCreator = ({
|
|||||||
if (mintingDetails.startTime === '') throw new Error('Start time is required')
|
if (mintingDetails.startTime === '') throw new Error('Start time is required')
|
||||||
if (mintingDetails.endTime === '') throw new Error('End time is required')
|
if (mintingDetails.endTime === '') throw new Error('End time is required')
|
||||||
if (Number(mintingDetails.startTime) < new Date().getTime() * 1000000) throw new Error('Invalid start time')
|
if (Number(mintingDetails.startTime) < new Date().getTime() * 1000000) throw new Error('Invalid start time')
|
||||||
|
if (Number(mintingDetails.endTime) < Number(mintingDetails.startTime))
|
||||||
|
throw new Error('End time cannot be earlier than start time')
|
||||||
|
if (Number(mintingDetails.endTime) === Number(mintingDetails.startTime))
|
||||||
|
throw new Error('End time cannot be equal to the start time')
|
||||||
|
|
||||||
if (
|
if (
|
||||||
mintingDetails.paymentAddress &&
|
mintingDetails.paymentAddress &&
|
||||||
(!isValidAddress(mintingDetails.paymentAddress) || !mintingDetails.paymentAddress.startsWith('stars1'))
|
(!isValidAddress(mintingDetails.paymentAddress) || !mintingDetails.paymentAddress.startsWith('stars1'))
|
||||||
|
Loading…
Reference in New Issue
Block a user