Added check for external_link protocol
This commit is contained in:
parent
ef80449b91
commit
cb8eeb0dfd
@ -681,6 +681,13 @@ const CollectionCreationPage: NextPage = () => {
|
||||
Number(collectionDetails.startTradingTime) < Number(mintingDetails?.startTime)
|
||||
)
|
||||
throw new Error('Trading start time must be after minting start time')
|
||||
if (collectionDetails.externalLink) {
|
||||
try {
|
||||
const url = new URL(collectionDetails.externalLink)
|
||||
} catch (e: any) {
|
||||
throw new Error(`Invalid external link: Make sure to include the protocol (e.g. https://)`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const checkMintingDetails = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user