From ba05a82406fcdb7787ff2570b1e29c34158cbe06 Mon Sep 17 00:00:00 2001 From: nabarun Date: Fri, 9 Aug 2024 10:56:51 +0000 Subject: [PATCH] Disable import wallet functionality with const flag (#14) Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Co-authored-by: Shreerang Kale Reviewed-on: https://git.vdb.to/cerc-io/laconic-wallet-web/pulls/14 --- src/components/ImportWalletDialog.tsx | 2 +- src/screens/HomeScreen.tsx | 7 ++++--- src/utils/constants.ts | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/ImportWalletDialog.tsx b/src/components/ImportWalletDialog.tsx index c05b428..f192eb7 100644 --- a/src/components/ImportWalletDialog.tsx +++ b/src/components/ImportWalletDialog.tsx @@ -61,6 +61,6 @@ const ImportWalletDialog = ({ ); -} +}; export default ImportWalletDialog; diff --git a/src/screens/HomeScreen.tsx b/src/screens/HomeScreen.tsx index 83996a6..a40f5de 100644 --- a/src/screens/HomeScreen.tsx +++ b/src/screens/HomeScreen.tsx @@ -19,6 +19,7 @@ import { useAccounts } from '../context/AccountsContext'; import { useWalletConnect } from '../context/WalletConnectContext'; import { NetworksDataState, StackParamsList } from '../types'; import { useNetworks } from '../context/NetworksContext'; +import { IS_IMPORT_WALLET_ENABLED } from '../utils/constants'; const WCLogo = () => { return ( @@ -104,7 +105,7 @@ const HomeScreen = () => { setImportWalletDialog(false); } } catch (error: any) { - setInvalidMnemonicError((error.message as string).toUpperCase()) + setInvalidMnemonicError((error.message as string).toUpperCase()); setToastVisible(true); } }; @@ -177,13 +178,13 @@ const HomeScreen = () => { isWalletCreating={isWalletCreating} createWalletHandler={createWalletHandler} /> - + { IS_IMPORT_WALLET_ENABLED && - + } )}