@bifold/core 2.1.2 → 2.1.3
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/inputs/PINInput.js +6 -2
- package/lib/commonjs/components/inputs/PINInput.js.map +1 -1
- package/lib/commonjs/components/modals/CommonRemoveModal.js +10 -4
- package/lib/commonjs/components/modals/CommonRemoveModal.js.map +1 -1
- package/lib/commonjs/components/modals/DeveloperModal.js.map +1 -1
- package/lib/commonjs/container-impl.js +1 -0
- package/lib/commonjs/container-impl.js.map +1 -1
- package/lib/commonjs/contexts/activity.js +2 -2
- package/lib/commonjs/contexts/activity.js.map +1 -1
- package/lib/commonjs/contexts/auth.js +13 -5
- package/lib/commonjs/contexts/auth.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/localization/en/index.js +5 -2
- package/lib/commonjs/localization/en/index.js.map +1 -1
- package/lib/commonjs/localization/fr/index.js +4 -1
- package/lib/commonjs/localization/fr/index.js.map +1 -1
- package/lib/commonjs/localization/pt-br/index.js +5 -2
- package/lib/commonjs/localization/pt-br/index.js.map +1 -1
- package/lib/commonjs/modules/openid/screens/OpenIDCredentialOffer.js +2 -1
- package/lib/commonjs/modules/openid/screens/OpenIDCredentialOffer.js.map +1 -1
- package/lib/commonjs/screens/NameWallet.js.map +1 -1
- package/lib/commonjs/screens/RenameWallet.js.map +1 -1
- package/lib/commonjs/screens/Settings.js +9 -0
- package/lib/commonjs/screens/Settings.js.map +1 -1
- package/lib/commonjs/screens/Splash.js +8 -8
- package/lib/commonjs/screens/Splash.js.map +1 -1
- package/lib/commonjs/screens/ToggleBiometry.js.map +1 -1
- package/lib/module/components/inputs/PINInput.js +7 -3
- package/lib/module/components/inputs/PINInput.js.map +1 -1
- package/lib/module/components/modals/CommonRemoveModal.js +10 -4
- package/lib/module/components/modals/CommonRemoveModal.js.map +1 -1
- package/lib/module/components/modals/DeveloperModal.js.map +1 -1
- package/lib/module/container-impl.js +1 -0
- package/lib/module/container-impl.js.map +1 -1
- package/lib/module/contexts/activity.js +3 -3
- package/lib/module/contexts/activity.js.map +1 -1
- package/lib/module/contexts/auth.js +12 -4
- package/lib/module/contexts/auth.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/localization/en/index.js +5 -2
- package/lib/module/localization/en/index.js.map +1 -1
- package/lib/module/localization/fr/index.js +4 -1
- package/lib/module/localization/fr/index.js.map +1 -1
- package/lib/module/localization/pt-br/index.js +5 -2
- package/lib/module/localization/pt-br/index.js.map +1 -1
- package/lib/module/modules/openid/screens/OpenIDCredentialOffer.js +2 -1
- package/lib/module/modules/openid/screens/OpenIDCredentialOffer.js.map +1 -1
- package/lib/module/screens/NameWallet.js.map +1 -1
- package/lib/module/screens/RenameWallet.js.map +1 -1
- package/lib/module/screens/Settings.js +9 -0
- package/lib/module/screens/Settings.js.map +1 -1
- package/lib/module/screens/Splash.js +9 -9
- package/lib/module/screens/Splash.js.map +1 -1
- package/lib/module/screens/ToggleBiometry.js.map +1 -1
- package/lib/typescript/src/components/inputs/PINInput.d.ts.map +1 -1
- package/lib/typescript/src/components/modals/CommonRemoveModal.d.ts +1 -0
- package/lib/typescript/src/components/modals/CommonRemoveModal.d.ts.map +1 -1
- package/lib/typescript/src/components/modals/DeveloperModal.d.ts.map +1 -1
- package/lib/typescript/src/container-impl.d.ts.map +1 -1
- package/lib/typescript/src/contexts/auth.d.ts +5 -1
- package/lib/typescript/src/contexts/auth.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/en/index.d.ts +3 -0
- package/lib/typescript/src/localization/en/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/fr/index.d.ts +3 -0
- package/lib/typescript/src/localization/fr/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/pt-br/index.d.ts +3 -0
- package/lib/typescript/src/localization/pt-br/index.d.ts.map +1 -1
- package/lib/typescript/src/modules/openid/screens/OpenIDCredentialOffer.d.ts.map +1 -1
- package/lib/typescript/src/screens/NameWallet.d.ts.map +1 -1
- package/lib/typescript/src/screens/RenameWallet.d.ts.map +1 -1
- package/lib/typescript/src/screens/Settings.d.ts.map +1 -1
- package/lib/typescript/src/screens/Splash.d.ts.map +1 -1
- package/lib/typescript/src/screens/ToggleBiometry.d.ts.map +1 -1
- package/lib/typescript/src/theme.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/inputs/PINInput.tsx +7 -3
- package/src/components/modals/CommonRemoveModal.tsx +9 -4
- package/src/components/modals/DeveloperModal.tsx +5 -2
- package/src/container-impl.ts +1 -0
- package/src/contexts/activity.tsx +3 -3
- package/src/contexts/auth.tsx +20 -14
- package/src/index.ts +1 -0
- package/src/localization/en/index.ts +3 -0
- package/src/localization/fr/index.ts +3 -0
- package/src/localization/pt-br/index.ts +3 -0
- package/src/modules/openid/screens/OpenIDCredentialOffer.tsx +1 -0
- package/src/screens/NameWallet.tsx +1 -3
- package/src/screens/RenameWallet.tsx +8 -7
- package/src/screens/Settings.tsx +8 -0
- package/src/screens/Splash.tsx +11 -10
- package/src/screens/ToggleBiometry.tsx +2 -3
- package/src/theme.ts +9 -9
|
@@ -239,6 +239,7 @@ const translation = {
|
|
|
239
239
|
"PINDisclaimer": "Se você o esquecer, você precisará redefinir sua carteira e readicionar seus cards.",
|
|
240
240
|
"Show": "Mostrar PIN",
|
|
241
241
|
"Hide": "Esconder PIN",
|
|
242
|
+
"Masked": "PIN Masked for privacy (PT-BR)",
|
|
242
243
|
},
|
|
243
244
|
"PINChange": {
|
|
244
245
|
"PinChangeSuccessTitle": "Seu PIN foi alterado com sucesso",
|
|
@@ -626,6 +627,7 @@ const translation = {
|
|
|
626
627
|
"ShareFollowingInformation_one": "está compartilhando as seguintes informações de credenciais {{count}}.",
|
|
627
628
|
"ShareFollowingInformation_other": "está compartilhando as seguintes informações de credenciais {{count}}.",
|
|
628
629
|
"DeclineParagraph1": "Para receber novamente a oferta de credencial, você precisara iniciar novamente o processo de emissão com o serviço emissor.",
|
|
630
|
+
"DeclineParagraph1WithIssuerName": "If you change your mind you will need to request the card from {{ issuer }} again. (PT-BR)",
|
|
629
631
|
"DeclineParagraph2": "Você tem certeza que quer recusar esta oferta de credencial?",
|
|
630
632
|
"CustomOfferTitle": "Remover esta oferta?",
|
|
631
633
|
"CustomOfferParagraph1": "Remover esta oferta irá remover a notificação de sua lista.",
|
|
@@ -713,6 +715,7 @@ const translation = {
|
|
|
713
715
|
"ScanMyQR": "Scanear meu QR code",
|
|
714
716
|
"Developer": "Opções de Desenvolvedor",
|
|
715
717
|
"AutoLockTime": "Auto lock time (PT-BR)",
|
|
718
|
+
"Logout": "Sair",
|
|
716
719
|
},
|
|
717
720
|
"AutoLockTimes": {
|
|
718
721
|
"FiveMinutes": "Five Minutes (PT-BR)",
|
|
@@ -183,6 +183,7 @@ const OpenIDCredentialOffer: React.FC<OpenIDCredentialDetailsProps> = ({ navigat
|
|
|
183
183
|
visible={isRemoveModalDisplayed}
|
|
184
184
|
onSubmit={handleDeclineTouched}
|
|
185
185
|
onCancel={toggleDeclineModalVisible}
|
|
186
|
+
extraDetails={display.issuer.name}
|
|
186
187
|
/>
|
|
187
188
|
</ScreenLayout>
|
|
188
189
|
)
|
|
@@ -12,14 +12,15 @@ const RenameWallet: React.FC = () => {
|
|
|
12
12
|
navigation.goBack()
|
|
13
13
|
}, [navigation])
|
|
14
14
|
|
|
15
|
-
const onSubmitSuccess = useCallback(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<WalletNameForm isRenaming onCancel={onCancel} onSubmitSuccess={onSubmitSuccess} />
|
|
15
|
+
const onSubmitSuccess = useCallback(
|
|
16
|
+
(name: string) => {
|
|
17
|
+
agent.config.label = name
|
|
18
|
+
navigation.goBack()
|
|
19
|
+
},
|
|
20
|
+
[navigation, agent]
|
|
22
21
|
)
|
|
22
|
+
|
|
23
|
+
return <WalletNameForm isRenaming onCancel={onCancel} onSubmitSuccess={onSubmitSuccess} />
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export default RenameWallet
|
package/src/screens/Settings.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StackScreenProps } from '@react-navigation/stack'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { useTranslation } from 'react-i18next'
|
|
4
|
+
import { LockoutReason, useAuth } from '../contexts/auth'
|
|
4
5
|
import {
|
|
5
6
|
ScrollView,
|
|
6
7
|
SectionList,
|
|
@@ -33,6 +34,7 @@ type SettingsProps = StackScreenProps<SettingStackParams>
|
|
|
33
34
|
const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
34
35
|
const { t, i18n } = useTranslation()
|
|
35
36
|
const [store] = useStore()
|
|
37
|
+
const { lockOutUser } = useAuth()
|
|
36
38
|
const onDevModeTriggered = () => {
|
|
37
39
|
Vibration.vibrate()
|
|
38
40
|
navigation.navigate(Screens.Developer)
|
|
@@ -216,6 +218,12 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
|
|
|
216
218
|
testID: testIdWithKey('DeveloperOptions'),
|
|
217
219
|
onPress: () => navigation.navigate(Screens.Developer),
|
|
218
220
|
},
|
|
221
|
+
{
|
|
222
|
+
title: t('Settings.Logout'),
|
|
223
|
+
accessibilityLabel: t('Settings.Logout'),
|
|
224
|
+
testID: testIdWithKey('Logout'),
|
|
225
|
+
onPress: () => lockOutUser(LockoutReason.Logout),
|
|
226
|
+
},
|
|
219
227
|
]
|
|
220
228
|
}
|
|
221
229
|
}
|
package/src/screens/Splash.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RemoteOCABundleResolver } from '@bifold/oca/build/legacy'
|
|
2
|
-
import React, { useEffect } from 'react'
|
|
2
|
+
import React, { useEffect, useRef } from 'react'
|
|
3
3
|
import { useTranslation } from 'react-i18next'
|
|
4
4
|
import { DeviceEventEmitter, StyleSheet } from 'react-native'
|
|
5
5
|
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
@@ -27,6 +27,7 @@ const Splash: React.FC<SplashProps> = ({ initializeAgent }) => {
|
|
|
27
27
|
const [store] = useStore()
|
|
28
28
|
const { ColorPallet } = useTheme()
|
|
29
29
|
const { LoadingIndicator } = useAnimatedComponents()
|
|
30
|
+
const initializing = useRef(false)
|
|
30
31
|
const [logger, ocaBundleResolver] = useServices([TOKENS.UTIL_LOGGER, TOKENS.UTIL_OCA_RESOLVER])
|
|
31
32
|
|
|
32
33
|
const styles = StyleSheet.create({
|
|
@@ -39,19 +40,19 @@ const Splash: React.FC<SplashProps> = ({ initializeAgent }) => {
|
|
|
39
40
|
})
|
|
40
41
|
|
|
41
42
|
useEffect(() => {
|
|
43
|
+
if (initializing.current || !store.authentication.didAuthenticate) {
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!walletSecret) {
|
|
48
|
+
throw new Error('Wallet secret is missing')
|
|
49
|
+
}
|
|
50
|
+
initializing.current = true
|
|
51
|
+
|
|
42
52
|
const initAgentAsyncEffect = async (): Promise<void> => {
|
|
43
53
|
try {
|
|
44
54
|
await (ocaBundleResolver as RemoteOCABundleResolver).checkForUpdates?.()
|
|
45
55
|
|
|
46
|
-
// User hasn't authenticated yet, no point in trying to initialize wallet agent
|
|
47
|
-
if (!store.authentication.didAuthenticate) {
|
|
48
|
-
return
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!walletSecret) {
|
|
52
|
-
throw new Error('Wallet secret is missing')
|
|
53
|
-
}
|
|
54
|
-
|
|
55
56
|
await initializeAgent(walletSecret)
|
|
56
57
|
} catch (err: unknown) {
|
|
57
58
|
const error = new BifoldError(
|
|
@@ -14,7 +14,6 @@ import { useAppAgent } from '../utils/agent'
|
|
|
14
14
|
import PINVerify, { PINEntryUsage } from './PINVerify'
|
|
15
15
|
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
const ToggleBiometry: React.FC = () => {
|
|
19
18
|
const [store, dispatch] = useStore()
|
|
20
19
|
const { agent } = useAppAgent()
|
|
@@ -138,8 +137,8 @@ const ToggleBiometry: React.FC = () => {
|
|
|
138
137
|
animationType={'slide'}
|
|
139
138
|
presentationStyle={'fullScreen'}
|
|
140
139
|
>
|
|
141
|
-
<SafeAreaView edges={['top']} style={{ backgroundColor: NavigationTheme.colors.primary }}/>
|
|
142
|
-
<FauxHeader title={t('Screens.EnterPIN')} onBackPressed={onBackPressed}/>
|
|
140
|
+
<SafeAreaView edges={['top']} style={{ backgroundColor: NavigationTheme.colors.primary }} />
|
|
141
|
+
<FauxHeader title={t('Screens.EnterPIN')} onBackPressed={onBackPressed} />
|
|
143
142
|
<PINVerify
|
|
144
143
|
usage={PINEntryUsage.ChangeBiometrics}
|
|
145
144
|
setAuthenticated={onAuthenticationComplete}
|
package/src/theme.ts
CHANGED
|
@@ -730,21 +730,21 @@ export interface ITabTheme {
|
|
|
730
730
|
shadowOpacity: number
|
|
731
731
|
borderTopWidth: number
|
|
732
732
|
paddingBottom: number
|
|
733
|
-
}
|
|
734
|
-
tabBarContainerStyle: ViewStyle
|
|
735
|
-
tabBarActiveTintColor: string
|
|
736
|
-
tabBarInactiveTintColor: string
|
|
733
|
+
}
|
|
734
|
+
tabBarContainerStyle: ViewStyle
|
|
735
|
+
tabBarActiveTintColor: string
|
|
736
|
+
tabBarInactiveTintColor: string
|
|
737
737
|
tabBarTextStyle: TextStyle & {
|
|
738
738
|
fontSize: number
|
|
739
|
-
}
|
|
739
|
+
}
|
|
740
740
|
tabBarButtonIconStyle: {
|
|
741
741
|
color: string
|
|
742
|
-
}
|
|
743
|
-
focusTabIconStyle: ViewStyle
|
|
742
|
+
}
|
|
743
|
+
focusTabIconStyle: ViewStyle
|
|
744
744
|
focusTabActiveTintColor: {
|
|
745
745
|
backgroundColor: string
|
|
746
|
-
}
|
|
747
|
-
tabBarSecondaryBackgroundColor: string
|
|
746
|
+
}
|
|
747
|
+
tabBarSecondaryBackgroundColor: string
|
|
748
748
|
}
|
|
749
749
|
|
|
750
750
|
export const TabTheme: ITabTheme = {
|