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 <shreerangkale@gmail.com> Reviewed-on: #14
This commit is contained in:
parent
2bb92205ba
commit
ba05a82406
@ -61,6 +61,6 @@ const ImportWalletDialog = ({
|
|||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
export default ImportWalletDialog;
|
export default ImportWalletDialog;
|
||||||
|
@ -19,6 +19,7 @@ import { useAccounts } from '../context/AccountsContext';
|
|||||||
import { useWalletConnect } from '../context/WalletConnectContext';
|
import { useWalletConnect } from '../context/WalletConnectContext';
|
||||||
import { NetworksDataState, StackParamsList } from '../types';
|
import { NetworksDataState, StackParamsList } from '../types';
|
||||||
import { useNetworks } from '../context/NetworksContext';
|
import { useNetworks } from '../context/NetworksContext';
|
||||||
|
import { IS_IMPORT_WALLET_ENABLED } from '../utils/constants';
|
||||||
|
|
||||||
const WCLogo = () => {
|
const WCLogo = () => {
|
||||||
return (
|
return (
|
||||||
@ -104,7 +105,7 @@ const HomeScreen = () => {
|
|||||||
setImportWalletDialog(false);
|
setImportWalletDialog(false);
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
setInvalidMnemonicError((error.message as string).toUpperCase())
|
setInvalidMnemonicError((error.message as string).toUpperCase());
|
||||||
setToastVisible(true);
|
setToastVisible(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -177,13 +178,13 @@ const HomeScreen = () => {
|
|||||||
isWalletCreating={isWalletCreating}
|
isWalletCreating={isWalletCreating}
|
||||||
createWalletHandler={createWalletHandler}
|
createWalletHandler={createWalletHandler}
|
||||||
/>
|
/>
|
||||||
<View style={styles.createWalletContainer}>
|
{ IS_IMPORT_WALLET_ENABLED && <View style={styles.createWalletContainer}>
|
||||||
<Button
|
<Button
|
||||||
mode="contained"
|
mode="contained"
|
||||||
onPress={() => setImportWalletDialog(true)}>
|
onPress={() => setImportWalletDialog(true)}>
|
||||||
Import Wallet
|
Import Wallet
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View> }
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<ImportWalletDialog
|
<ImportWalletDialog
|
||||||
|
@ -46,3 +46,5 @@ export const EMPTY_FIELD_ERROR = 'Field cannot be empty';
|
|||||||
export const INVALID_URL_ERROR = 'Invalid URL';
|
export const INVALID_URL_ERROR = 'Invalid URL';
|
||||||
|
|
||||||
export const IS_NUMBER_REGEX = /^\d+$/;
|
export const IS_NUMBER_REGEX = /^\d+$/;
|
||||||
|
|
||||||
|
export const IS_IMPORT_WALLET_ENABLED = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user