From 92f5d1cc7147669db576ae1322ac73e3ec9bc8f5 Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Wed, 21 Aug 2024 14:39:31 +0400 Subject: [PATCH] fix: `isL1ToL2` assignment in wallet store --- contracts/src/bridge/frontend/src/stores/wallet-store.ts | 6 +----- contracts/src/bridge/frontend/src/types/index.ts | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/contracts/src/bridge/frontend/src/stores/wallet-store.ts b/contracts/src/bridge/frontend/src/stores/wallet-store.ts index 1a639bf0ad..42e1efa195 100644 --- a/contracts/src/bridge/frontend/src/stores/wallet-store.ts +++ b/contracts/src/bridge/frontend/src/stores/wallet-store.ts @@ -36,7 +36,7 @@ const useWalletStore = create((set, get) => ({ set({ provider: detectedProvider, signer: newSigner, - isL1ToL2: !isL1, + isL1ToL2: isL1, isWrongNetwork: chainId !== expectedChainId, }); @@ -174,10 +174,6 @@ const useWalletStore = create((set, get) => ({ get().initializeProvider(); }, - - updateNetworkStatus: (isWrongNetwork: boolean) => { - set({ isWrongNetwork }); - }, })); export default useWalletStore; diff --git a/contracts/src/bridge/frontend/src/types/index.ts b/contracts/src/bridge/frontend/src/types/index.ts index 0bd63567c2..a9b124584d 100644 --- a/contracts/src/bridge/frontend/src/types/index.ts +++ b/contracts/src/bridge/frontend/src/types/index.ts @@ -204,7 +204,6 @@ export interface IWalletState { disconnectWallet: () => void; switchNetwork: () => void; restoreWalletState: () => void; - updateNetworkStatus: (isWrongNetwork: boolean) => void; } export type ButtonVariants =