From 60de9e72cb103ade425273f10ce0118617cd804b Mon Sep 17 00:00:00 2001 From: Christophe Date: Tue, 5 Mar 2024 16:25:56 +0000 Subject: [PATCH] Fix popup --- .../[address]/RecoverFundsButton.tsx | 26 +++++++++---------- src/utils/useAccountType.ts | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/app/recover-funds/[address]/RecoverFundsButton.tsx b/src/app/recover-funds/[address]/RecoverFundsButton.tsx index 2ed63a0..bc22462 100644 --- a/src/app/recover-funds/[address]/RecoverFundsButton.tsx +++ b/src/app/recover-funds/[address]/RecoverFundsButton.tsx @@ -157,13 +157,11 @@ function RecoverFundsButton({ if (!signer) return null; - const l1ChainId = getL1ChainIdFromL2ChainId(chain?.id); if ( - l1ChainId !== mainnet.id && - l1ChainId !== goerli.id && - l1ChainId !== sepolia.id + chain?.id !== mainnet.id && + chain?.id !== goerli.id && + chain?.id !== sepolia.id ) { - console.log(chain); return (
Unknown L1 chain id. This chain is not supported by this tool
); @@ -180,14 +178,16 @@ function RecoverFundsButton({ return ( <>
- +
+ +
{loading && isSmartContractWallet && (
diff --git a/src/utils/useAccountType.ts b/src/utils/useAccountType.ts index d68e3a4..938e70d 100644 --- a/src/utils/useAccountType.ts +++ b/src/utils/useAccountType.ts @@ -31,7 +31,7 @@ export function useAccountType(): Result { // By default, assume it's an EOA return { - isSmartContractWallet: false, + isSmartContractWallet: isSmartContractWallet ?? false, isLoading: isSmartContractWallet === null, }; }