From 7bdf81d95ee09ac81e90a420865acb79e6328f75 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 13 Feb 2024 10:39:13 +0300 Subject: [PATCH] Update royalty address checks for v1 collections --- components/collections/actions/Action.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/collections/actions/Action.tsx b/components/collections/actions/Action.tsx index f8b5f49..9ea3623 100644 --- a/components/collections/actions/Action.tsx +++ b/components/collections/actions/Action.tsx @@ -212,8 +212,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) } } @@ -221,6 +221,7 @@ export const CollectionActions = ({ const txHash = await toast.promise(dispatchExecute(payload), { error: `${type.charAt(0).toUpperCase() + type.slice(1)} execute failed!`, loading: 'Executing message...', + success: (tx) => `Transaction ${tx} success!`, }) if (txHash) {