Skip to content

Commit

Permalink
chore: mise à jour du bifold vers la version 436 (#243)
Browse files Browse the repository at this point in the history
Signed-off-by: fc-santos <[email protected]>
  • Loading branch information
fc-santos authored Jan 31, 2025
1 parent c6d5012 commit 3e95985
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
diff --git a/App/components/listItems/NotificationListItem.tsx b/App/components/listItems/NotificationListItem.tsx
index ce791235318e3b773a7f97580f9e205ad9995ded..1bc8109123f4e793dd994dccaa84e3cf7845dc01 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..cad23deeaecba2faebdffe1f1f297f70f408482c 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,48 @@ 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
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.17)
- React-logger (0.72.17):
- glog
- "react-native-attestation (1.0.0-alpha.434+c7903a40)":
- "react-native-attestation (1.0.0-alpha.436+c65cbd86)":
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-config (1.5.0):
Expand Down Expand Up @@ -783,7 +783,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 8dc585381e476c3ff2e9468f444c90c4d1d5b874
React-jsinspector: 853b8631b908636bb09ef77cb217376c38a0c8ff
React-logger: 9ca44bb5703bf2355f3c2d2e5e67bfe98ca2dc34
react-native-attestation: 85972788aa95e5b5b07b3d7f1a8bb20719b5b13f
react-native-attestation: 568ad5ea03765e2b07c5623ed05701242608093c
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.434#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.434-f1346e501a.patch",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.434",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.434",
"@hyperledger/aries-oca": "1.0.0-alpha.434",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.434",
"@hyperledger/aries-bifold-core": "1.0.0-alpha.436",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.436",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.436",
"@hyperledger/aries-oca": "1.0.0-alpha.436",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.436",
"@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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"react-native-vision-camera": "4.3.1",
"@credo-ts/react-hooks": "patch:@credo-ts/react-hooks@npm%3A0.6.0#./.yarn/patches/@credo-ts-react-hooks-npm-0.6.0-3c59ce13d2.patch",
"@hyperledger/indy-vdr-shared@npm:0.2.2": "patch:@hyperledger/indy-vdr-shared@npm%3A0.2.2#~/.yarn/patches/@hyperledger-indy-vdr-shared-npm-0.2.2-b989282fc6.patch",
"@hyperledger/indy-vdr-react-native": "patch:@hyperledger/indy-vdr-react-native@npm%3A0.2.2#~/.yarn/patches/@hyperledger-indy-vdr-react-native-npm-0.2.2-627d424b96.patch"
"@hyperledger/indy-vdr-react-native": "patch:@hyperledger/indy-vdr-react-native@npm%3A0.2.2#~/.yarn/patches/@hyperledger-indy-vdr-react-native-npm-0.2.2-627d424b96.patch",
"@hyperledger/aries-bifold-core@npm:^1.0.0-alpha.436+c65cbd86": "patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.436#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.436-cdfc82d5ec.patch"
}
}
60 changes: 30 additions & 30 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.434, @hyperledger/aries-bifold-core@npm:^1.0.0-alpha.434+c7903a40":
version: 1.0.0-alpha.434
resolution: "@hyperledger/aries-bifold-core@npm:1.0.0-alpha.434"
"@hyperledger/aries-bifold-core@npm:1.0.0-alpha.436":
version: 1.0.0-alpha.436
resolution: "@hyperledger/aries-bifold-core@npm:1.0.0-alpha.436"
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: 063efd97e7d3a6b963a69098d253e7cc3daac041ce704187064e380ef8e63995fb32344396926bfd422d5ffab545f9461c6122d2e75f47208a0e70ae234d57ef
checksum: e575ff6dbee5bfc0557d674a71bd8dcb06f88b7a650e8339870b5c1dd4ef28d527dc9eaefc22d755aa54d0d97f01487e094c74eef481ed9552fb711a4581b398
languageName: node
linkType: hard

"@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.434#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.434-f1346e501a.patch":
version: 1.0.0-alpha.434
resolution: "@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.434#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.434-f1346e501a.patch::version=1.0.0-alpha.434&hash=52c62b"
"@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.436#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.436-cdfc82d5ec.patch":
version: 1.0.0-alpha.436
resolution: "@hyperledger/aries-bifold-core@patch:@hyperledger/aries-bifold-core@npm%3A1.0.0-alpha.436#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.436-cdfc82d5ec.patch::version=1.0.0-alpha.436&hash=52c62b"
peerDependencies:
"@credo-ts/anoncreds": 0.5.11
"@credo-ts/askar": 0.5.11
Expand Down Expand Up @@ -3396,16 +3396,16 @@ __metadata:
uuid: ^9.0.0
bin:
bifold: bin/bifold
checksum: 63449963f49a8789fd8f8ea61440d0ca1470685271649398ca0334432191295e243aa434babafe20a117e2f72a952c60d92fe4650d4ef122463df42ac165a10f
checksum: baaadb24c015b86a963451ab4c3611ff5a07de4668d93b28eadcbb5fd31408ed778d9c302de9236fc77654148f52d6912b0ea66714ebdee9aec8d19ae872ef49
languageName: node
linkType: hard

"@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.434":
version: 1.0.0-alpha.434
resolution: "@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.434"
"@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.436":
version: 1.0.0-alpha.436
resolution: "@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.436"
dependencies:
"@credo-ts/core": "npm:0.5.11"
"@hyperledger/aries-bifold-core": "npm:^1.0.0-alpha.434+c7903a40"
"@hyperledger/aries-bifold-core": "npm:^1.0.0-alpha.436+c65cbd86"
axios: "npm:^1.4.0"
buffer: "npm:^6.0.3"
react: "npm:18.2.0"
Expand All @@ -3418,43 +3418,43 @@ __metadata:
react: ^18.2.0
react-native: ^0.72.17
react-native-logs: ^5.1.0
checksum: 011b433d6bfb7001c5b3beaf5779d057986f0217f3a0251d74e8333380f2b8b2ca97e76e2436e59be42c75dbee29add8df4eaccd9dcd9d8cb319289e34463a86
checksum: f118b8d11e85ca613e5cf84f5429518c6ee815846ea0f4aca43cdecbb523dda4bc5a695a1bdf36d33dd10bb4e06c949f5219ae3854fbc97b0ff84c8397b9b501
languageName: node
linkType: hard

"@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.434":
version: 1.0.0-alpha.434
resolution: "@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.434"
"@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.436":
version: 1.0.0-alpha.436
resolution: "@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.436"
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: e53944c8e585b843f40aa25d6f0815869bce477f1e8236119ddce1cbf9333d51fa6e8df66a0f51727d73cca448f09317a3e8b92a9f9b33e81b205a89dfff3b76
checksum: 099cc02176651b3708cc33d88f7cb9c97b11567003dde880b323fb7fa99db4bdef7dc1af5cd49e1d99b54a114df9b7c18ecafb6e8ccfe5b90264a60fadd40ffa
languageName: node
linkType: hard

"@hyperledger/aries-oca@npm:1.0.0-alpha.434":
version: 1.0.0-alpha.434
resolution: "@hyperledger/aries-oca@npm:1.0.0-alpha.434"
"@hyperledger/aries-oca@npm:1.0.0-alpha.436":
version: 1.0.0-alpha.436
resolution: "@hyperledger/aries-oca@npm:1.0.0-alpha.436"
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: 8cd0562c17dbe6da71edc33b216f47e63cffe2e5cf814fb526d915818e5fcc7e76c45e529c41b4f5c096c08f2586b5be3e9a848a8a5af57d5aaff900ad54b26f
checksum: 77e70590a91d1de5a0a3a9ec00917c51fc9531e42c075fe6e281a0bb3bb6dcec500b7a96b8269ca5a79a0de3562a8412d51fd58dfd6b6d50fcb51cce59ea7e80
languageName: node
linkType: hard

"@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.434":
version: 1.0.0-alpha.434
resolution: "@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.434"
"@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.436":
version: 1.0.0-alpha.436
resolution: "@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.436"
peerDependencies:
react: "*"
react-native: "*"
checksum: b170b72d8e3c2d39ab54fd2dbfa99116976d0111ced1d2bda89a731158a4d33aa9c230f8fd5bdf68599597917c11b21ccdc43f72c5a64551ea333371a8d5a3b2
checksum: 6af449a01a91be88310bbefd5f86e09a3ccd707b1c2c5cad6968e77cf0a62b897a472e3fe3790c48f66f139bd651e727e25665ed8c5d49522cba428781745fa3
languageName: node
linkType: hard

Expand Down Expand Up @@ -20136,11 +20136,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.434#~/.yarn/patches/@hyperledger-aries-bifold-core-npm-1.0.0-alpha.434-f1346e501a.patch"
"@hyperledger/aries-bifold-remote-logs": "npm:1.0.0-alpha.434"
"@hyperledger/aries-bifold-verifier": "npm:1.0.0-alpha.434"
"@hyperledger/aries-oca": "npm:1.0.0-alpha.434"
"@hyperledger/aries-react-native-attestation": "npm:1.0.0-alpha.434"
"@hyperledger/aries-bifold-core": "npm:1.0.0-alpha.436"
"@hyperledger/aries-bifold-remote-logs": "npm:1.0.0-alpha.436"
"@hyperledger/aries-bifold-verifier": "npm:1.0.0-alpha.436"
"@hyperledger/aries-oca": "npm:1.0.0-alpha.436"
"@hyperledger/aries-react-native-attestation": "npm:1.0.0-alpha.436"
"@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 3e95985

Please sign in to comment.