Disable import wallet functionality with const flag #14

Merged
nabarun merged 1 commits from deep-stack/laconic-wallet-web:sk-remove-import-wallet into main 2024-08-09 10:56:52 +00:00
3 changed files with 7 additions and 4 deletions
Showing only changes of commit 9539b9a694 - Show all commits

View File

@ -61,6 +61,6 @@ const ImportWalletDialog = ({
</DialogActions>
</Dialog>
);
}
};
export default ImportWalletDialog;

View File

@ -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}
/>
<View style={styles.createWalletContainer}>
{ IS_IMPORT_WALLET_ENABLED && <View style={styles.createWalletContainer}>
<Button
mode="contained"
onPress={() => setImportWalletDialog(true)}>
Import Wallet
</Button>
</View>
</View> }
</>
)}
<ImportWalletDialog

View File

@ -46,3 +46,5 @@ export const EMPTY_FIELD_ERROR = 'Field cannot be empty';
export const INVALID_URL_ERROR = 'Invalid URL';
export const IS_NUMBER_REGEX = /^\d+$/;
export const IS_IMPORT_WALLET_ENABLED = false;