@bifold/core 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/forms/WalletNameForm.js +152 -0
- package/lib/commonjs/components/forms/WalletNameForm.js.map +1 -0
- package/lib/commonjs/components/inputs/BiometryControl.js.map +1 -1
- package/lib/commonjs/components/misc/CredentialCard.js +3 -2
- package/lib/commonjs/components/misc/CredentialCard.js.map +1 -1
- package/lib/commonjs/components/misc/FauxHeader.js +89 -0
- package/lib/commonjs/components/misc/FauxHeader.js.map +1 -0
- package/lib/commonjs/components/misc/QRScanner.js +2 -2
- package/lib/commonjs/components/misc/QRScanner.js.map +1 -1
- package/lib/commonjs/components/modals/DeveloperModal.js +43 -0
- package/lib/commonjs/components/modals/DeveloperModal.js.map +1 -0
- package/lib/commonjs/components/views/PushNotificationsContent.js.map +1 -1
- package/lib/commonjs/components/views/PushNotificationsDisabledContent.js.map +1 -1
- package/lib/commonjs/contexts/auth.js +24 -3
- package/lib/commonjs/contexts/auth.js.map +1 -1
- package/lib/commonjs/hooks/chat-messages.js +1 -1
- package/lib/commonjs/hooks/chat-messages.js.map +1 -1
- package/lib/commonjs/hooks/developer-mode.js +31 -0
- package/lib/commonjs/hooks/developer-mode.js.map +1 -0
- package/lib/commonjs/hooks/lockout.js +80 -0
- package/lib/commonjs/hooks/lockout.js.map +1 -0
- package/lib/commonjs/hooks/onboarding.js +23 -0
- package/lib/commonjs/hooks/onboarding.js.map +1 -0
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/localization/en/index.js +2 -1
- package/lib/commonjs/localization/en/index.js.map +1 -1
- package/lib/commonjs/localization/fr/index.js +2 -1
- package/lib/commonjs/localization/fr/index.js.map +1 -1
- package/lib/commonjs/localization/pt-br/index.js +2 -1
- package/lib/commonjs/localization/pt-br/index.js.map +1 -1
- package/lib/commonjs/modules/openid/components/OpenIDCredentialCard.js +4 -5
- package/lib/commonjs/modules/openid/components/OpenIDCredentialCard.js.map +1 -1
- package/lib/commonjs/modules/openid/display.js +6 -3
- package/lib/commonjs/modules/openid/display.js.map +1 -1
- package/lib/commonjs/modules/openid/metadata.js +2 -1
- package/lib/commonjs/modules/openid/metadata.js.map +1 -1
- package/lib/commonjs/modules/openid/screens/OpenIDProofChangeCredential.js +128 -0
- package/lib/commonjs/modules/openid/screens/OpenIDProofChangeCredential.js.map +1 -0
- package/lib/commonjs/modules/openid/screens/OpenIDProofPresentation.js +99 -44
- package/lib/commonjs/modules/openid/screens/OpenIDProofPresentation.js.map +1 -1
- package/lib/commonjs/modules/openid/types.js.map +1 -1
- package/lib/commonjs/modules/openid/utils/utils.js +0 -14
- package/lib/commonjs/modules/openid/utils/utils.js.map +1 -1
- package/lib/commonjs/navigators/ConnectStack.js +4 -4
- package/lib/commonjs/navigators/ConnectStack.js.map +1 -1
- package/lib/commonjs/navigators/DeliveryStack.js +8 -0
- package/lib/commonjs/navigators/DeliveryStack.js.map +1 -1
- package/lib/commonjs/navigators/OnboardingScreens.js +0 -8
- package/lib/commonjs/navigators/OnboardingScreens.js.map +1 -1
- package/lib/commonjs/navigators/OnboardingStack.js +3 -4
- package/lib/commonjs/navigators/OnboardingStack.js.map +1 -1
- package/lib/commonjs/navigators/SettingStack.js +4 -4
- package/lib/commonjs/navigators/SettingStack.js.map +1 -1
- package/lib/commonjs/navigators/TabStack.js +11 -4
- package/lib/commonjs/navigators/TabStack.js.map +1 -1
- package/lib/commonjs/navigators/defaultStackOptions.js +6 -1
- package/lib/commonjs/navigators/defaultStackOptions.js.map +1 -1
- package/lib/commonjs/screens/Biometry.js.map +1 -1
- package/lib/commonjs/screens/NameWallet.js +3 -149
- package/lib/commonjs/screens/NameWallet.js.map +1 -1
- package/lib/commonjs/screens/OnboardingPages.js +8 -38
- package/lib/commonjs/screens/OnboardingPages.js.map +1 -1
- package/lib/commonjs/screens/PINChange.js +5 -1
- package/lib/commonjs/screens/PINChange.js.map +1 -1
- package/lib/commonjs/screens/PINCreate.js +4 -1
- package/lib/commonjs/screens/PINCreate.js.map +1 -1
- package/lib/commonjs/screens/PINEnter.js +114 -292
- package/lib/commonjs/screens/PINEnter.js.map +1 -1
- package/lib/commonjs/screens/PINVerify.js +181 -0
- package/lib/commonjs/screens/PINVerify.js.map +1 -0
- package/lib/commonjs/screens/ProofRequest.js +9 -9
- package/lib/commonjs/screens/ProofRequest.js.map +1 -1
- package/lib/commonjs/screens/PushNotifications.js.map +1 -1
- package/lib/commonjs/screens/RenameWallet.js +33 -0
- package/lib/commonjs/screens/RenameWallet.js.map +1 -0
- package/lib/commonjs/screens/Settings.js +13 -19
- package/lib/commonjs/screens/Settings.js.map +1 -1
- package/lib/commonjs/screens/ToggleBiometry.js +16 -24
- package/lib/commonjs/screens/ToggleBiometry.js.map +1 -1
- package/lib/commonjs/theme.js +2 -1
- package/lib/commonjs/theme.js.map +1 -1
- package/lib/commonjs/types/navigators.js +2 -0
- package/lib/commonjs/types/navigators.js.map +1 -1
- package/lib/commonjs/utils/oca.js +46 -17
- package/lib/commonjs/utils/oca.js.map +1 -1
- package/lib/module/components/forms/WalletNameForm.js +143 -0
- package/lib/module/components/forms/WalletNameForm.js.map +1 -0
- package/lib/module/components/inputs/BiometryControl.js.map +1 -1
- package/lib/module/components/misc/CredentialCard.js +3 -2
- package/lib/module/components/misc/CredentialCard.js.map +1 -1
- package/lib/module/components/misc/FauxHeader.js +80 -0
- package/lib/module/components/misc/FauxHeader.js.map +1 -0
- package/lib/module/components/misc/QRScanner.js +2 -2
- package/lib/module/components/misc/QRScanner.js.map +1 -1
- package/lib/module/components/modals/DeveloperModal.js +36 -0
- package/lib/module/components/modals/DeveloperModal.js.map +1 -0
- package/lib/module/components/views/PushNotificationsContent.js.map +1 -1
- package/lib/module/components/views/PushNotificationsDisabledContent.js.map +1 -1
- package/lib/module/contexts/auth.js +22 -1
- package/lib/module/contexts/auth.js.map +1 -1
- package/lib/module/hooks/chat-messages.js +1 -1
- package/lib/module/hooks/chat-messages.js.map +1 -1
- package/lib/module/hooks/developer-mode.js +24 -0
- package/lib/module/hooks/developer-mode.js.map +1 -0
- package/lib/module/hooks/lockout.js +70 -0
- package/lib/module/hooks/lockout.js.map +1 -0
- package/lib/module/hooks/onboarding.js +16 -0
- package/lib/module/hooks/onboarding.js.map +1 -0
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/localization/en/index.js +2 -1
- package/lib/module/localization/en/index.js.map +1 -1
- package/lib/module/localization/fr/index.js +2 -1
- package/lib/module/localization/fr/index.js.map +1 -1
- package/lib/module/localization/pt-br/index.js +2 -1
- package/lib/module/localization/pt-br/index.js.map +1 -1
- package/lib/module/modules/openid/components/OpenIDCredentialCard.js +4 -4
- package/lib/module/modules/openid/components/OpenIDCredentialCard.js.map +1 -1
- package/lib/module/modules/openid/display.js +6 -3
- package/lib/module/modules/openid/display.js.map +1 -1
- package/lib/module/modules/openid/metadata.js +2 -1
- package/lib/module/modules/openid/metadata.js.map +1 -1
- package/lib/module/modules/openid/screens/OpenIDProofChangeCredential.js +121 -0
- package/lib/module/modules/openid/screens/OpenIDProofChangeCredential.js.map +1 -0
- package/lib/module/modules/openid/screens/OpenIDProofPresentation.js +100 -45
- package/lib/module/modules/openid/screens/OpenIDProofPresentation.js.map +1 -1
- package/lib/module/modules/openid/types.js.map +1 -1
- package/lib/module/modules/openid/utils/utils.js +1 -12
- package/lib/module/modules/openid/utils/utils.js.map +1 -1
- package/lib/module/navigators/ConnectStack.js +4 -4
- package/lib/module/navigators/ConnectStack.js.map +1 -1
- package/lib/module/navigators/DeliveryStack.js +8 -0
- package/lib/module/navigators/DeliveryStack.js.map +1 -1
- package/lib/module/navigators/OnboardingScreens.js +0 -8
- package/lib/module/navigators/OnboardingScreens.js.map +1 -1
- package/lib/module/navigators/OnboardingStack.js +4 -5
- package/lib/module/navigators/OnboardingStack.js.map +1 -1
- package/lib/module/navigators/SettingStack.js +4 -4
- package/lib/module/navigators/SettingStack.js.map +1 -1
- package/lib/module/navigators/TabStack.js +11 -4
- package/lib/module/navigators/TabStack.js.map +1 -1
- package/lib/module/navigators/defaultStackOptions.js +6 -1
- package/lib/module/navigators/defaultStackOptions.js.map +1 -1
- package/lib/module/screens/Biometry.js.map +1 -1
- package/lib/module/screens/NameWallet.js +3 -147
- package/lib/module/screens/NameWallet.js.map +1 -1
- package/lib/module/screens/OnboardingPages.js +8 -38
- package/lib/module/screens/OnboardingPages.js.map +1 -1
- package/lib/module/screens/PINChange.js +5 -1
- package/lib/module/screens/PINChange.js.map +1 -1
- package/lib/module/screens/PINCreate.js +4 -1
- package/lib/module/screens/PINCreate.js.map +1 -1
- package/lib/module/screens/PINEnter.js +116 -294
- package/lib/module/screens/PINEnter.js.map +1 -1
- package/lib/module/screens/PINVerify.js +172 -0
- package/lib/module/screens/PINVerify.js.map +1 -0
- package/lib/module/screens/ProofRequest.js +9 -9
- package/lib/module/screens/ProofRequest.js.map +1 -1
- package/lib/module/screens/PushNotifications.js.map +1 -1
- package/lib/module/screens/RenameWallet.js +24 -0
- package/lib/module/screens/RenameWallet.js.map +1 -0
- package/lib/module/screens/Settings.js +12 -18
- package/lib/module/screens/Settings.js.map +1 -1
- package/lib/module/screens/ToggleBiometry.js +15 -23
- package/lib/module/screens/ToggleBiometry.js.map +1 -1
- package/lib/module/theme.js +2 -1
- package/lib/module/theme.js.map +1 -1
- package/lib/module/types/navigators.js +2 -0
- package/lib/module/types/navigators.js.map +1 -1
- package/lib/module/utils/oca.js +43 -15
- package/lib/module/utils/oca.js.map +1 -1
- package/lib/typescript/src/components/forms/WalletNameForm.d.ts +9 -0
- package/lib/typescript/src/components/forms/WalletNameForm.d.ts.map +1 -0
- package/lib/typescript/src/components/inputs/BiometryControl.d.ts.map +1 -1
- package/lib/typescript/src/components/misc/CredentialCard.d.ts.map +1 -1
- package/lib/typescript/src/components/misc/FauxHeader.d.ts +8 -0
- package/lib/typescript/src/components/misc/FauxHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/modals/DeveloperModal.d.ts +7 -0
- package/lib/typescript/src/components/modals/DeveloperModal.d.ts.map +1 -0
- package/lib/typescript/src/contexts/auth.d.ts +1 -0
- package/lib/typescript/src/contexts/auth.d.ts.map +1 -1
- package/lib/typescript/src/hooks/developer-mode.d.ts +4 -0
- package/lib/typescript/src/hooks/developer-mode.d.ts.map +1 -0
- package/lib/typescript/src/hooks/lockout.d.ts +9 -0
- package/lib/typescript/src/hooks/lockout.d.ts.map +1 -0
- package/lib/typescript/src/hooks/onboarding.d.ts +2 -0
- package/lib/typescript/src/hooks/onboarding.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/en/index.d.ts +1 -0
- package/lib/typescript/src/localization/en/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/fr/index.d.ts +1 -0
- package/lib/typescript/src/localization/fr/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/pt-br/index.d.ts +1 -0
- package/lib/typescript/src/localization/pt-br/index.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/components/OpenIDCredentialCard.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/display.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/metadata.d.ts +8 -1
- package/lib/typescript/src/modules/openid/metadata.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/screens/OpenIDProofChangeCredential.d.ts +6 -0
- package/lib/typescript/src/modules/openid/screens/OpenIDProofChangeCredential.d.ts.map +1 -0
- package/lib/typescript/src/modules/openid/screens/OpenIDProofPresentation.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/types.d.ts +9 -0
- package/lib/typescript/src/modules/openid/types.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/utils/utils.d.ts +1 -3
- package/lib/typescript/src/modules/openid/utils/utils.d.ts.map +1 -1
- package/lib/typescript/src/navigators/DeliveryStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/OnboardingScreens.d.ts +0 -1
- package/lib/typescript/src/navigators/OnboardingScreens.d.ts.map +1 -1
- package/lib/typescript/src/navigators/OnboardingStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/TabStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/defaultStackOptions.d.ts.map +1 -1
- package/lib/typescript/src/screens/Biometry.d.ts.map +1 -1
- package/lib/typescript/src/screens/NameWallet.d.ts.map +1 -1
- package/lib/typescript/src/screens/OnboardingPages.d.ts +1 -1
- package/lib/typescript/src/screens/OnboardingPages.d.ts.map +1 -1
- package/lib/typescript/src/screens/PINChange.d.ts.map +1 -1
- package/lib/typescript/src/screens/PINCreate.d.ts.map +1 -1
- package/lib/typescript/src/screens/PINEnter.d.ts +0 -7
- package/lib/typescript/src/screens/PINEnter.d.ts.map +1 -1
- package/lib/typescript/src/screens/PINVerify.d.ts +13 -0
- package/lib/typescript/src/screens/PINVerify.d.ts.map +1 -0
- package/lib/typescript/src/screens/RenameWallet.d.ts +4 -0
- package/lib/typescript/src/screens/RenameWallet.d.ts.map +1 -0
- package/lib/typescript/src/screens/Settings.d.ts.map +1 -1
- package/lib/typescript/src/screens/ToggleBiometry.d.ts.map +1 -1
- package/lib/typescript/src/theme.d.ts +10 -25
- package/lib/typescript/src/theme.d.ts.map +1 -1
- package/lib/typescript/src/types/navigators.d.ts +17 -3
- package/lib/typescript/src/types/navigators.d.ts.map +1 -1
- package/lib/typescript/src/utils/oca.d.ts +7 -2
- package/lib/typescript/src/utils/oca.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/forms/WalletNameForm.tsx +148 -0
- package/src/components/inputs/BiometryControl.tsx +16 -13
- package/src/components/misc/CredentialCard.tsx +5 -2
- package/src/components/misc/FauxHeader.tsx +75 -0
- package/src/components/misc/QRScanner.tsx +2 -2
- package/src/components/modals/DeveloperModal.tsx +30 -0
- package/src/components/views/PushNotificationsContent.tsx +15 -15
- package/src/components/views/PushNotificationsDisabledContent.tsx +10 -10
- package/src/contexts/auth.tsx +33 -1
- package/src/hooks/chat-messages.tsx +1 -1
- package/src/hooks/developer-mode.ts +25 -0
- package/src/hooks/lockout.ts +77 -0
- package/src/hooks/onboarding.ts +16 -0
- package/src/hooks/usePINValidation.ts +3 -3
- package/src/index.ts +7 -0
- package/src/localization/en/index.ts +1 -0
- package/src/localization/fr/index.ts +1 -0
- package/src/localization/pt-br/index.ts +1 -0
- package/src/modules/openid/components/OpenIDCredentialCard.tsx +3 -4
- package/src/modules/openid/display.tsx +3 -0
- package/src/modules/openid/metadata.tsx +7 -1
- package/src/modules/openid/screens/OpenIDProofChangeCredential.tsx +132 -0
- package/src/modules/openid/screens/OpenIDProofPresentation.tsx +131 -59
- package/src/modules/openid/types.tsx +8 -0
- package/src/modules/openid/utils/utils.tsx +0 -14
- package/src/navigators/ConnectStack.tsx +4 -4
- package/src/navigators/DeliveryStack.tsx +9 -0
- package/src/navigators/OnboardingScreens.ts +0 -10
- package/src/navigators/OnboardingStack.tsx +2 -6
- package/src/navigators/RootStack.tsx +1 -1
- package/src/navigators/SettingStack.tsx +4 -4
- package/src/navigators/TabStack.tsx +3 -2
- package/src/navigators/defaultStackOptions.tsx +5 -0
- package/src/screens/Biometry.tsx +1 -4
- package/src/screens/NameWallet.tsx +3 -152
- package/src/screens/OnboardingPages.tsx +9 -61
- package/src/screens/PINChange.tsx +6 -9
- package/src/screens/PINCreate.tsx +7 -18
- package/src/screens/PINEnter.tsx +114 -361
- package/src/screens/PINVerify.tsx +193 -0
- package/src/screens/ProofRequest.tsx +9 -9
- package/src/screens/PushNotifications.tsx +2 -2
- package/src/screens/RenameWallet.tsx +25 -0
- package/src/screens/Settings.tsx +11 -22
- package/src/screens/ToggleBiometry.tsx +20 -34
- package/src/theme.ts +34 -3
- package/src/types/navigators.ts +21 -3
- package/src/utils/oca.ts +60 -19
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Agent } from '@credo-ts/core'
|
|
3
3
|
import { StackActions, useNavigation, useNavigationState } from '@react-navigation/native'
|
|
4
4
|
import { StackNavigationProp, createStackNavigator } from '@react-navigation/stack'
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useCallback, useEffect, useMemo } from 'react'
|
|
6
6
|
import { useTranslation } from 'react-i18next'
|
|
7
7
|
import { DeviceEventEmitter } from 'react-native'
|
|
8
8
|
|
|
@@ -18,10 +18,10 @@ import { createCarouselStyle } from '../screens/OnboardingPages'
|
|
|
18
18
|
import PINCreate from '../screens/PINCreate'
|
|
19
19
|
import PINEnter from '../screens/PINEnter'
|
|
20
20
|
import PushNotifications from '../screens/PushNotifications'
|
|
21
|
+
import { Config } from '../types/config'
|
|
21
22
|
import { OnboardingStackParams } from '../types/navigators'
|
|
22
23
|
import { WalletSecret } from '../types/security'
|
|
23
24
|
import { State } from '../types/state'
|
|
24
|
-
import { Config } from '../types/config'
|
|
25
25
|
|
|
26
26
|
import { useDefaultStackOptions } from './defaultStackOptions'
|
|
27
27
|
import { getOnboardingScreens } from './OnboardingScreens'
|
|
@@ -44,7 +44,6 @@ const OnboardingStack: React.FC<OnboardingStackProps> = ({ initializeAgent, agen
|
|
|
44
44
|
pages,
|
|
45
45
|
Biometry,
|
|
46
46
|
Onboarding,
|
|
47
|
-
Developer,
|
|
48
47
|
{ screen: Terms, version: termsVersion },
|
|
49
48
|
onTutorialCompletedCurried,
|
|
50
49
|
ScreenOptionsDictionary,
|
|
@@ -58,7 +57,6 @@ const OnboardingStack: React.FC<OnboardingStackProps> = ({ initializeAgent, agen
|
|
|
58
57
|
TOKENS.SCREEN_ONBOARDING_PAGES,
|
|
59
58
|
TOKENS.SCREEN_BIOMETRY,
|
|
60
59
|
TOKENS.SCREEN_ONBOARDING,
|
|
61
|
-
TOKENS.SCREEN_DEVELOPER,
|
|
62
60
|
TOKENS.SCREEN_TERMS,
|
|
63
61
|
TOKENS.FN_ONBOARDING_DONE,
|
|
64
62
|
TOKENS.OBJECT_SCREEN_CONFIG,
|
|
@@ -172,7 +170,6 @@ const OnboardingStack: React.FC<OnboardingStackProps> = ({ initializeAgent, agen
|
|
|
172
170
|
NameWallet,
|
|
173
171
|
Biometry,
|
|
174
172
|
PushNotifications,
|
|
175
|
-
Developer,
|
|
176
173
|
AttemptLockout,
|
|
177
174
|
OnboardingScreen,
|
|
178
175
|
CreatePINScreen,
|
|
@@ -181,7 +178,6 @@ const OnboardingStack: React.FC<OnboardingStackProps> = ({ initializeAgent, agen
|
|
|
181
178
|
[
|
|
182
179
|
SplashScreen,
|
|
183
180
|
CreatePINScreen,
|
|
184
|
-
Developer,
|
|
185
181
|
EnterPINScreen,
|
|
186
182
|
OnboardingScreen,
|
|
187
183
|
Preface,
|
|
@@ -45,7 +45,7 @@ const RootStack: React.FC = () => {
|
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
// Load state only if it hasn't been loaded yet
|
|
47
47
|
if (store.stateLoaded) return
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
loadState(dispatch).catch((err: unknown) => {
|
|
50
50
|
const error = new BifoldError(t('Error.Title1044'), t('Error.Message1044'), (err as Error).message, 1001)
|
|
51
51
|
|
|
@@ -6,7 +6,7 @@ import { useTheme } from '../contexts/theme'
|
|
|
6
6
|
import HistorySettings from '../modules/history/ui/HistorySettings'
|
|
7
7
|
import DataRetention from '../screens/DataRetention'
|
|
8
8
|
import Language from '../screens/Language'
|
|
9
|
-
import
|
|
9
|
+
import RenameWallet from '../screens/RenameWallet'
|
|
10
10
|
import Onboarding from '../screens/Onboarding'
|
|
11
11
|
import { createCarouselStyle } from '../screens/OnboardingPages'
|
|
12
12
|
import PINChange from '../screens/PINChange'
|
|
@@ -47,12 +47,12 @@ const SettingStack: React.FC = () => {
|
|
|
47
47
|
}}
|
|
48
48
|
/>
|
|
49
49
|
<Stack.Screen
|
|
50
|
-
name={Screens.
|
|
51
|
-
component={
|
|
50
|
+
name={Screens.RenameWallet}
|
|
51
|
+
component={RenameWallet}
|
|
52
52
|
options={{
|
|
53
53
|
title: t('Screens.NameWallet'),
|
|
54
54
|
headerBackTestID: testIdWithKey('Back'),
|
|
55
|
-
...ScreenOptionsDictionary[Screens.
|
|
55
|
+
...ScreenOptionsDictionary[Screens.RenameWallet],
|
|
56
56
|
}}
|
|
57
57
|
/>
|
|
58
58
|
<Stack.Screen
|
|
@@ -61,7 +61,7 @@ const TabStack: React.FC = () => {
|
|
|
61
61
|
const { t } = useTranslation()
|
|
62
62
|
const Tab = createBottomTabNavigator<TabStackParams>()
|
|
63
63
|
const { assertNetworkConnected } = useNetwork()
|
|
64
|
-
const { ColorPallet, TabTheme, TextTheme, Assets } = useTheme()
|
|
64
|
+
const { ColorPallet, TabTheme, TextTheme, Assets, NavigationTheme } = useTheme()
|
|
65
65
|
const [orientation, setOrientation] = useState(OrientationType.PORTRAIT)
|
|
66
66
|
const [store, dispatch] = useStore()
|
|
67
67
|
const { agent } = useAgent()
|
|
@@ -133,7 +133,7 @@ const TabStack: React.FC = () => {
|
|
|
133
133
|
}, [store.deepLink, agent, store.authentication.didAuthenticate, handleDeepLink])
|
|
134
134
|
|
|
135
135
|
return (
|
|
136
|
-
<SafeAreaView style={{ flex: 1, backgroundColor:
|
|
136
|
+
<SafeAreaView style={{ flex: 1, backgroundColor: NavigationTheme.colors.primary }} edges={['left', 'right', 'top']}>
|
|
137
137
|
<Tab.Navigator
|
|
138
138
|
initialRouteName={TabStacks.HomeStack}
|
|
139
139
|
screenOptions={{
|
|
@@ -296,6 +296,7 @@ const TabStack: React.FC = () => {
|
|
|
296
296
|
}}
|
|
297
297
|
/>
|
|
298
298
|
</Tab.Navigator>
|
|
299
|
+
<SafeAreaView style={{ backgroundColor: TabTheme.tabBarSecondaryBackgroundColor }} edges={['bottom']} />
|
|
299
300
|
</SafeAreaView>
|
|
300
301
|
)
|
|
301
302
|
}
|
|
@@ -34,6 +34,10 @@ export const DefaultScreenOptionsDictionary: ScreenOptionsType = {
|
|
|
34
34
|
headerTintColor: OnboardingTheme.headerTintColor,
|
|
35
35
|
headerBackTestID: testIdWithKey('Back'),
|
|
36
36
|
},
|
|
37
|
+
[Screens.RenameWallet]: {
|
|
38
|
+
headerTintColor: OnboardingTheme.headerTintColor,
|
|
39
|
+
headerBackTestID: testIdWithKey('Back'),
|
|
40
|
+
},
|
|
37
41
|
[Screens.Biometry]: {
|
|
38
42
|
headerTintColor: OnboardingTheme.headerTintColor,
|
|
39
43
|
headerBackTestID: testIdWithKey('Back'),
|
|
@@ -62,6 +66,7 @@ export const DefaultScreenOptionsDictionary: ScreenOptionsType = {
|
|
|
62
66
|
},
|
|
63
67
|
[Screens.OpenIDProofPresentation]: {
|
|
64
68
|
headerShown: true,
|
|
69
|
+
headerRight: () => false,
|
|
65
70
|
},
|
|
66
71
|
}
|
|
67
72
|
|
package/src/screens/Biometry.tsx
CHANGED
|
@@ -34,10 +34,7 @@ const Biometry: React.FC = () => {
|
|
|
34
34
|
}, [])
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
|
-
<BiometryControl
|
|
38
|
-
biometryEnabled={biometryEnabled}
|
|
39
|
-
onBiometryToggle={handleBiometryToggle}
|
|
40
|
-
>
|
|
37
|
+
<BiometryControl biometryEnabled={biometryEnabled} onBiometryToggle={handleBiometryToggle}>
|
|
41
38
|
<View style={{ marginTop: 'auto', margin: 20 }}>
|
|
42
39
|
<Button
|
|
43
40
|
title={t('Global.Continue')}
|
|
@@ -1,159 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useNavigation } from '@react-navigation/native'
|
|
3
|
-
import React, { useState } from 'react'
|
|
4
|
-
import { useTranslation } from 'react-i18next'
|
|
5
|
-
import { StyleSheet, View } from 'react-native'
|
|
1
|
+
import React from 'react'
|
|
6
2
|
|
|
7
|
-
import
|
|
8
|
-
import Button, { ButtonType } from '../components/buttons/Button'
|
|
9
|
-
import LimitedTextInput from '../components/inputs/LimitedTextInput'
|
|
10
|
-
import { InfoBoxType } from '../components/misc/InfoBox'
|
|
11
|
-
import PopupModal from '../components/modals/PopupModal'
|
|
12
|
-
import KeyboardView from '../components/views/KeyboardView'
|
|
13
|
-
import { DispatchAction } from '../contexts/reducers/store'
|
|
14
|
-
import { useStore } from '../contexts/store'
|
|
15
|
-
import { useTheme } from '../contexts/theme'
|
|
16
|
-
import { generateRandomWalletName } from '../utils/helpers'
|
|
17
|
-
import { testIdWithKey } from '../utils/testable'
|
|
18
|
-
import { ThemedText } from '../components/texts/ThemedText'
|
|
19
|
-
|
|
20
|
-
type ErrorState = {
|
|
21
|
-
visible: boolean
|
|
22
|
-
title: string
|
|
23
|
-
description: string
|
|
24
|
-
}
|
|
3
|
+
import WalletNameForm from '../components/forms/WalletNameForm'
|
|
25
4
|
|
|
26
5
|
const NameWallet: React.FC = () => {
|
|
27
|
-
const { t } = useTranslation()
|
|
28
|
-
const { ColorPallet, Assets } = useTheme()
|
|
29
|
-
const navigation = useNavigation()
|
|
30
|
-
const [store, dispatch] = useStore()
|
|
31
|
-
const { agent } = useAgent()
|
|
32
|
-
const [walletName, setWalletName] = useState(store.preferences.walletName ?? generateRandomWalletName())
|
|
33
|
-
const [loading, setLoading] = useState(false)
|
|
34
|
-
const didCompleteOnboarding = store.onboarding.didCompleteOnboarding
|
|
35
|
-
|
|
36
|
-
const [errorState, setErrorState] = useState<ErrorState>({
|
|
37
|
-
visible: false,
|
|
38
|
-
title: '',
|
|
39
|
-
description: '',
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const styles = StyleSheet.create({
|
|
43
|
-
screenContainer: {
|
|
44
|
-
height: '100%',
|
|
45
|
-
backgroundColor: ColorPallet.brand.primaryBackground,
|
|
46
|
-
padding: 20,
|
|
47
|
-
justifyContent: 'space-between',
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
contentContainer: {
|
|
51
|
-
justifyContent: 'center',
|
|
52
|
-
alignItems: 'center',
|
|
53
|
-
width: '100%',
|
|
54
|
-
},
|
|
55
|
-
// below used as helpful label for view, no properties needed atp
|
|
56
|
-
controlsContainer: {},
|
|
57
|
-
|
|
58
|
-
buttonContainer: {
|
|
59
|
-
width: '100%',
|
|
60
|
-
},
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const handleChangeText = (text: string) => {
|
|
64
|
-
setWalletName(text)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const handleCancelPressed = () => {
|
|
68
|
-
navigation.goBack()
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const handleContinuePressed = () => {
|
|
72
|
-
if (walletName.length < 1) {
|
|
73
|
-
setErrorState({
|
|
74
|
-
title: t('NameWallet.EmptyNameTitle'),
|
|
75
|
-
description: t('NameWallet.EmptyNameDescription'),
|
|
76
|
-
visible: true,
|
|
77
|
-
})
|
|
78
|
-
} else if (walletName.length > 50) {
|
|
79
|
-
setErrorState({
|
|
80
|
-
title: t('NameWallet.CharCountTitle'),
|
|
81
|
-
description: t('NameWallet.CharCountDescription'),
|
|
82
|
-
visible: true,
|
|
83
|
-
})
|
|
84
|
-
} else {
|
|
85
|
-
setLoading(true)
|
|
86
|
-
|
|
87
|
-
dispatch({
|
|
88
|
-
type: DispatchAction.UPDATE_WALLET_NAME,
|
|
89
|
-
payload: [walletName],
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
if (agent) {
|
|
93
|
-
agent.config.label = walletName
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
dispatch({ type: DispatchAction.DID_NAME_WALLET })
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const handleDismissError = () => {
|
|
101
|
-
setErrorState((prev) => ({ ...prev, visible: false }))
|
|
102
|
-
}
|
|
103
|
-
|
|
104
6
|
return (
|
|
105
|
-
<
|
|
106
|
-
<View style={styles.screenContainer}>
|
|
107
|
-
<View style={styles.contentContainer}>
|
|
108
|
-
<Assets.svg.contactBook height={100} style={{ marginVertical: 20 }} />
|
|
109
|
-
<ThemedText style={{ width: '100%', marginBottom: 16 }}>{t('NameWallet.ThisIsTheName')}</ThemedText>
|
|
110
|
-
<View style={{ width: '100%' }}>
|
|
111
|
-
<LimitedTextInput
|
|
112
|
-
defaultValue={walletName}
|
|
113
|
-
label={t('NameWallet.NameYourWallet')}
|
|
114
|
-
limit={50}
|
|
115
|
-
handleChangeText={handleChangeText}
|
|
116
|
-
accessibilityLabel={t('NameWallet.NameYourWallet')}
|
|
117
|
-
testID={testIdWithKey('NameInput')}
|
|
118
|
-
/>
|
|
119
|
-
</View>
|
|
120
|
-
</View>
|
|
121
|
-
<View style={styles.controlsContainer}>
|
|
122
|
-
<View style={styles.buttonContainer}>
|
|
123
|
-
<Button
|
|
124
|
-
title={didCompleteOnboarding ? t('Global.Save') : t('Global.Continue')}
|
|
125
|
-
buttonType={ButtonType.Primary}
|
|
126
|
-
testID={didCompleteOnboarding ? testIdWithKey('Save') : testIdWithKey('Continue')}
|
|
127
|
-
accessibilityLabel={didCompleteOnboarding ? t('Global.Save') : t('Global.Continue')}
|
|
128
|
-
onPress={handleContinuePressed}
|
|
129
|
-
disabled={loading}
|
|
130
|
-
>
|
|
131
|
-
{loading && <ButtonLoading />}
|
|
132
|
-
</Button>
|
|
133
|
-
{didCompleteOnboarding && (
|
|
134
|
-
<View style={{ marginTop: 15 }}>
|
|
135
|
-
<Button
|
|
136
|
-
title={t('Global.Cancel')}
|
|
137
|
-
buttonType={ButtonType.Secondary}
|
|
138
|
-
testID={testIdWithKey('Cancel')}
|
|
139
|
-
accessibilityLabel={t('Global.Cancel')}
|
|
140
|
-
onPress={handleCancelPressed}
|
|
141
|
-
/>
|
|
142
|
-
</View>
|
|
143
|
-
)}
|
|
144
|
-
</View>
|
|
145
|
-
</View>
|
|
146
|
-
</View>
|
|
147
|
-
{errorState.visible && (
|
|
148
|
-
<PopupModal
|
|
149
|
-
notificationType={InfoBoxType.Info}
|
|
150
|
-
onCallToActionLabel={t('Global.Okay')}
|
|
151
|
-
onCallToActionPressed={handleDismissError}
|
|
152
|
-
title={errorState.title}
|
|
153
|
-
description={errorState.description}
|
|
154
|
-
/>
|
|
155
|
-
)}
|
|
156
|
-
</KeyboardView>
|
|
7
|
+
<WalletNameForm />
|
|
157
8
|
)
|
|
158
9
|
}
|
|
159
10
|
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { StackNavigationProp } from '@react-navigation/stack'
|
|
3
|
-
import React, { useRef } from 'react'
|
|
1
|
+
import React from 'react'
|
|
4
2
|
import { useTranslation } from 'react-i18next'
|
|
5
|
-
import { ScrollView, StyleSheet, View
|
|
3
|
+
import { ScrollView, StyleSheet, View } from 'react-native'
|
|
6
4
|
import { SvgProps } from 'react-native-svg'
|
|
7
5
|
|
|
8
6
|
import CredentialList from '../assets/img/credential-list.svg'
|
|
9
7
|
import ScanShare from '../assets/img/scan-share.svg'
|
|
10
8
|
import Button, { ButtonType } from '../components/buttons/Button'
|
|
11
|
-
import { DispatchAction } from '../contexts/reducers/store'
|
|
12
|
-
import { useStore } from '../contexts/store'
|
|
13
9
|
import { GenericFn } from '../types/fn'
|
|
14
|
-
import { OnboardingStackParams, Screens } from '../types/navigators'
|
|
15
10
|
import { testIdWithKey } from '../utils/testable'
|
|
16
11
|
|
|
17
12
|
import { useTheme } from '../contexts/theme'
|
|
18
13
|
|
|
19
|
-
import { OnboardingStyleSheet } from './Onboarding'
|
|
20
14
|
import { ThemedText } from '../components/texts/ThemedText'
|
|
15
|
+
import { OnboardingStyleSheet } from './Onboarding'
|
|
21
16
|
|
|
22
17
|
export const createCarouselStyle = (OnboardingTheme: any) => {
|
|
23
18
|
return StyleSheet.create<OnboardingStyleSheet>({
|
|
@@ -136,32 +131,17 @@ const guides: Array<{ image: React.FC<SvgProps>; title: string; body: string; de
|
|
|
136
131
|
},
|
|
137
132
|
]
|
|
138
133
|
|
|
139
|
-
export const createPageWith = (
|
|
140
|
-
PageImage: React.FC<SvgProps>,
|
|
141
|
-
title: string,
|
|
142
|
-
body: string,
|
|
143
|
-
OnboardingTheme: any,
|
|
144
|
-
devModeListener?: boolean,
|
|
145
|
-
onDevModeTouched?: () => void
|
|
146
|
-
) => {
|
|
134
|
+
export const createPageWith = (PageImage: React.FC<SvgProps>, title: string, body: string, OnboardingTheme: any) => {
|
|
147
135
|
const styles = createStyles(OnboardingTheme)
|
|
148
136
|
const imageDisplayOptions = createImageDisplayOptions(OnboardingTheme)
|
|
149
|
-
|
|
150
|
-
<ThemedText style={styles.headerText} testID={testIdWithKey('HeaderText')}>
|
|
151
|
-
{title}
|
|
152
|
-
</ThemedText>
|
|
153
|
-
)
|
|
137
|
+
|
|
154
138
|
return (
|
|
155
139
|
<ScrollView style={{ padding: 20 }}>
|
|
156
140
|
<View style={{ alignItems: 'center' }}>{<PageImage style={imageDisplayOptions} />}</View>
|
|
157
141
|
<View style={{ marginBottom: 20 }}>
|
|
158
|
-
{
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
</TouchableWithoutFeedback>
|
|
162
|
-
) : (
|
|
163
|
-
titleElement
|
|
164
|
-
)}
|
|
142
|
+
<ThemedText style={styles.headerText} testID={testIdWithKey('HeaderText')}>
|
|
143
|
+
{title}
|
|
144
|
+
</ThemedText>
|
|
165
145
|
<ThemedText style={[styles.bodyText, { marginTop: 25 }]} testID={testIdWithKey('BodyText')}>
|
|
166
146
|
{body}
|
|
167
147
|
</ThemedText>
|
|
@@ -171,40 +151,8 @@ export const createPageWith = (
|
|
|
171
151
|
}
|
|
172
152
|
|
|
173
153
|
const OnboardingPages = (onTutorialCompleted: GenericFn, OnboardingTheme: any): Array<Element> => {
|
|
174
|
-
const navigation = useNavigation<StackNavigationProp<OnboardingStackParams>>()
|
|
175
|
-
const [, dispatch] = useStore()
|
|
176
|
-
const onDevModeEnabled = () => {
|
|
177
|
-
dispatch({
|
|
178
|
-
type: DispatchAction.ENABLE_DEVELOPER_MODE,
|
|
179
|
-
payload: [true],
|
|
180
|
-
})
|
|
181
|
-
navigation.getParent()?.navigate(Screens.Developer)
|
|
182
|
-
}
|
|
183
|
-
const developerOptionCount = useRef(0)
|
|
184
|
-
const touchCountToEnableBiometrics = 9
|
|
185
|
-
|
|
186
|
-
const incrementDeveloperMenuCounter = () => {
|
|
187
|
-
if (developerOptionCount.current >= touchCountToEnableBiometrics) {
|
|
188
|
-
developerOptionCount.current = 0
|
|
189
|
-
if (onDevModeEnabled) {
|
|
190
|
-
onDevModeEnabled()
|
|
191
|
-
}
|
|
192
|
-
return
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
developerOptionCount.current = developerOptionCount.current + 1
|
|
196
|
-
}
|
|
197
154
|
return [
|
|
198
|
-
...guides.map((g) =>
|
|
199
|
-
createPageWith(
|
|
200
|
-
g.image,
|
|
201
|
-
g.title,
|
|
202
|
-
g.body,
|
|
203
|
-
OnboardingTheme,
|
|
204
|
-
g.devModeListener,
|
|
205
|
-
g.devModeListener ? incrementDeveloperMenuCounter : undefined
|
|
206
|
-
)
|
|
207
|
-
),
|
|
155
|
+
...guides.map((g) => createPageWith(g.image, g.title, g.body, OnboardingTheme)),
|
|
208
156
|
CustomPages(onTutorialCompleted, OnboardingTheme),
|
|
209
157
|
]
|
|
210
158
|
}
|
|
@@ -25,6 +25,7 @@ import { useAnimatedComponents } from '../contexts/animated-components'
|
|
|
25
25
|
import { useAuth } from '../contexts/auth'
|
|
26
26
|
import { useStore } from '../contexts/store'
|
|
27
27
|
import { useTheme } from '../contexts/theme'
|
|
28
|
+
import usePreventScreenCapture from '../hooks/screen-capture'
|
|
28
29
|
import { usePINValidation } from '../hooks/usePINValidation'
|
|
29
30
|
import { HistoryCardType, HistoryRecord } from '../modules/history/types'
|
|
30
31
|
import { BifoldError } from '../types/error'
|
|
@@ -55,6 +56,7 @@ const PINChange: React.FC<StackScreenProps<ParamListBase, Screens.ChangePIN>> =
|
|
|
55
56
|
historyManagerCurried,
|
|
56
57
|
historyEnabled,
|
|
57
58
|
historyEventsLogger,
|
|
59
|
+
{ preventScreenCapture },
|
|
58
60
|
] = useServices([
|
|
59
61
|
TOKENS.COMPONENT_PIN_HEADER,
|
|
60
62
|
TOKENS.COMP_BUTTON,
|
|
@@ -63,6 +65,7 @@ const PINChange: React.FC<StackScreenProps<ParamListBase, Screens.ChangePIN>> =
|
|
|
63
65
|
TOKENS.FN_LOAD_HISTORY,
|
|
64
66
|
TOKENS.HISTORY_ENABLED,
|
|
65
67
|
TOKENS.HISTORY_EVENTS_LOGGER,
|
|
68
|
+
TOKENS.CONFIG,
|
|
66
69
|
])
|
|
67
70
|
|
|
68
71
|
const {
|
|
@@ -75,6 +78,7 @@ const PINChange: React.FC<StackScreenProps<ParamListBase, Screens.ChangePIN>> =
|
|
|
75
78
|
clearModal,
|
|
76
79
|
PINSecurity,
|
|
77
80
|
} = usePINValidation(PIN, PINTwo)
|
|
81
|
+
usePreventScreenCapture(preventScreenCapture)
|
|
78
82
|
|
|
79
83
|
const style = StyleSheet.create({
|
|
80
84
|
screenContainer: {
|
|
@@ -169,7 +173,6 @@ const PINChange: React.FC<StackScreenProps<ParamListBase, Screens.ChangePIN>> =
|
|
|
169
173
|
return PIN === '' || PINTwo === '' || PINOld === '' || PIN.length < minPINLength || PINTwo.length < minPINLength
|
|
170
174
|
}, [inlineMessages, isLoading, PIN, PINTwo, PINOld])
|
|
171
175
|
|
|
172
|
-
|
|
173
176
|
return (
|
|
174
177
|
<KeyboardView>
|
|
175
178
|
<View style={style.screenContainer}>
|
|
@@ -218,15 +221,9 @@ const PINChange: React.FC<StackScreenProps<ParamListBase, Screens.ChangePIN>> =
|
|
|
218
221
|
ref={PINTwoInputRef}
|
|
219
222
|
inlineMessage={inlineMessageField2}
|
|
220
223
|
/>
|
|
221
|
-
{PINSecurity.displayHelper &&
|
|
222
|
-
<PINValidationHelper validations={PINValidations} />
|
|
223
|
-
)}
|
|
224
|
+
{PINSecurity.displayHelper && <PINValidationHelper validations={PINValidations} />}
|
|
224
225
|
{modalState.visible && (
|
|
225
|
-
<AlertModal
|
|
226
|
-
title={modalState.title}
|
|
227
|
-
message={modalState.message}
|
|
228
|
-
submit={modalState.onModalDismiss}
|
|
229
|
-
/>
|
|
226
|
+
<AlertModal title={modalState.title} message={modalState.message} submit={modalState.onModalDismiss} />
|
|
230
227
|
)}
|
|
231
228
|
</View>
|
|
232
229
|
<View style={style.controlsContainer}>
|
|
@@ -26,6 +26,7 @@ import { useAuth } from '../contexts/auth'
|
|
|
26
26
|
import { DispatchAction } from '../contexts/reducers/store'
|
|
27
27
|
import { useStore } from '../contexts/store'
|
|
28
28
|
import { useTheme } from '../contexts/theme'
|
|
29
|
+
import usePreventScreenCapture from '../hooks/screen-capture'
|
|
29
30
|
import { usePINValidation } from '../hooks/usePINValidation'
|
|
30
31
|
import { BifoldError } from '../types/error'
|
|
31
32
|
import { Screens } from '../types/navigators'
|
|
@@ -48,7 +49,7 @@ const PINCreate: React.FC<PINCreateProps> = ({ setAuthenticated, explainedStatus
|
|
|
48
49
|
const { ButtonLoading } = useAnimatedComponents()
|
|
49
50
|
const PINTwoInputRef = useRef<TextInput>(null)
|
|
50
51
|
const createPINButtonRef = useRef<TouchableOpacity>(null)
|
|
51
|
-
const [PINExplainer, PINHeader, { showPINExplainer }, Button, inlineMessages] = useServices([
|
|
52
|
+
const [PINExplainer, PINHeader, { showPINExplainer, preventScreenCapture }, Button, inlineMessages] = useServices([
|
|
52
53
|
TOKENS.SCREEN_PIN_EXPLAINER,
|
|
53
54
|
TOKENS.COMPONENT_PIN_HEADER,
|
|
54
55
|
TOKENS.CONFIG,
|
|
@@ -57,15 +58,9 @@ const PINCreate: React.FC<PINCreateProps> = ({ setAuthenticated, explainedStatus
|
|
|
57
58
|
])
|
|
58
59
|
|
|
59
60
|
const [explained, setExplained] = useState(explainedStatus || showPINExplainer === false)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
validatePINEntry,
|
|
64
|
-
inlineMessageField1,
|
|
65
|
-
inlineMessageField2,
|
|
66
|
-
modalState,
|
|
67
|
-
PINSecurity
|
|
68
|
-
} = usePINValidation(PIN, PINTwo)
|
|
61
|
+
const { PINValidations, validatePINEntry, inlineMessageField1, inlineMessageField2, modalState, PINSecurity } =
|
|
62
|
+
usePINValidation(PIN, PINTwo)
|
|
63
|
+
usePreventScreenCapture(preventScreenCapture)
|
|
69
64
|
|
|
70
65
|
const style = StyleSheet.create({
|
|
71
66
|
screenContainer: {
|
|
@@ -162,15 +157,9 @@ const PINCreate: React.FC<PINCreateProps> = ({ setAuthenticated, explainedStatus
|
|
|
162
157
|
ref={PINTwoInputRef}
|
|
163
158
|
inlineMessage={inlineMessageField2}
|
|
164
159
|
/>
|
|
165
|
-
{PINSecurity.displayHelper &&
|
|
166
|
-
<PINValidationHelper validations={PINValidations} />
|
|
167
|
-
)}
|
|
160
|
+
{PINSecurity.displayHelper && <PINValidationHelper validations={PINValidations} />}
|
|
168
161
|
{modalState.visible && (
|
|
169
|
-
<AlertModal
|
|
170
|
-
title={modalState.title}
|
|
171
|
-
message={modalState.message}
|
|
172
|
-
submit={modalState.onModalDismiss}
|
|
173
|
-
/>
|
|
162
|
+
<AlertModal title={modalState.title} message={modalState.message} submit={modalState.onModalDismiss} />
|
|
174
163
|
)}
|
|
175
164
|
</View>
|
|
176
165
|
<View style={style.controlsContainer}>
|