mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
ADD: If OS supports passcode, provide explanation
This commit is contained in:
parent
b612510bdc
commit
8e01cadbba
4 changed files with 77 additions and 53 deletions
|
@ -91,7 +91,7 @@
|
|||
B4AB225E2B02AD12001F4328 /* XMLParserDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4AB225C2B02AD12001F4328 /* XMLParserDelegate.swift */; };
|
||||
B4EE583C226703320003363C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B40D4E35225841ED00428FCC /* Assets.xcassets */; };
|
||||
C59F90CE0D04D3E4BB39BC5D /* libPods-BlueWalletUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F02C2F7CA3591E4E0B06EBA /* libPods-BlueWalletUITests.a */; };
|
||||
C978A716948AB7DEC5B6F677 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
|
||||
C978A716948AB7DEC5B6F677 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
|
||||
E5D4794B26781FC0007838C1 /* fiatUnits.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DD410AD266CAF1F0087DE03 /* fiatUnits.json */; };
|
||||
E5D4794C26781FC1007838C1 /* fiatUnits.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DD410AD266CAF1F0087DE03 /* fiatUnits.json */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
@ -399,7 +399,7 @@
|
|||
files = (
|
||||
782F075B5DD048449E2DECE9 /* libz.tbd in Frameworks */,
|
||||
764B49B1420D4AEB8109BF62 /* libsqlite3.0.tbd in Frameworks */,
|
||||
C978A716948AB7DEC5B6F677 /* BuildFile in Frameworks */,
|
||||
C978A716948AB7DEC5B6F677 /* (null) in Frameworks */,
|
||||
773E382FE62E836172AAB98B /* libPods-BlueWallet.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -1024,7 +1024,7 @@
|
|||
);
|
||||
mainGroup = 83CBB9F61A601CBA00E9B192;
|
||||
packageReferences = (
|
||||
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode.git" */,
|
||||
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */,
|
||||
B41B76832B66B2FF002C48D5 /* XCRemoteSwiftPackageReference "bugsnag-cocoa" */,
|
||||
);
|
||||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||
|
@ -1661,7 +1661,7 @@
|
|||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development io.bluewallet.bluewallet";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match AppStore io.bluewallet.bluewallet catalyst";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "BlueWallet-Bridging-Header.h";
|
||||
|
@ -1716,7 +1716,7 @@
|
|||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore io.bluewallet.bluewallet";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match AppStore io.bluewallet.bluewallet catalyst";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "BlueWallet-Bridging-Header.h";
|
||||
|
@ -2518,7 +2518,7 @@
|
|||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode.git" */ = {
|
||||
6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/EFPrefix/EFQRCode.git";
|
||||
requirement = {
|
||||
|
@ -2539,7 +2539,7 @@
|
|||
/* Begin XCSwiftPackageProductDependency section */
|
||||
6DFC806F24EA0B6C007B8700 /* EFQRCode */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode.git" */;
|
||||
package = 6DFC806E24EA0B6C007B8700 /* XCRemoteSwiftPackageReference "EFQRCode" */;
|
||||
productName = EFQRCode;
|
||||
};
|
||||
B41B76842B66B2FF002C48D5 /* Bugsnag */ = {
|
||||
|
|
|
@ -271,6 +271,7 @@
|
|||
"encrypt_tstorage": "Storage",
|
||||
"encrypt_use": "Use {type}",
|
||||
"encrypt_use_expl": "{type} will be used to confirm your identity before making a transaction, unlocking, exporting, or deleting a wallet. {type} will not be used to unlock encrypted storage.",
|
||||
"biometrics_fail": "If {type} is not enabled, or fails to unlock, you can use your device passcode as an alternative.",
|
||||
"general": "General",
|
||||
"general_adv_mode": "Advanced Mode",
|
||||
"general_adv_mode_e": "When enabled, you will see advanced options such as different wallet types, the ability to specify the LNDHub instance you wish to connect to, and custom entropy during wallet creation.",
|
||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -42,7 +42,7 @@
|
|||
"coinselect": "3.1.13",
|
||||
"crypto-js": "4.2.0",
|
||||
"dayjs": "1.11.10",
|
||||
"detox": "20.17.1",
|
||||
"detox": "20.18.3",
|
||||
"ecpair": "2.0.1",
|
||||
"ecurve": "1.0.6",
|
||||
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
||||
|
@ -9646,9 +9646,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/detox": {
|
||||
"version": "20.17.1",
|
||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.17.1.tgz",
|
||||
"integrity": "sha512-10pey6CR9D5GSloRkH60ObBGZ8VS11H7iuBNY7qq6jO2swiqqckHhPLRXfH9+WGR7l3vDnfU+G/gQs7JxQkJwA==",
|
||||
"version": "20.18.3",
|
||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.18.3.tgz",
|
||||
"integrity": "sha512-ssC7pWLDOs48Rocu7TDdLaYWiDWF5A8EAf/YcCsseHIqAqr6ECX6Hve8MIh3wUkPGYWoZaJHQfT9cyZjklt8AQ==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"ajv": "^8.6.3",
|
||||
|
@ -29910,9 +29910,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"detox": {
|
||||
"version": "20.17.1",
|
||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.17.1.tgz",
|
||||
"integrity": "sha512-10pey6CR9D5GSloRkH60ObBGZ8VS11H7iuBNY7qq6jO2swiqqckHhPLRXfH9+WGR7l3vDnfU+G/gQs7JxQkJwA==",
|
||||
"version": "20.18.3",
|
||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.18.3.tgz",
|
||||
"integrity": "sha512-ssC7pWLDOs48Rocu7TDdLaYWiDWF5A8EAf/YcCsseHIqAqr6ECX6Hve8MIh3wUkPGYWoZaJHQfT9cyZjklt8AQ==",
|
||||
"requires": {
|
||||
"ajv": "^8.6.3",
|
||||
"bunyan": "^1.8.12",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState, useCallback, useContext } from 'react';
|
||||
import { View, ScrollView, Alert, TouchableOpacity, TouchableWithoutFeedback, Text, StyleSheet } from 'react-native';
|
||||
import { View, ScrollView, Alert, TouchableOpacity, TouchableWithoutFeedback, Text, StyleSheet, Platform } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueLoading, BlueSpacing20, BlueCard, BlueText } from '../../BlueComponents';
|
||||
|
@ -124,57 +124,80 @@ const EncryptStorage = () => {
|
|||
navigate('PlausibleDeniability');
|
||||
};
|
||||
|
||||
return isLoading ? (
|
||||
<ScrollView centerContent>
|
||||
<BlueLoading />
|
||||
</ScrollView>
|
||||
) : (
|
||||
<ScrollView contentContainerStyle={styles.root} automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
<View style={styles.paddingTop} />
|
||||
{biometrics.isDeviceBiometricCapable && (
|
||||
const renderPasscodeExplanation = () => {
|
||||
let isCapable = true;
|
||||
if (Platform.OS === 'android') {
|
||||
if (Platform.Version < 30) {
|
||||
isCapable = false;
|
||||
}
|
||||
}
|
||||
if (isCapable) {
|
||||
return isCapable ? (
|
||||
<>
|
||||
<BlueText />
|
||||
<BlueText>{loc.formatString(loc.settings.biometrics_fail, { type: biometrics.biometricsType })}</BlueText>
|
||||
</>
|
||||
) : null;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<ScrollView
|
||||
contentContainerStyle={styleHooks.root}
|
||||
automaticallyAdjustContentInsets
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
centerContent={isLoading}
|
||||
>
|
||||
{isLoading ? (
|
||||
<BlueLoading />
|
||||
) : (
|
||||
<>
|
||||
<View style={styles.paddingTop} />
|
||||
{biometrics.isDeviceBiometricCapable && (
|
||||
<>
|
||||
<Text adjustsFontSizeToFit style={[styles.headerText, styleHooks.headerText]}>
|
||||
{loc.settings.biometrics}
|
||||
</Text>
|
||||
<ListItem
|
||||
title={loc.formatString(loc.settings.encrypt_use, { type: biometrics.biometricsType })}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ value: biometrics.isBiometricsEnabled, onValueChange: onUseBiometricSwitch }}
|
||||
/>
|
||||
<BlueCard>
|
||||
<BlueText>{loc.formatString(loc.settings.encrypt_use_expl, { type: biometrics.biometricsType })}</BlueText>
|
||||
{renderPasscodeExplanation()}
|
||||
</BlueCard>
|
||||
<BlueSpacing20 />
|
||||
</>
|
||||
)}
|
||||
<Text adjustsFontSizeToFit style={[styles.headerText, styleHooks.headerText]}>
|
||||
{loc.settings.biometrics}
|
||||
{loc.settings.encrypt_tstorage}
|
||||
</Text>
|
||||
<ListItem
|
||||
title={loc.formatString(loc.settings.encrypt_use, { type: biometrics.biometricsType })}
|
||||
testID="EncryptedAndPasswordProtected"
|
||||
hideChevron
|
||||
title={loc.settings.encrypt_enc_and_pass}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ value: biometrics.isBiometricsEnabled, onValueChange: onUseBiometricSwitch }}
|
||||
switch={{ onValueChange: onEncryptStorageSwitch, value: storageIsEncryptedSwitchEnabled }}
|
||||
/>
|
||||
<BlueCard>
|
||||
<BlueText>{loc.formatString(loc.settings.encrypt_use_expl, { type: biometrics.biometricsType })}</BlueText>
|
||||
</BlueCard>
|
||||
<BlueSpacing20 />
|
||||
{storageIsEncryptedSwitchEnabled && (
|
||||
<ListItem
|
||||
onPress={navigateToPlausibleDeniability}
|
||||
title={loc.settings.plausible_deniability}
|
||||
chevron
|
||||
testID="PlausibleDeniabilityButton"
|
||||
Component={TouchableOpacity}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<Text adjustsFontSizeToFit style={[styles.headerText, styleHooks.headerText]}>
|
||||
{loc.settings.encrypt_tstorage}
|
||||
</Text>
|
||||
<ListItem
|
||||
testID="EncyptedAndPasswordProtected"
|
||||
hideChevron
|
||||
title={loc.settings.encrypt_enc_and_pass}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={{ onValueChange: onEncryptStorageSwitch, value: storageIsEncryptedSwitchEnabled }}
|
||||
/>
|
||||
{storageIsEncryptedSwitchEnabled && (
|
||||
<ListItem
|
||||
onPress={navigateToPlausibleDeniability}
|
||||
title={loc.settings.plausible_deniability}
|
||||
chevron
|
||||
testID="PlausibleDeniabilityButton"
|
||||
Component={TouchableOpacity}
|
||||
/>
|
||||
)}
|
||||
{isLoading && <BlueLoading />}
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
paddingTop: { paddingTop: 19 },
|
||||
paddingTop: { paddingTop: 36 },
|
||||
headerText: {
|
||||
fontWeight: 'bold',
|
||||
fontSize: 30,
|
||||
|
|
Loading…
Add table
Reference in a new issue