@bifold/core 2.1.0 → 2.1.2

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.
Files changed (66) hide show
  1. package/lib/commonjs/components/forms/WalletNameForm.js +152 -0
  2. package/lib/commonjs/components/forms/WalletNameForm.js.map +1 -0
  3. package/lib/commonjs/components/misc/QRScanner.js +1 -1
  4. package/lib/commonjs/components/misc/QRScanner.js.map +1 -1
  5. package/lib/commonjs/navigators/ConnectStack.js +4 -4
  6. package/lib/commonjs/navigators/ConnectStack.js.map +1 -1
  7. package/lib/commonjs/navigators/SettingStack.js +4 -4
  8. package/lib/commonjs/navigators/SettingStack.js.map +1 -1
  9. package/lib/commonjs/navigators/defaultStackOptions.js +4 -0
  10. package/lib/commonjs/navigators/defaultStackOptions.js.map +1 -1
  11. package/lib/commonjs/screens/NameWallet.js +3 -150
  12. package/lib/commonjs/screens/NameWallet.js.map +1 -1
  13. package/lib/commonjs/screens/PINEnter.js +4 -1
  14. package/lib/commonjs/screens/PINEnter.js.map +1 -1
  15. package/lib/commonjs/screens/ProofRequest.js +9 -9
  16. package/lib/commonjs/screens/ProofRequest.js.map +1 -1
  17. package/lib/commonjs/screens/RenameWallet.js +33 -0
  18. package/lib/commonjs/screens/RenameWallet.js.map +1 -0
  19. package/lib/commonjs/screens/Settings.js +5 -2
  20. package/lib/commonjs/screens/Settings.js.map +1 -1
  21. package/lib/commonjs/types/navigators.js +1 -0
  22. package/lib/commonjs/types/navigators.js.map +1 -1
  23. package/lib/module/components/forms/WalletNameForm.js +143 -0
  24. package/lib/module/components/forms/WalletNameForm.js.map +1 -0
  25. package/lib/module/components/misc/QRScanner.js +1 -1
  26. package/lib/module/components/misc/QRScanner.js.map +1 -1
  27. package/lib/module/navigators/ConnectStack.js +4 -4
  28. package/lib/module/navigators/ConnectStack.js.map +1 -1
  29. package/lib/module/navigators/SettingStack.js +4 -4
  30. package/lib/module/navigators/SettingStack.js.map +1 -1
  31. package/lib/module/navigators/defaultStackOptions.js +4 -0
  32. package/lib/module/navigators/defaultStackOptions.js.map +1 -1
  33. package/lib/module/screens/NameWallet.js +3 -148
  34. package/lib/module/screens/NameWallet.js.map +1 -1
  35. package/lib/module/screens/PINEnter.js +5 -2
  36. package/lib/module/screens/PINEnter.js.map +1 -1
  37. package/lib/module/screens/ProofRequest.js +9 -9
  38. package/lib/module/screens/ProofRequest.js.map +1 -1
  39. package/lib/module/screens/RenameWallet.js +24 -0
  40. package/lib/module/screens/RenameWallet.js.map +1 -0
  41. package/lib/module/screens/Settings.js +6 -3
  42. package/lib/module/screens/Settings.js.map +1 -1
  43. package/lib/module/types/navigators.js +1 -0
  44. package/lib/module/types/navigators.js.map +1 -1
  45. package/lib/typescript/src/components/forms/WalletNameForm.d.ts +9 -0
  46. package/lib/typescript/src/components/forms/WalletNameForm.d.ts.map +1 -0
  47. package/lib/typescript/src/navigators/defaultStackOptions.d.ts.map +1 -1
  48. package/lib/typescript/src/screens/NameWallet.d.ts.map +1 -1
  49. package/lib/typescript/src/screens/PINEnter.d.ts.map +1 -1
  50. package/lib/typescript/src/screens/RenameWallet.d.ts +4 -0
  51. package/lib/typescript/src/screens/RenameWallet.d.ts.map +1 -0
  52. package/lib/typescript/src/screens/Settings.d.ts.map +1 -1
  53. package/lib/typescript/src/types/navigators.d.ts +3 -2
  54. package/lib/typescript/src/types/navigators.d.ts.map +1 -1
  55. package/package.json +3 -3
  56. package/src/components/forms/WalletNameForm.tsx +148 -0
  57. package/src/components/misc/QRScanner.tsx +1 -1
  58. package/src/navigators/ConnectStack.tsx +4 -4
  59. package/src/navigators/SettingStack.tsx +4 -4
  60. package/src/navigators/defaultStackOptions.tsx +4 -0
  61. package/src/screens/NameWallet.tsx +3 -152
  62. package/src/screens/PINEnter.tsx +13 -4
  63. package/src/screens/ProofRequest.tsx +9 -9
  64. package/src/screens/RenameWallet.tsx +25 -0
  65. package/src/screens/Settings.tsx +6 -2
  66. package/src/types/navigators.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bifold/core",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -33,8 +33,8 @@
33
33
  "devDependencies": {
34
34
  "@babel/core": "^7.20.0",
35
35
  "@babel/runtime": "^7.20.0",
36
- "@bifold/oca": "2.1.0",
37
- "@bifold/verifier": "2.1.0",
36
+ "@bifold/oca": "2.1.2",
37
+ "@bifold/verifier": "2.1.2",
38
38
  "@commitlint/cli": "^11.0.0",
39
39
  "@credo-ts/anoncreds": "0.5.13",
40
40
  "@credo-ts/askar": "0.5.13",
@@ -0,0 +1,148 @@
1
+ import React, { useState } from 'react'
2
+ import { useTranslation } from 'react-i18next'
3
+ import { StyleSheet, View } from 'react-native'
4
+
5
+ import { DispatchAction } from '../../contexts/reducers/store'
6
+ import { useStore } from '../../contexts/store'
7
+ import { useTheme } from '../../contexts/theme'
8
+ import { generateRandomWalletName } from '../../utils/helpers'
9
+ import { testIdWithKey } from '../../utils/testable'
10
+ import ButtonLoading from '../animated/ButtonLoading'
11
+ import Button, { ButtonType } from '../buttons/Button'
12
+ import LimitedTextInput from '../inputs/LimitedTextInput'
13
+ import { InfoBoxType } from '../misc/InfoBox'
14
+ import PopupModal from '../modals/PopupModal'
15
+ import { ThemedText } from '../texts/ThemedText'
16
+ import KeyboardView from '../views/KeyboardView'
17
+
18
+ type ErrorState = {
19
+ visible: boolean
20
+ title: string
21
+ description: string
22
+ }
23
+
24
+ interface NameWalletProps {
25
+ isRenaming?: boolean
26
+ onSubmitSuccess?: (name: string) => void
27
+ onCancel?: () => void
28
+ }
29
+
30
+ const NameWalletForm: React.FC<NameWalletProps> = ({ isRenaming, onSubmitSuccess, onCancel }) => {
31
+ const { t } = useTranslation()
32
+ const { ColorPallet, Assets, Spacing } = useTheme()
33
+ const [store, dispatch] = useStore()
34
+ const [loading, setLoading] = useState(false)
35
+ const [walletName, setWalletName] = useState(store.preferences.walletName ?? generateRandomWalletName())
36
+ const [errorState, setErrorState] = useState<ErrorState>({
37
+ visible: false,
38
+ title: '',
39
+ description: '',
40
+ })
41
+
42
+ const styles = StyleSheet.create({
43
+ screenContainer: {
44
+ flex: 1,
45
+ backgroundColor: ColorPallet.brand.primaryBackground,
46
+ padding: Spacing.md,
47
+ justifyContent: 'space-between',
48
+ },
49
+ contentContainer: {
50
+ justifyContent: 'center',
51
+ alignItems: 'center',
52
+ width: '100%',
53
+ },
54
+ controlsContainer: {},
55
+ buttonContainer: {
56
+ width: '100%',
57
+ },
58
+ })
59
+
60
+ const handleChangeText = (text: string) => {
61
+ setWalletName(text)
62
+ }
63
+
64
+ const handleContinuePressed = () => {
65
+ if (walletName.length < 1) {
66
+ setErrorState({
67
+ title: t('NameWallet.EmptyNameTitle'),
68
+ description: t('NameWallet.EmptyNameDescription'),
69
+ visible: true,
70
+ })
71
+ } else if (walletName.length > 50) {
72
+ setErrorState({
73
+ title: t('NameWallet.CharCountTitle'),
74
+ description: t('NameWallet.CharCountDescription'),
75
+ visible: true,
76
+ })
77
+ } else {
78
+ setLoading(true)
79
+ dispatch({
80
+ type: DispatchAction.UPDATE_WALLET_NAME,
81
+ payload: [walletName],
82
+ })
83
+ dispatch({ type: DispatchAction.DID_NAME_WALLET })
84
+ onSubmitSuccess?.(walletName)
85
+ }
86
+ }
87
+
88
+ const handleDismissError = () => {
89
+ setErrorState((prev) => ({ ...prev, visible: false }))
90
+ }
91
+
92
+ return (
93
+ <KeyboardView>
94
+ <View style={styles.screenContainer}>
95
+ <View style={styles.contentContainer}>
96
+ <Assets.svg.contactBook height={100} style={{ marginVertical: Spacing.md }} />
97
+ <ThemedText style={{ width: '100%', marginBottom: Spacing.md }}>{t('NameWallet.ThisIsTheName')}</ThemedText>
98
+ <View style={{ width: '100%' }}>
99
+ <LimitedTextInput
100
+ defaultValue={walletName}
101
+ label={t('NameWallet.NameYourWallet')}
102
+ limit={50}
103
+ handleChangeText={handleChangeText}
104
+ accessibilityLabel={t('NameWallet.NameYourWallet')}
105
+ testID={testIdWithKey('NameInput')}
106
+ />
107
+ </View>
108
+ </View>
109
+ <View style={styles.controlsContainer}>
110
+ <View style={styles.buttonContainer}>
111
+ <Button
112
+ title={isRenaming ? t('Global.Save') : t('Global.Continue')}
113
+ buttonType={ButtonType.Primary}
114
+ testID={isRenaming ? testIdWithKey('Save') : testIdWithKey('Continue')}
115
+ accessibilityLabel={isRenaming ? t('Global.Save') : t('Global.Continue')}
116
+ onPress={handleContinuePressed}
117
+ disabled={loading}
118
+ >
119
+ {loading && <ButtonLoading />}
120
+ </Button>
121
+ {isRenaming && (
122
+ <View style={{ marginTop: Spacing.sm }}>
123
+ <Button
124
+ title={t('Global.Cancel')}
125
+ buttonType={ButtonType.Secondary}
126
+ testID={testIdWithKey('Cancel')}
127
+ accessibilityLabel={t('Global.Cancel')}
128
+ onPress={onCancel}
129
+ />
130
+ </View>
131
+ )}
132
+ </View>
133
+ </View>
134
+ </View>
135
+ {errorState.visible && (
136
+ <PopupModal
137
+ notificationType={InfoBoxType.Info}
138
+ onCallToActionLabel={t('Global.Okay')}
139
+ onCallToActionPressed={handleDismissError}
140
+ title={errorState.title}
141
+ description={errorState.description}
142
+ />
143
+ )}
144
+ </KeyboardView>
145
+ )
146
+ }
147
+
148
+ export default NameWalletForm
@@ -157,7 +157,7 @@ const QRScanner: React.FC<Props> = ({
157
157
  }, [agent])
158
158
 
159
159
  const handleEdit = useCallback(() => {
160
- navigation.navigate(Screens.NameWallet)
160
+ navigation.navigate(Screens.RenameWallet)
161
161
  }, [navigation])
162
162
 
163
163
  useEffect(() => {
@@ -3,7 +3,7 @@ import React from 'react'
3
3
  import { useTranslation } from 'react-i18next'
4
4
 
5
5
  import { useTheme } from '../contexts/theme'
6
- import NameWallet from '../screens/NameWallet'
6
+ import RenameWallet from '../screens/RenameWallet'
7
7
  import PasteUrl from '../screens/PasteUrl'
8
8
  import ScanHelp from '../screens/ScanHelp'
9
9
  import { ConnectStackParams, Screens } from '../types/navigators'
@@ -53,12 +53,12 @@ const ConnectStack: React.FC = () => {
53
53
  />
54
54
 
55
55
  <Stack.Screen
56
- name={Screens.NameWallet}
57
- component={NameWallet}
56
+ name={Screens.RenameWallet}
57
+ component={RenameWallet}
58
58
  options={{
59
59
  title: t('Screens.NameWallet'),
60
60
  headerBackTestID: testIdWithKey('Back'),
61
- ...ScreenOptionsDictionary[Screens.NameWallet],
61
+ ...ScreenOptionsDictionary[Screens.RenameWallet],
62
62
  }}
63
63
  />
64
64
  </Stack.Navigator>
@@ -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 NameWallet from '../screens/NameWallet'
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.NameWallet}
51
- component={NameWallet}
50
+ name={Screens.RenameWallet}
51
+ component={RenameWallet}
52
52
  options={{
53
53
  title: t('Screens.NameWallet'),
54
54
  headerBackTestID: testIdWithKey('Back'),
55
- ...ScreenOptionsDictionary[Screens.NameWallet],
55
+ ...ScreenOptionsDictionary[Screens.RenameWallet],
56
56
  }}
57
57
  />
58
58
  <Stack.Screen
@@ -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'),
@@ -1,159 +1,10 @@
1
- import { useAgent } from '@credo-ts/react-hooks'
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 ButtonLoading from '../components/animated/ButtonLoading'
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
- dispatch({ type: DispatchAction.DID_NAME_WALLET })
92
-
93
- if (agent) {
94
- agent.config.label = walletName
95
- navigation.goBack()
96
- }
97
- }
98
- }
99
-
100
- const handleDismissError = () => {
101
- setErrorState((prev) => ({ ...prev, visible: false }))
102
- }
103
-
104
6
  return (
105
- <KeyboardView>
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,6 +1,6 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react'
2
2
  import { useTranslation } from 'react-i18next'
3
- import { DeviceEventEmitter, InteractionManager, Keyboard, Pressable, StyleSheet, View } from 'react-native'
3
+ import { DeviceEventEmitter, InteractionManager, Keyboard, Pressable, StyleSheet, Vibration, View } from 'react-native'
4
4
 
5
5
  import Button, { ButtonType } from '../components/buttons/Button'
6
6
  import { InlineErrorType, InlineMessageProps } from '../components/inputs/InlineErrorText'
@@ -41,14 +41,23 @@ const PINEnter: React.FC<PINEnterProps> = ({ setAuthenticated }) => {
41
41
  const [biometricsEnrollmentChange, setBiometricsEnrollmentChange] = useState(false)
42
42
  const { ColorPallet } = useTheme()
43
43
  const { ButtonLoading } = useAnimatedComponents()
44
- const [logger, { preventScreenCapture, enableHiddenDevModeTrigger, attemptLockoutConfig: { thresholdRules } = attemptLockoutConfig }] =
45
- useServices([TOKENS.UTIL_LOGGER, TOKENS.CONFIG])
44
+ const [
45
+ logger,
46
+ {
47
+ preventScreenCapture,
48
+ enableHiddenDevModeTrigger,
49
+ attemptLockoutConfig: { thresholdRules } = attemptLockoutConfig,
50
+ },
51
+ ] = useServices([TOKENS.UTIL_LOGGER, TOKENS.CONFIG])
46
52
  const [inlineMessageField, setInlineMessageField] = useState<InlineMessageProps>()
47
53
  const [inlineMessages] = useServices([TOKENS.INLINE_ERRORS])
48
54
  const [alertModalMessage, setAlertModalMessage] = useState('')
49
55
  const { getLockoutPenalty, attemptLockout, unMarkServedPenalty } = useLockout()
50
56
  const onBackPressed = () => setDevModalVisible(false)
51
- const onDevModeTriggered = () => setDevModalVisible(true)
57
+ const onDevModeTriggered = () => {
58
+ Vibration.vibrate()
59
+ setDevModalVisible(true)
60
+ }
52
61
  const { incrementDeveloperMenuCounter } = useDeveloperMode(onDevModeTriggered)
53
62
  const gotoPostAuthScreens = useGotoPostAuthScreens()
54
63
  const isContinueDisabled = inlineMessages.enabled ? !continueEnabled : !continueEnabled || PIN.length < minPINLength
@@ -652,9 +652,9 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
652
652
 
653
653
  const proofPageHeader = () => {
654
654
  return (
655
- <View style={styles.pageMargin}>
655
+ <>
656
656
  {attestationLoading && (
657
- <View style={{ paddingTop: 20 }}>
657
+ <View style={{ padding: 20 }}>
658
658
  <InfoTextBox>{t('ProofRequest.JustAMoment')}</InfoTextBox>
659
659
  </View>
660
660
  )}
@@ -669,7 +669,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
669
669
  testID={testIdWithKey('ProofRequestLoading')}
670
670
  />
671
671
  ) : (
672
- <>
672
+ <View style={styles.pageMargin}>
673
673
  <ConnectionImage connectionId={proof?.connectionId} />
674
674
  <View style={styles.headerTextContainer}>
675
675
  <ThemedText style={styles.headerText} testID={testIdWithKey('HeaderText')}>
@@ -708,9 +708,9 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
708
708
  </InfoTextBox>
709
709
  )}
710
710
  </View>
711
- </>
711
+ </View>
712
712
  )}
713
- </View>
713
+ </>
714
714
  )
715
715
  }
716
716
 
@@ -718,16 +718,16 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
718
718
  let finalMessage = `${t('ProofRequest.YouCantRespondReasons')}\n`
719
719
 
720
720
  if (shareDisabledErrors.hasCredentialError) {
721
- finalMessage += `\n \u2B24 ${t('ProofRequest.CredentialIsMissing')}`
721
+ finalMessage += `\n \u2022 ${t('ProofRequest.CredentialIsMissing')}`
722
722
  }
723
723
  if (shareDisabledErrors.hasSatisfiedPredicateError) {
724
- finalMessage += `\n \u2B24 ${t('ProofRequest.ProofRequestPredicateError')}`
724
+ finalMessage += `\n \u2022 ${t('ProofRequest.ProofRequestPredicateError')}`
725
725
  }
726
726
  if (shareDisabledErrors.hasRevokedOffense) {
727
- finalMessage += `\n \u2B24 ${t('ProofRequest.CredentialForProofIsRevoked')}`
727
+ finalMessage += `\n \u2022 ${t('ProofRequest.CredentialForProofIsRevoked')}`
728
728
  }
729
729
  if (shareDisabledErrors.hasProofStateReceivedError) {
730
- finalMessage += `\n \u2B24 ${t('ProofRequest.ProofRequestStateError', { state: proof?.state })}`
730
+ finalMessage += `\n \u2022 ${t('ProofRequest.ProofRequestStateError', { state: proof?.state })}`
731
731
  }
732
732
 
733
733
  finalMessage += `\n\n${t('ProofRequest.PleaseAddress')}`
@@ -0,0 +1,25 @@
1
+ import { useAgent } from '@credo-ts/react-hooks'
2
+ import { useNavigation } from '@react-navigation/native'
3
+ import React, { useCallback } from 'react'
4
+
5
+ import WalletNameForm from '../components/forms/WalletNameForm'
6
+
7
+ const RenameWallet: React.FC = () => {
8
+ const navigation = useNavigation()
9
+ const { agent } = useAgent()
10
+
11
+ const onCancel = useCallback(() => {
12
+ navigation.goBack()
13
+ }, [navigation])
14
+
15
+ const onSubmitSuccess = useCallback((name: string) => {
16
+ agent.config.label = name
17
+ navigation.goBack()
18
+ }, [navigation, agent])
19
+
20
+ return (
21
+ <WalletNameForm isRenaming onCancel={onCancel} onSubmitSuccess={onSubmitSuccess} />
22
+ )
23
+ }
24
+
25
+ export default RenameWallet
@@ -8,6 +8,7 @@ import {
8
8
  TouchableOpacity,
9
9
  TouchableWithoutFeedback,
10
10
  useWindowDimensions,
11
+ Vibration,
11
12
  View,
12
13
  } from 'react-native'
13
14
  import { getBuildNumber, getVersion } from 'react-native-device-info'
@@ -32,7 +33,10 @@ type SettingsProps = StackScreenProps<SettingStackParams>
32
33
  const Settings: React.FC<SettingsProps> = ({ navigation }) => {
33
34
  const { t, i18n } = useTranslation()
34
35
  const [store] = useStore()
35
- const onDevModeTriggered = () => navigation.navigate(Screens.Developer)
36
+ const onDevModeTriggered = () => {
37
+ Vibration.vibrate()
38
+ navigation.navigate(Screens.Developer)
39
+ }
36
40
  const { incrementDeveloperMenuCounter } = useDeveloperMode(onDevModeTriggered)
37
41
  const { SettingsTheme, TextTheme, ColorPallet, Assets, maxFontSizeMultiplier } = useTheme()
38
42
  const [{ settings, enableTours, enablePushNotifications, disableContactsInSettings }, historyEnabled] = useServices([
@@ -90,7 +94,7 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
90
94
  iconRight: {
91
95
  name: 'edit',
92
96
  action: () => {
93
- navigation.navigate(Screens.NameWallet)
97
+ navigation.navigate(Screens.RenameWallet)
94
98
  },
95
99
  accessibilityLabel: t('NameWallet.EditWalletName'),
96
100
  testID: testIdWithKey('EditWalletName'),
@@ -49,6 +49,7 @@ export enum Screens {
49
49
  ProofRequesting = 'Proof Requesting',
50
50
  ProofDetails = 'Proof Details',
51
51
  NameWallet = 'Name Wallet',
52
+ RenameWallet = 'Rename Wallet',
52
53
  RenameContact = 'Rename Contact',
53
54
  ScanHelp = 'Scan Help',
54
55
  HistorySettings = 'History Settings',
@@ -148,13 +149,13 @@ export type HomeStackParams = {
148
149
 
149
150
  export type ConnectStackParams = {
150
151
  [Screens.Scan]: undefined
151
- [Screens.NameWallet]: undefined
152
+ [Screens.RenameWallet]: undefined
152
153
  [Screens.ScanHelp]: undefined
153
154
  [Screens.PasteUrl]: undefined
154
155
  }
155
156
 
156
157
  export type SettingStackParams = {
157
- [Screens.NameWallet]: undefined
158
+ [Screens.RenameWallet]: undefined
158
159
  [Screens.Settings]: undefined
159
160
  [Screens.Language]: undefined
160
161
  [Screens.DataRetention]: undefined