Skip to content

Commit

Permalink
chore: mise à jour du bifold vers la version 383 et fixes (#172)
Browse files Browse the repository at this point in the history
Signed-off-by: fc-santos <[email protected]>
  • Loading branch information
fc-santos authored Dec 6, 2024
1 parent f0744c3 commit 14e9573
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
diff --git a/App/components/listItems/NotificationListItem.tsx b/App/components/listItems/NotificationListItem.tsx
index 1c8a86091e207b58a620be00db905b4ba7d06539..b3b630f911d116a0f6ce441c0aae3abe770f2075 100644
--- a/App/components/listItems/NotificationListItem.tsx
+++ b/App/components/listItems/NotificationListItem.tsx
@@ -49,6 +49,8 @@ export interface NotificationListItemProps {
notificationType: NotificationType
notification: BasicMessageRecord | CredentialExchangeRecord | ProofExchangeRecord | CustomNotificationRecord
customNotification?: CustomNotification
+ openSwipeableId?: string | null,
+ onOpenSwipeable?: (id: string | null) => void
}

type DisplayDetails = {
@@ -83,6 +85,8 @@ const NotificationListItem: React.FC<NotificationListItemProps> = ({
notificationType,
notification,
customNotification,
+ openSwipeableId,
+ onOpenSwipeable,
}) => {
const navigation = useNavigation<StackNavigationProp<HomeStackParams>>()
const [store, dispatch] = useStore()
diff --git a/App/screens/Home.tsx b/App/screens/Home.tsx
index ad946ed3ee1af79bbdc90fa70e30eefd6782128c..c6e493347c07bf806ba0615ae4d8be519b401129 100644
--- a/App/screens/Home.tsx
+++ b/App/screens/Home.tsx
@@ -40,6 +40,8 @@ const Home: React.FC<HomeProps> = () => {
const [showTourPopup, setShowTourPopup] = useState(false)
const screenIsFocused = useIsFocused()

+ const [notificationItemId, setNotificationItemId] = useState<string | null>(null)
+
const styles = StyleSheet.create({
flatlist: {
marginBottom: 35,
@@ -49,26 +51,47 @@ const Home: React.FC<HomeProps> = () => {
const DisplayListItemType = useCallback((item: any): React.ReactNode => {
let component: React.ReactNode
if (item.type === 'BasicMessageRecord') {
- component = <NotificationListItem notificationType={NotificationType.BasicMessage} notification={item} />
+ component = (
+ <NotificationListItem
+ openSwipeableId={notificationItemId}
+ onOpenSwipeable={setNotificationItemId}
+ notificationType={NotificationType.BasicMessage}
+ notification={item} />
+ )
} else if (item.type === 'CredentialRecord') {
let notificationType = NotificationType.CredentialOffer
if (item.revocationNotification) {
notificationType = NotificationType.Revocation
}
- component = <NotificationListItem notificationType={notificationType} notification={item} />
+ component = (
+ <NotificationListItem
+ openSwipeableId={notificationItemId}
+ onOpenSwipeable={setNotificationItemId}
+ notificationType={notificationType}
+ notification={item} />
+ )
} else if (item.type === 'CustomNotification' && customNotification) {
component = (
<NotificationListItem
+ openSwipeableId={notificationItemId}
+ onOpenSwipeable={setNotificationItemId}
notificationType={NotificationType.Custom}
notification={item}
customNotification={customNotification}
/>
)
} else {
- component = <NotificationListItem notificationType={NotificationType.ProofRequest} notification={item} />
+ component = (
+ <NotificationListItem
+ openSwipeableId={notificationItemId}
+ onOpenSwipeable={setNotificationItemId}
+ notificationType={NotificationType.ProofRequest}
+ notification={item}
+ />
+ )
}
return component
- }, [customNotification, NotificationListItem])
+ }, [customNotification, NotificationListItem, notificationItemId, setNotificationItemId])

useEffect(() => {
const shouldShowTour = enableToursConfig && store.tours.enableTours && !store.tours.seenHomeTour
1 change: 1 addition & 0 deletions app/container-imp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const defaultConfig: BifoldConfig = {
enableChat: false,
supportedLanguages: [Locales.en, Locales.fr],
showPreface: false,
showPINExplainer: false,
enableReuseConnections: true,
disableOnboardingSkip: true,
showScanHelp: true,
Expand Down
4 changes: 2 additions & 2 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ PODS:
- React-jsinspector (0.72.5)
- React-logger (0.72.5):
- glog
- "react-native-attestation (1.0.0-alpha.381+9e81308d)":
- "react-native-attestation (1.0.0-alpha.383+cdaa9f7c)":
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-config (1.5.0):
Expand Down Expand Up @@ -784,7 +784,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a
React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
react-native-attestation: 51aad194ffdf205b9561c3a41b2ca68173ffced4
react-native-attestation: b32abb00cb089c23ffd3597137ef525396648be8
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
react-native-encrypted-storage: db300a3f2f0aba1e818417c1c0a6be549038deb7
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
Expand Down
10 changes: 5 additions & 5 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
"@formatjs/intl-relativetimeformat": "9.3.1",
"@hyperledger/anoncreds-react-native": "0.2.4",
"@hyperledger/aries-askar-react-native": "0.2.3",
"@hyperledger/aries-bifold-core": "patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.381#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.381-f8d8192b81.patch",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.381",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.381",
"@hyperledger/aries-oca": "1.0.0-alpha.381",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.381",
"@hyperledger/aries-bifold-core": "patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.383#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.383-3a53f1a5ec.patch",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.383",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.383",
"@hyperledger/aries-oca": "1.0.0-alpha.383",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.383",
"@hyperledger/indy-vdr-react-native": "0.2.2",
"@hyperledger/indy-vdr-shared": "0.2.2",
"@react-native-async-storage/async-storage": "1.15.11",
Expand Down
2 changes: 2 additions & 0 deletions app/src/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ const translation = {
BiometricsNotProvided: 'Biometrics not provided, you may use PIN to load the wallet.',
BiometricsError: 'Biometrics were not successful.',
BiometricsErrorEnterPIN: 'Please enter your wallet PIN.',
LockedOut: 'You were locked out after {{ time }} minute(s) of inactivity.',
ReEnterPIN: 'Re-enter your wallet PIN',
LoggedOut: "You're logged out",
LoggedOutDescription:
"To protect your information, you're logged out of your wallet if you have not used it for 5 minutes.",
Expand Down
2 changes: 2 additions & 0 deletions app/src/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,8 @@ const translation = {
BiometricsNotProvided: 'La biométrie est indisponible. Veuillez saisir le NIP du portefeuille.',
BiometricsError: 'Échec de la biométrie.',
BiometricsErrorEnterPIN: 'Veuillez saisir le NIP du portefeuille.',
LockedOut: "Votre portefeuille a été verrouillé après {{ time }} minute(s) d'inactivité.",
ReEnterPIN: 'Saisissez à nouveau votre NIP.',
BiometricsChangedEnterPIN: 'Veuillez saisir le NIP du portefeuille.',
RepeatPIN: 'Essayez votre NIP à nouveau',
LoggedOut: 'Vous avez été déconnecté du portefeuille.',
Expand Down
4 changes: 2 additions & 2 deletions app/src/screens/UseBiometry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ const UseBiometry: React.FC = () => {
<View style={{ marginTop: 'auto', margin: 20 }}>
{store.onboarding.didCompleteOnboarding || (
<Button
title={'Continue'}
accessibilityLabel={'Continue'}
title={t('Global.Continue')}
accessibilityLabel={t('Global.Continue')}
testID={testIdWithKey('Continue')}
onPress={continueTouched}
buttonType={ButtonType.Primary}
Expand Down
58 changes: 29 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3236,9 +3236,9 @@ __metadata:
languageName: node
linkType: hard

"@hyperledger/aries-bifold-core@npm:1.0.0-alpha.381":
version: 1.0.0-alpha.381
resolution: "@hyperledger/aries-bifold-core@npm:1.0.0-alpha.381"
"@hyperledger/aries-bifold-core@npm:1.0.0-alpha.383":
version: 1.0.0-alpha.383
resolution: "@hyperledger/aries-bifold-core@npm:1.0.0-alpha.383"
peerDependencies:
"@credo-ts/anoncreds": 0.5.11
"@credo-ts/askar": 0.5.11
Expand Down Expand Up @@ -3314,13 +3314,13 @@ __metadata:
uuid: ^9.0.0
bin:
bifold: bin/bifold
checksum: 07652d5f43efe12f654f9291166573723ac37f4d78d40e443aa9a0c17344895446cb99641789fa17df960f1bdae1160a64e1aaac19b7ec8eb1c43d6798e7d655
checksum: 69dbb8208a51a5d8381ef5cf1c905274f36211529e882a90ac554f3541547a8ded74ca8005b6dcfc4f5b793bee1c5090ec6faca2ea0a507219d6779763b484ce
languageName: node
linkType: hard

"@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.381#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.381-f8d8192b81.patch":
version: 1.0.0-alpha.381
resolution: "@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.381#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.381-f8d8192b81.patch::version=1.0.0-alpha.381&hash=981fd5"
"@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.383#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.383-3a53f1a5ec.patch":
version: 1.0.0-alpha.383
resolution: "@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.383#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.383-3a53f1a5ec.patch::version=1.0.0-alpha.383&hash=7a84b1"
peerDependencies:
"@credo-ts/anoncreds": 0.5.11
"@credo-ts/askar": 0.5.11
Expand Down Expand Up @@ -3396,57 +3396,57 @@ __metadata:
uuid: ^9.0.0
bin:
bifold: bin/bifold
checksum: 667a08e088487fbb6984af6ae601912f0ba69ca6fef79eb587c6319b5c96d24814b5780fc92bde20d203585846753beca6579438fd93f8c500889cb62d89ea71
checksum: d6d2697eefe4c3c006ee2a59ca8415f5ad9dbd026f65df51356b302ebdef509b22f697e7efbc0c7a57856942d1226efc8fb556656fd40cda487675a9b9c5d404
languageName: node
linkType: hard

"@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.381":
version: 1.0.0-alpha.381
resolution: "@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.381"
"@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.383":
version: 1.0.0-alpha.383
resolution: "@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.383"
peerDependencies:
"@credo-ts/core": 0.5.11
axios: ^1.4.0
buffer: ^6.0.3
react: ^18.2.0
react-native: ^0.72.5
react-native-logs: ^5.1.0
checksum: 292a6e293cf53e6ab5dad3e9cf78d8594298840be7b50bca97d25c8f5fd161f2471ec512cc86cd7cd33b8c13992f0af24ffa3b57af54dde6e0f886ed4963d8f4
checksum: 7a49cfcca20ba937d4cfa5f1a7bc17d0534396e991183b0c60ef8fd0afc06d95d49faca97f850146d427f68430cece1bccd226e26cdb0f111eccd5872fe9b306
languageName: node
linkType: hard

"@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.381":
version: 1.0.0-alpha.381
resolution: "@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.381"
"@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.383":
version: 1.0.0-alpha.383
resolution: "@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.383"
peerDependencies:
"@credo-ts/anoncreds": 0.5.11
"@credo-ts/core": 0.5.11
"@credo-ts/react-hooks": ^0.6.0
"@hyperledger/anoncreds-shared": 0.2.4
react: ^18.2.0
checksum: 37b3a3144635fd61576908dbdddb0315ee0f44ca693e53016b7d6ddeeb692e8ce2ab5cd2c6a722449f361eed27795aca01ea06b17e627887359778f7be5c3e73
checksum: 2bcb27490614f4917c81ee7e7430560fc6967101c32ee03f4155aeace491ec46379b3d98726659b9a02568ecb4e28da26129698d225bf6545649bb195a2e5896
languageName: node
linkType: hard

"@hyperledger/aries-oca@npm:1.0.0-alpha.381":
version: 1.0.0-alpha.381
resolution: "@hyperledger/aries-oca@npm:1.0.0-alpha.381"
"@hyperledger/aries-oca@npm:1.0.0-alpha.383":
version: 1.0.0-alpha.383
resolution: "@hyperledger/aries-oca@npm:1.0.0-alpha.383"
dependencies:
"@credo-ts/anoncreds": "npm:0.5.11"
"@credo-ts/core": "npm:0.5.11"
axios: "npm:^1.4.0"
lodash.startcase: "npm:^4.4.0"
react-native-fs: "npm:^2.16.6"
checksum: a85f0f14af3b4d81d5056702772d659e65d5871ed7770328b89310d5359bedd7a5d9817eeea597c755343f6aad0b3d612f8690b0219a2aef80b52237d802d5af
checksum: 40513ff71fea6ecc29285a01322efca2d9ea3cd76d8070765aac828666831b5bcd680ec604d1095a42d0d6e06782fda9e4872899006cea8657363f1d2be5b6dc
languageName: node
linkType: hard

"@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.381":
version: 1.0.0-alpha.381
resolution: "@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.381"
"@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.383":
version: 1.0.0-alpha.383
resolution: "@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.383"
peerDependencies:
react: "*"
react-native: "*"
checksum: 6f52f3418db9fdaf4ea3066b414308f419a4c1ca71fc01614f08b452f3b7e5b73d8268b253ab7666e5c362cbd3b6c5e8689905b4dddc7c6c02e66437ed61dfdb
checksum: e794ba9f8be02469e4a80a0a8020cf6b0ce0515050d44060d3d3daca07f04741e33f6c5e3756c335b815c8c27fb72a908026a3e3af1ac3a52db67dab70759cd5
languageName: node
linkType: hard

Expand Down Expand Up @@ -19776,11 +19776,11 @@ __metadata:
"@formatjs/intl-relativetimeformat": "npm:9.3.1"
"@hyperledger/anoncreds-react-native": "npm:0.2.4"
"@hyperledger/aries-askar-react-native": "npm:0.2.3"
"@hyperledger/aries-bifold-core": "patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.381#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.381-f8d8192b81.patch"
"@hyperledger/aries-bifold-remote-logs": "npm:1.0.0-alpha.381"
"@hyperledger/aries-bifold-verifier": "npm:1.0.0-alpha.381"
"@hyperledger/aries-oca": "npm:1.0.0-alpha.381"
"@hyperledger/aries-react-native-attestation": "npm:1.0.0-alpha.381"
"@hyperledger/aries-bifold-core": "patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.383#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.383-3a53f1a5ec.patch"
"@hyperledger/aries-bifold-remote-logs": "npm:1.0.0-alpha.383"
"@hyperledger/aries-bifold-verifier": "npm:1.0.0-alpha.383"
"@hyperledger/aries-oca": "npm:1.0.0-alpha.383"
"@hyperledger/aries-react-native-attestation": "npm:1.0.0-alpha.383"
"@hyperledger/indy-vdr-react-native": "npm:0.2.2"
"@hyperledger/indy-vdr-shared": "npm:0.2.2"
"@react-native-async-storage/async-storage": "npm:1.15.11"
Expand Down

0 comments on commit 14e9573

Please sign in to comment.