From c4726957457d839c62e96f485e19158b7d8840c0 Mon Sep 17 00:00:00 2001 From: michalsmiarowski Date: Thu, 18 Apr 2024 15:53:55 +0200 Subject: [PATCH] Remove IsSdkInitializingContext The context is not needed anymore when we've implemented a lazy loading in 1e4e3ec09a0e1113a17027b6e2963ca1fe0aeb5f. --- src/components/SubmitTxButton.tsx | 4 +- src/contexts/ThresholdContext.tsx | 74 +------------------ .../useRequestEthereumAccount.ts | 3 - src/hooks/tbtc/useFetchRedemptionDetails.ts | 9 +-- src/hooks/useFetchTvl.ts | 5 +- src/hooks/useIsActive.ts | 3 - src/pages/tBTC/Bridge/Mint.tsx | 56 +++++--------- .../tBTC/Bridge/Minting/MintingFlowRouter.tsx | 18 +---- src/pages/tBTC/Bridge/Unmint.tsx | 9 +-- 9 files changed, 31 insertions(+), 150 deletions(-) diff --git a/src/components/SubmitTxButton.tsx b/src/components/SubmitTxButton.tsx index c919933ea..c8306fc20 100644 --- a/src/components/SubmitTxButton.tsx +++ b/src/components/SubmitTxButton.tsx @@ -1,7 +1,6 @@ import { FC } from "react" import { Button, ButtonProps } from "@chakra-ui/react" import { useIsActive } from "../hooks/useIsActive" -import { useIsTbtcSdkInitializing } from "../contexts/ThresholdContext" import { useConnectWallet } from "../hooks/useConnectWallet" interface Props extends ButtonProps { @@ -15,14 +14,13 @@ const SubmitTxButton: FC = ({ ...buttonProps }) => { const { isActive } = useIsActive() - const { isSdkInitializedWithSigner } = useIsTbtcSdkInitializing() const connectWallet = useConnectWallet() const onConnectWalletClick = () => { connectWallet() } - if (isActive && isSdkInitializedWithSigner) { + if (isActive) { return (