Blacklist minter & sg721 contract addresses for royalty payments

This commit is contained in:
Serkan Reis 2023-11-16 17:40:56 +03:00
parent 0ca2d63161
commit f19ced2d32
3 changed files with 6 additions and 6 deletions

View File

@ -432,8 +432,8 @@ export const CollectionActions = ({
if (contractInfoResponse !== undefined) {
const contractInfo = JSON.parse(new TextDecoder().decode(contractInfoResponse as Uint8Array))
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
if (contractInfo && !contractInfo.contract.includes('splits'))
throw new Error('The provided royalty payment address does not belong to a splits contract.')
if (contractInfo && (contractInfo.contract.includes('minter') || contractInfo.contract.includes('sg721')))
throw new Error('The provided royalty payment address does not belong to a compatible contract.')
else console.log(contractInfo)
}
}

View File

@ -352,8 +352,8 @@ export const OpenEditionMinterCreator = ({
if (contractInfoResponse !== undefined) {
const contractInfo = JSON.parse(new TextDecoder().decode(contractInfoResponse as Uint8Array))
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
if (contractInfo && !contractInfo.contract.includes('splits'))
throw new Error('The provided royalty payment address does not belong to a splits contract.')
if (contractInfo && (contractInfo.contract.includes('minter') || contractInfo.contract.includes('sg721')))
throw new Error('The provided royalty payment address does not belong to a compatible contract.')
else console.log(contractInfo)
}
}

View File

@ -1121,8 +1121,8 @@ const CollectionCreationPage: NextPage = () => {
if (contractInfoResponse !== undefined) {
const contractInfo = JSON.parse(new TextDecoder().decode(contractInfoResponse as Uint8Array))
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
if (contractInfo && !contractInfo.contract.includes('splits'))
throw new Error('The provided royalty payment address does not belong to a splits contract.')
if (contractInfo && (contractInfo.contract.includes('minter') || contractInfo.contract.includes('sg721')))
throw new Error('The provided royalty payment address does not belong to a compatible contract.')
else console.log(contractInfo)
}
}