mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-04 04:13:49 +01:00
FIX: Security screen froze on load (#6214)
This commit is contained in:
parent
2e24f5173b
commit
a6d0073f7e
2 changed files with 7 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState, useCallback, useContext } from 'react';
|
||||
import React, { useEffect, useState, useContext } from 'react';
|
||||
import { View, ScrollView, Alert, TouchableOpacity, TouchableWithoutFeedback, Text, StyleSheet, Platform } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
|
@ -28,15 +28,15 @@ const EncryptStorage = () => {
|
|||
},
|
||||
});
|
||||
|
||||
const initialState = useCallback(async () => {
|
||||
const initialState = async () => {
|
||||
const isBiometricsEnabled = await Biometric.isBiometricUseEnabled();
|
||||
const isDeviceBiometricCapable = await Biometric.isDeviceBiometricCapable();
|
||||
const biometricsType = (await Biometric.biometricType()) || loc.settings.biometrics;
|
||||
const isStorageEncryptedSwitchEnabled = await isStorageEncrypted();
|
||||
setStorageIsEncryptedSwitchEnabled(isStorageEncryptedSwitchEnabled);
|
||||
setBiometrics({ isBiometricsEnabled, isDeviceBiometricCapable, biometricsType });
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
initialState();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
|
|
@ -522,7 +522,9 @@ const ViewEditMultisigCosigners = ({ route }: Props) => {
|
|||
<BottomModal isVisible={isShareModalVisible} onClose={hideShareModal} doneButton>
|
||||
<KeyboardAvoidingView enabled={!isPad} behavior={Platform.OS === 'ios' ? 'position' : undefined}>
|
||||
<View style={[styles.modalContent, stylesHook.modalContent, styles.alignItemsCenter]}>
|
||||
<Text style={[styles.headerText, stylesHook.textDestination]}>{loc.multisig.this_is_cosigners_xpub} {Platform.OS === "ios" ? loc.multisig.this_is_cosigners_xpub_airdrop : ""}</Text>
|
||||
<Text style={[styles.headerText, stylesHook.textDestination]}>
|
||||
{loc.multisig.this_is_cosigners_xpub} {Platform.OS === 'ios' ? loc.multisig.this_is_cosigners_xpub_airdrop : ''}
|
||||
</Text>
|
||||
<QRCodeComponent value={exportStringURv2} size={260} isLogoRendered={false} />
|
||||
<BlueSpacing20 />
|
||||
<View style={styles.squareButtonWrapper}>
|
||||
|
|
Loading…
Add table
Reference in a new issue