Skip to content

Commit

Permalink
feat(deps): new step one of verified in person flow (#2241)
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce McMath <[email protected]>
  • Loading branch information
bryce-mcmath authored Oct 31, 2024
1 parent e09589f commit 4deb0c4
Show file tree
Hide file tree
Showing 50 changed files with 3,634 additions and 127 deletions.
16 changes: 11 additions & 5 deletions app/__mocks__/@react-native-async-storage/async-storage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
const AsyncStorage = {}
const store = {}

AsyncStorage.getItem = () => {
return null
}
export default class AsyncStorage {
static getItem = (key) => {
return store[key]
}

static setItem = (key, value) => {
store[key] = value

export default AsyncStorage
return null
}
}
6 changes: 4 additions & 2 deletions app/android/app/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
androidx.activity:activity:1.2.4=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.annotation:annotation-experimental:1.1.0=debugAndroidTestCompileClasspath
androidx.annotation:annotation-experimental:1.4.0=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.annotation:annotation-jvm:1.9.0-alpha01=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.annotation:annotation-jvm:1.9.0=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.annotation:annotation:1.3.0=debugAndroidTestCompileClasspath
androidx.annotation:annotation:1.9.0-alpha01=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.annotation:annotation:1.9.0=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.appcompat:appcompat-resources:1.4.1=debugAndroidTestCompileClasspath
androidx.appcompat:appcompat-resources:1.4.2=debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
androidx.appcompat:appcompat:1.4.1=debugAndroidTestCompileClasspath
Expand Down Expand Up @@ -152,6 +152,8 @@ com.squareup.okhttp3:okhttp:4.9.2=debugAndroidTestCompileClasspath,debugCompileC
com.squareup.okio:okio:2.9.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
javax.inject:javax.inject:1=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
net.java.dev.jna:jna:5.14.0=debugAndroidTestCompileClasspath,debugCompileClasspath,debugRuntimeClasspath,debugUnitTestCompileClasspath,debugUnitTestRuntimeClasspath,releaseCompileClasspath,releaseRuntimeClasspath,releaseUnitTestCompileClasspath,releaseUnitTestRuntimeClasspath
net.time4j:time4j-android:4.8-2021a=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
org.apache.commons:commons-lang3:3.8=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
org.greenrobot:eventbus:3.1.0=debugRuntimeClasspath,debugUnitTestRuntimeClasspath,releaseRuntimeClasspath,releaseUnitTestRuntimeClasspath
org.jacoco:org.jacoco.agent:0.8.8=androidJacocoAnt
org.jacoco:org.jacoco.ant:0.8.8=androidJacocoAnt
Expand Down
13 changes: 12 additions & 1 deletion app/container-imp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { AttestationRestrictions, autoDisableRemoteLoggingIntervalInMinutes } fr
import { activate, deactivate, setup, status } from './src/helpers/PushNotificationsHelper'
import { expirationOverrideInMinutes } from './src/helpers/utils'
import { useNotifications } from './src/hooks/notifications'
import VerifiedPersonStack from './src/navigators/VerifiedPersonStack'
import VerifiedPersonStack from './src/modules/unified/navigators/VerifiedPersonStack'
import Developer from './src/screens/Developer'
import { pages } from './src/screens/OnboardingPages'
import PersonCredential from './src/screens/PersonCredential'
Expand All @@ -63,6 +63,7 @@ import {
DismissPersonCredentialOffer,
IASEnvironment,
RemoteDebuggingState,
Unified,
initialState,
} from './src/store'

Expand Down Expand Up @@ -212,6 +213,7 @@ export class AppContainer implements Container {
},
],
enableTours: true,
enableChat: true,
supportedLanguages: ['en'],
showPreface: true,
disableOnboardingSkip: true,
Expand Down Expand Up @@ -347,6 +349,7 @@ export class AppContainer implements Container {
let onboarding = initialState.onboarding
let personCredOfferDissmissed = initialState.dismissPersonCredentialOffer
let { environment, remoteDebugging, enableProxy, enableAltPersonFlow } = initialState.developer
let unified = initialState.unified

await Promise.all([
loadLoginAttempt().then((data) => {
Expand All @@ -366,7 +369,14 @@ export class AppContainer implements Container {
loadState<RemoteDebuggingState>(BCLocalStorageKeys.RemoteDebugging, (val) => (remoteDebugging = val)),
loadState<boolean>(BCLocalStorageKeys.EnableProxy, (val) => (enableProxy = val)),
loadState<boolean>(BCLocalStorageKeys.EnableAltPersonFlow, (val) => (enableAltPersonFlow = val)),
loadState<Unified>(BCLocalStorageKeys.Unified, (val) => (unified = val)),
])

// Convert date string to Date object (async-storage converts Dates to strings)
if (typeof unified.birthdate === 'string') {
unified.birthdate = new Date(Date.parse(unified.birthdate))
}

const state: BCState = {
...initialState,
loginAttempt: { ...initialState.loginAttempt, ...loginAttempt },
Expand All @@ -385,6 +395,7 @@ export class AppContainer implements Container {
enableProxy,
enableAltPersonFlow,
},
unified: { ...initialState.unified, ...unified },
}

const { enabledAt, sessionId } = state.developer.remoteDebugging
Expand Down
10 changes: 8 additions & 2 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,15 @@ PODS:
- React-jsinspector (0.72.5)
- React-logger (0.72.5):
- glog
- "react-native-attestation (1.0.0-alpha.350+f774551f)":
- "react-native-attestation (1.0.0-alpha.353+7257e199)":
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-config (1.5.0):
- react-native-config/App (= 1.5.0)
- react-native-config/App (1.5.0):
- React-Core
- react-native-date-picker (5.0.7):
- React-Core
- react-native-encrypted-storage (4.0.3):
- React-Core
- react-native-get-random-values (1.8.0):
Expand Down Expand Up @@ -685,6 +687,7 @@ DEPENDENCIES:
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- "react-native-attestation (from `../node_modules/@hyperledger/aries-react-native-attestation`)"
- react-native-config (from `../node_modules/react-native-config`)
- react-native-date-picker (from `../node_modules/react-native-date-picker`)
- react-native-encrypted-storage (from `../node_modules/react-native-encrypted-storage`)
- react-native-get-random-values (from `../node_modules/react-native-get-random-values`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
Expand Down Expand Up @@ -803,6 +806,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@hyperledger/aries-react-native-attestation"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-date-picker:
:path: "../node_modules/react-native-date-picker"
react-native-encrypted-storage:
:path: "../node_modules/react-native-encrypted-storage"
react-native-get-random-values:
Expand Down Expand Up @@ -931,8 +936,9 @@ SPEC CHECKSUMS:
React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a
React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
react-native-attestation: 7c223c9b56e30beee893b4495f72a85798a6b00d
react-native-attestation: 6e7fb59eb29b078162071fcc6c84752d2f88e1e4
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
react-native-date-picker: 06a4d96ab525a163c7a90bccd68833d136b0bb13
react-native-encrypted-storage: db300a3f2f0aba1e818417c1c0a6be549038deb7
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
react-native-netinfo: 2517ad504b3d303e90d7a431b0fcaef76d207983
Expand Down
11 changes: 6 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": "1.0.0-alpha.350",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.350",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.350",
"@hyperledger/aries-oca": "1.0.0-alpha.350",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.350",
"@hyperledger/aries-bifold-core": "1.0.0-alpha.353",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.353",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.353",
"@hyperledger/aries-oca": "1.0.0-alpha.353",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.353",
"@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 Expand Up @@ -96,6 +96,7 @@
"react-native-collapsible": "1.6.1",
"react-native-config": "1.5.0",
"react-native-confirmation-code-field": "7.3.1",
"react-native-date-picker": "^5.0.7",
"react-native-device-info": "8.7.1",
"react-native-encrypted-storage": "4.0.3",
"react-native-fs": "2.20.0",
Expand Down
62 changes: 60 additions & 2 deletions app/src/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,22 @@ const translation = {
"Settings": "Menu",
"Preface": "BC Wallet",
"VerificationSteps": "Setup steps",
"ChooseID": "Choose your identification",
"EvidenceCollectionStep": {
"Stage1": "Choose your identification",
"Stage2": "Instructions",
"Stage3": "Scan your identification",
"Stage4": "Enter serial number",
"Stage5": "Enter birthdate",
},
"ResidentialAddressStep": {
"Stage1": "TODO",
},
"EmailStep": {
"Stage1": "TODO",
},
"VerifyIdentityStep": {
"Stage1": "TODO",
},
},
"PersonCredentialNotification": {
"Title": "Get your Person credential",
Expand All @@ -85,7 +100,6 @@ const translation = {
"WhatIsPersonCredentialLink": "What is a Person credential",
"WhereToUseLink": "Where to use",
"HelpLink": "Help",
"ScanOrTakePhotos": "Scan or take photos of your ID."
},
"NetInfo": {
"NoInternetConnectionTitle": "No internet connection",
Expand Down Expand Up @@ -185,6 +199,50 @@ const translation = {
"WhereToUseLink": "See where you can use BC Wallet",
"BadQRCodeDescription": "Ths QR code scanned doesn't work with BC Wallet. BC Wallet only works with participating services.\n\nIt currently can't add digital credentials by taking photos of physical ones."
},
"Unified": {
"Steps": {
"ScanOrTakePhotos": "Scan or take photos of your ID."
},
"ChooseYourID": {
"WhatCardDoYou": "What BC Services Card do you have?",
"SomePeopleStillCallIt": "Some people still call it a CareCard or a Health Card. It has your personal health number (PHN) on the back.",
"CombinedCard": "Combined card",
"CombinedCardActionText": "It's combined with my driver's licence",
"CombinedCardDescription": "Use this card for a faster way to set up the app.",
"PhotoCard": "Photo card",
"PhotoCardActionText": "A card with my photo",
"PhotoCardDescription": "Use this card for a faster way to set up the app.",
"NoPhotoCard": "Non photo card",
"NoPhotoCardActionText": "A card without a photo",
"NoPhotoCardDescription": "Use this card + photo ID to set up the app.",
"DontHaveOne": "Don't have one?",
"CheckBefore": "Check before you continue. It's faster to set up with one of the above.",
"CheckForServicesCard": "Check for BC Services Card",
"CheckIfIHave": "Check if I have a BC Services Card",
"OtherID": "Other ID",
"OtherIDActionText": "Set up with other ID",
"OtherIDDescription": "This option takes the longest to set up. You'll need 2 IDs to set up the app and have limited access to services.",
},
"Instructions": {
"Heading": "Provide the card serial number on the back right side of your card.",
"Paragraph": "When scanning, you should place the card in front of a white background for best results.",
"ScanBarcode": "Scan Barcode with Camera",
"EnterManually": "Enter Serial Number Manually",
},
"Scan": {},
"ManualSerial": {
"InputLabel": "Serial number",
"InputSubText": "Enter the letter and numbers by the barcode on the back of your card.",
"EmptySerialError": "Required",
"CharCountError": "Cannot exceed 15 characters",
},
"Birthdate": {
"CardSerialNumber": "Card serial number: {{ serial }}",
"Heading": "Enter your birthdate",
"Paragraph": "Your birthdate is only used to to set up this app. It is not shared.",
"InputLabel": "Birthdate",
},
},
"RemoteLogging": {
"ScreenTitle": "Remote troubleshooting",
"Heading": "Collection notice",
Expand Down
62 changes: 60 additions & 2 deletions app/src/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,22 @@ const translation = {
"Settings": "Menu",
"Preface": "BC Wallet",
"VerificationSteps": "Setup steps (FR)",
"ChooseID": "Choose your identification (FR)",
"EvidenceCollectionStep": {
"Stage1": "Choose your identification (FR)",
"Stage2": "Instructions (FR)",
"Stage3": "Scan your identification (FR)",
"Stage4": "Enter serial number (FR)",
"Stage5": "Enter birthdate (FR)",
},
"ResidentialAddressStep": {
"Stage1": "TODO",
},
"EmailStep": {
"Stage1": "TODO",
},
"VerifyIdentityStep": {
"Stage1": "TODO",
},
},
"PersonCredentialNotification": {
"Title": "Obtener votre carte d'identité",
Expand All @@ -84,7 +99,6 @@ const translation = {
"WhatIsPersonCredentialLink": "Qu'est-ce qu'un justificatif personnel",
"WhereToUseLink": "Où l'utiliser",
"HelpLink": "Aide",
"ScanOrTakePhotos": "Scan or take photos of your ID. (FR)"
},
"NetInfo": {
"NoInternetConnectionTitle": "Aucune connection internet",
Expand Down Expand Up @@ -184,6 +198,50 @@ const translation = {
"WhereToUseLink": "Voyez où vous pouvez utiliser BC Wallet.",
"BadQRCodeDescription": "Le code QR scanné ne fonctionne pas avec BC Wallet. BC Wallet ne fonctionne qu'avec les services participants.\n\nIl ne peut actuellement pas ajouter de justificatifs numériques en prenant des photos de justificatifs physiques."
},
"Unified": {
"Steps": {
"ScanOrTakePhotos": "Scan or take photos of your ID. (FR)",
},
"ChooseYourID": {
"WhatCardDoYou": "What BC Services Card do you have? (FR)",
"SomePeopleStillCallIt": "Some people still call it a CareCard or a Health Card. It has your personal health number (PHN) on the back. (FR)",
"CombinedCard": "Combined card (FR)",
"CombinedCardActionText": "It's combined with my driver's licence (FR)",
"CombinedCardDescription": "Use this card for a faster way to set up the app. (FR)",
"PhotoCard": "Photo card (FR)",
"PhotoCardActionText": "A card with my photo (FR)",
"PhotoCardDescription": "Use this card for a faster way to set up the app. (FR)",
"NoPhotoCard": "Non photo card (FR)",
"NoPhotoCardActionText": "A card without a photo (FR)",
"NoPhotoCardDescription": "Use this card + photo ID to set up the app. (FR)",
"DontHaveOne": "Don't have one? (FR)",
"CheckBefore": "Check before you continue. It's faster to set up with one of the above. (FR)",
"CheckForServicesCard": "Check for BC Services Card (FR)",
"CheckIfIHave": "Check if I have a BC Services Card (FR)",
"OtherID": "Other ID (FR)",
"OtherIDActionText": "Set up with other ID (FR)",
"OtherIDDescription": "This option takes the longest to set up. You'll need 2 IDs to set up the app and have limited access to services. (FR)",
},
"Instructions": {
"Heading": "Provide the card serial number on the back right side of your card. (FR)",
"Paragraph": "When scanning, you should place the card in front of a white background for best results. (FR)",
"ScanBarcode": "Scan Barcode with Camera (FR)",
"EnterManually": "Enter Serial Number Manually (FR)",
},
"Scan": {},
"ManualSerial": {
"InputLabel": "Serial number (FR)",
"InputSubText": "Enter the letter and numbers by the barcode on the back of your card. (FR)",
"EmptySerialError": "Required (FR)",
"CharCountError": "Cannot exceed 15 characters (FR)",
},
"Birthdate": {
"CardSerialNumber": "Card serial number: {{ serial }} (FR)",
"Heading": "Enter your birthdate (FR)",
"Paragraph": "Your birthdate is only used to to set up this app. It is not shared. (FR)",
"InputLabel": "Birthdate (FR)",
},
},
"RemoteLogging": {
"ScreenTitle": "Dépannage à distance",
"Heading": "Avis de collecte",
Expand Down
Loading

0 comments on commit 4deb0c4

Please sign in to comment.