diff --git a/apps/web/src/app/(routes)/bridge/_hooks/useEthereumCollectionApproval.tsx b/apps/web/src/app/(routes)/bridge/_hooks/useEthereumCollectionApproval.tsx index 5f4b5b22..478c0248 100644 --- a/apps/web/src/app/(routes)/bridge/_hooks/useEthereumCollectionApproval.tsx +++ b/apps/web/src/app/(routes)/bridge/_hooks/useEthereumCollectionApproval.tsx @@ -32,17 +32,28 @@ export default function useEthereumCollectionApproval() { const { data: approveHash, + error, + failureReason, isLoading: isSigning, writeContract: writeContractApprove, } = useWriteContract(); + console.error("error: ", error); + console.error("failureReason: ", failureReason); function approveForAll() { - writeContractApprove({ - abi: erc721Abi, - address: selectedCollectionAddress as `0x${string}`, - args: [process.env.NEXT_PUBLIC_L1_BRIDGE_ADDRESS as `0x${string}`, true], - functionName: "setApprovalForAll", - }); + try { + writeContractApprove({ + abi: erc721Abi, + address: selectedCollectionAddress as `0x${string}`, + args: [ + process.env.NEXT_PUBLIC_L1_BRIDGE_ADDRESS as `0x${string}`, + true, + ], + functionName: "setApprovalForAll", + }); + } catch (e) { + console.error(e); + } } const { isLoading: isApproveLoading } = useWaitForTransactionReceipt({