mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: Disable storage restore feature on macOS
This commit is contained in:
parent
022579f8b7
commit
008edb12d5
@ -1,5 +1,7 @@
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
|
||||
const isMacCatalina = getSystemName() === 'Mac OS X';
|
||||
|
||||
module.exports.isMacCatalina = isMacCatalina;
|
||||
module.exports.isCatalyst = isCatalyst;
|
||||
|
@ -239,7 +239,7 @@
|
||||
"about_sm_telegram": "Telegram channel",
|
||||
"about_sm_twitter": "Follow us on Twitter",
|
||||
"advanced_options": "Advanced Options",
|
||||
"biom": "biometrics",
|
||||
"biometrics": "Biometrics",
|
||||
"biom_10times": "You have attempted to enter your password 10 times. Would you like to reset your storage? This will remove all wallets and decrypt your storage.",
|
||||
"biom_conf_identity": "Please confirm your identity.",
|
||||
"biom_no_passcode": "Your device does not have a passcode. In order to proceed, please configure a passcode in the Settings app.",
|
||||
|
@ -17,6 +17,7 @@ import Biometric from '../../class/biometrics';
|
||||
import loc from '../../loc';
|
||||
import { colors } from 'react-native-elements';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { isCatalyst } from '../../blue_modules/environment';
|
||||
const prompt = require('../../blue_modules/prompt');
|
||||
|
||||
const EncryptStorage = () => {
|
||||
@ -43,7 +44,7 @@ const EncryptStorage = () => {
|
||||
const initialState = useCallback(async () => {
|
||||
const isBiometricsEnabled = await Biometric.isBiometricUseEnabled();
|
||||
const isDeviceBiometricCapable = await Biometric.isDeviceBiometricCapable();
|
||||
const biometricsType = (await Biometric.biometricType()) || 'biometrics';
|
||||
const biometricsType = (await Biometric.biometricType()) || loc.settings.biometrics.toLowercase();
|
||||
const deleteWalletsAfterUninstall = await isDeleteWalletAfterUninstallEnabled();
|
||||
const isStorageEncryptedSwitchEnabled = await isStorageEncrypted();
|
||||
setStorageIsEncryptedSwitchEnabled(isStorageEncryptedSwitchEnabled);
|
||||
@ -156,7 +157,7 @@ const EncryptStorage = () => {
|
||||
<ScrollView contentContainerStyle={styles.root}>
|
||||
{biometrics.isDeviceBiometricCapable && (
|
||||
<>
|
||||
<BlueHeaderDefaultSubHooks leftText={loc.settings.biom} rightComponent={null} />
|
||||
<BlueHeaderDefaultSubHooks leftText={loc.settings.biometrics} rightComponent={null} />
|
||||
<BlueListItem
|
||||
title={loc.formatString(loc.settings.encrypt_use, { type: biometrics.biometricsType })}
|
||||
Component={TouchableWithoutFeedback}
|
||||
@ -176,7 +177,7 @@ const EncryptStorage = () => {
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ onValueChange: onEncryptStorageSwitch, value: storageIsEncryptedSwitchEnabled }}
|
||||
/>
|
||||
{Platform.OS === 'ios' && (
|
||||
{Platform.OS === 'ios' && !isCatalyst && (
|
||||
<BlueListItem
|
||||
hideChevron
|
||||
title={loc.settings.encrypt_del_uninstall}
|
||||
|
@ -4,6 +4,7 @@ import RNFS from 'react-native-fs';
|
||||
import RNSecureKeyStore, { ACCESSIBLE } from 'react-native-secure-key-store';
|
||||
import DefaultPreference from 'react-native-default-preference';
|
||||
import { Platform } from 'react-native';
|
||||
import { isCatalyst } from '../../blue_modules/environment';
|
||||
|
||||
export default class WalletMigrate {
|
||||
static expoDataDirectory = RNFS.DocumentDirectoryPath + '/ExponentExperienceData/%40overtorment%2Fbluewallet/RCTAsyncLocalStorage';
|
||||
@ -14,7 +15,7 @@ export default class WalletMigrate {
|
||||
|
||||
// 0: Let's start!
|
||||
async start() {
|
||||
if (Platform.OS === 'ios') {
|
||||
if (Platform.OS === 'ios' && !isCatalyst) {
|
||||
const defaultPreferenceGroupName = await DefaultPreference.getName();
|
||||
console.log('----- defaultPreferenceGroupName');
|
||||
console.log(defaultPreferenceGroupName);
|
||||
|
Loading…
Reference in New Issue
Block a user