Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update bifold 232 #1984

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/container-imp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
DispatchAction,
} from '@hyperledger/aries-bifold-core'
import { RemoteLogger, RemoteLoggerOptions } from '@hyperledger/aries-bifold-remote-logs'
import { BrandingOverlayType, RemoteOCABundleResolver } from '@hyperledger/aries-oca/build/legacy'
import AsyncStorage from '@react-native-async-storage/async-storage'
import { Config } from 'react-native-config'
import {
Expand Down Expand Up @@ -42,6 +43,12 @@ export class AppContainer implements Container {
this.container.registerInstance(TOKENS.SCREEN_PREFACE, Preface)
this.container.registerInstance(TOKENS.SCREEN_TERMS, { screen: Terms, version: TermsVersion })
this.container.registerInstance(TOKENS.SCREEN_DEVELOPER, Developer)

const resolver = new RemoteOCABundleResolver(Config.OCA_URL ?? '', {
brandingOverlayType: BrandingOverlayType.Branding10,
})

this.container.registerInstance(TOKENS.UTIL_OCA_RESOLVER, resolver)
this.container.registerInstance(TOKENS.LOAD_STATE, async (dispatch: React.Dispatch<ReducerAction<unknown>>) => {
const loadState = async <Type>(key: LocalStorageKeys | BCLocalStorageKeys, updateVal: (val: Type) => void) => {
const data = await AsyncStorage.getItem(key)
Expand Down
10 changes: 5 additions & 5 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
"@formatjs/intl-relativetimeformat": "9.3.1",
"@hyperledger/anoncreds-react-native": "0.2.1",
"@hyperledger/aries-askar-react-native": "0.2.1",
"@hyperledger/aries-bifold-core": "1.0.0-alpha.230",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.230",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.230",
"@hyperledger/aries-oca": "1.0.0-alpha.230",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.230",
"@hyperledger/aries-bifold-core": "1.0.0-alpha.232",
"@hyperledger/aries-bifold-remote-logs": "1.0.0-alpha.232",
"@hyperledger/aries-bifold-verifier": "1.0.0-alpha.232",
"@hyperledger/aries-oca": "1.0.0-alpha.232",
"@hyperledger/aries-react-native-attestation": "1.0.0-alpha.232",
"@hyperledger/indy-vdr-react-native": "0.2.2",
"@react-native-async-storage/async-storage": "1.15.11",
"@react-native-community/masked-view": "0.1.11",
Expand Down
8 changes: 0 additions & 8 deletions app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import {
translationResources,
ConfigurationContext,
Record,
indyLedgers,
defaultConfiguration,
Stacks,
Screens,
Agent,
} from '@hyperledger/aries-bifold-core'
import { BrandingOverlayType, RemoteOCABundleResolver } from '@hyperledger/aries-oca/build/legacy'
import merge from 'lodash.merge'
import { ReducerAction } from 'react'
import { Linking } from 'react-native'
Expand Down Expand Up @@ -39,8 +37,6 @@ const localization = merge({}, translationResources, {
fr: { translation: fr },
'pt-BR': { translation: ptBr },
})
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const selectedLedgers = indyLedgers.filter((ledger: any) => ledger.indyNamespace !== 'indicio')
const configuration: ConfigurationContext = {
...defaultConfiguration,
pages,
Expand All @@ -53,12 +49,8 @@ const configuration: ConfigurationContext = {
credentialListOptions: AddCredentialSlider,
credentialEmptyList: EmptyList,
developer: Developer,
OCABundleResolver: new RemoteOCABundleResolver(Config.OCA_URL ?? '', {
brandingOverlayType: BrandingOverlayType.Branding10,
}),
proofTemplateBaseUrl: Config.PROOF_TEMPLATE_URL,
record: Record,
indyLedgers: selectedLedgers,
settings: [],
customNotification: {
component: PersonCredential,
Expand Down
6 changes: 4 additions & 2 deletions app/src/screens/Splash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Splash = () => {
const navigation = useNavigation()
const { getWalletCredentials } = useAuth()
const { ColorPallet, Assets } = useTheme()
const { indyLedgers, showPreface, enablePushNotifications, OCABundleResolver } = useConfiguration()
const { showPreface, enablePushNotifications } = useConfiguration()
const [mounted, setMounted] = useState(false)
const [stepText, setStepText] = useState<string>(t('Init.Starting'))
const [progressPercent, setProgressPercent] = useState(0)
Expand All @@ -131,6 +131,8 @@ const Splash = () => {
const [initError, setInitError] = useState<Error | null>(null)
const container = useContainer()
const logger = container.resolve(TOKENS.UTIL_LOGGER)
const indyLedgers = container.resolve(TOKENS.UTIL_LEDGERS)
const ocaBundleResolver = container.resolve(TOKENS.UTIL_OCA_RESOLVER) as RemoteOCABundleResolver

const steps: string[] = [
t('Init.Starting'),
Expand Down Expand Up @@ -316,7 +318,7 @@ const Splash = () => {

setStep(3)

await (OCABundleResolver as RemoteOCABundleResolver).checkForUpdates()
await ocaBundleResolver.checkForUpdates()
const credentials = await getWalletCredentials()

if (!credentials?.id || !credentials.key) {
Expand Down
50 changes: 25 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4280,9 +4280,9 @@ __metadata:
languageName: node
linkType: hard

"@hyperledger/aries-bifold-core@npm:1.0.0-alpha.230":
version: 1.0.0-alpha.230
resolution: "@hyperledger/aries-bifold-core@npm:1.0.0-alpha.230"
"@hyperledger/aries-bifold-core@npm:1.0.0-alpha.232":
version: 1.0.0-alpha.232
resolution: "@hyperledger/aries-bifold-core@npm:1.0.0-alpha.232"
peerDependencies:
"@credo-ts/anoncreds": 0.5.2
"@credo-ts/askar": 0.5.2
Expand Down Expand Up @@ -4355,57 +4355,57 @@ __metadata:
uuid: ^9.0.0
bin:
bifold: bin/bifold
checksum: b8c567907e0364c55d49af7705e8f4c84a6fad18c7527c3ae1dbaff5d86e7bcfdcbedfffebdf2cdf8876383186a8ecc7cb58772d298ff6fbee0581c0e861d1b4
checksum: dee972730fa5455db4d965f0469c8ce0a2a668f0d565882ecf431321c8adbdc2001d91871a799ae90a2679854094834e408eb854582858e2fcd83c6437c90a2e
languageName: node
linkType: hard

"@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.230":
version: 1.0.0-alpha.230
resolution: "@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.230"
"@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.232":
version: 1.0.0-alpha.232
resolution: "@hyperledger/aries-bifold-remote-logs@npm:1.0.0-alpha.232"
peerDependencies:
"@credo-ts/core": 0.5.2
axios: ^1.4.0
buffer: ^6.0.3
react: ^18.2.0
react-native: ^0.72.5
react-native-logs: ^5.1.0
checksum: b767bfe8a3390652bebecca960bbefb6bb964045d2392f04381332fcff76492b97e4220c2af164c293ea94f131d048d8dca8901f6e46eeeac1df12e9e7a8d5ea
checksum: 288560668159baad89e5bbfe4f9c4ed743d84dbcd375c36d938c3286fff1eca4503ce1652f48e0da780fe8b274dc973debab86e9bd3d3db674ab58c9165e844b
languageName: node
linkType: hard

"@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.230":
version: 1.0.0-alpha.230
resolution: "@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.230"
"@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.232":
version: 1.0.0-alpha.232
resolution: "@hyperledger/aries-bifold-verifier@npm:1.0.0-alpha.232"
peerDependencies:
"@credo-ts/anoncreds": 0.5.2
"@credo-ts/core": 0.5.2
"@credo-ts/react-hooks": ^0.6.0
"@hyperledger/anoncreds-shared": ^0.2.1
react: ^18.2.0
checksum: eb2d375a7502119a61b212889e6ef891d6b0e970753572a7c4edcdb6ec029391d0c92b68be5fb33651f1eef360b3c2dadaad1c762a06d74a317ec881a06f5596
checksum: 0f2189e2c28047e14b548766af9f6c546d4515f5ae172a69bc1eea10ed189effcc189006d543637cb8528c42957d93d25d3a1045b31e655744c6aed270d192ea
languageName: node
linkType: hard

"@hyperledger/aries-oca@npm:1.0.0-alpha.230":
version: 1.0.0-alpha.230
resolution: "@hyperledger/aries-oca@npm:1.0.0-alpha.230"
"@hyperledger/aries-oca@npm:1.0.0-alpha.232":
version: 1.0.0-alpha.232
resolution: "@hyperledger/aries-oca@npm:1.0.0-alpha.232"
dependencies:
"@credo-ts/anoncreds": "npm:0.5.2"
"@credo-ts/core": "npm:0.5.2"
axios: "npm:^1.4.0"
lodash.startcase: "npm:^4.4.0"
react-native-fs: "npm:^2.16.6"
checksum: 97ea15795b5fa3558cd143ea4c981ede181b2df7f4f31a0cc85299deb85584c47fbdc01c4eb90651bbd41b9a5dd160d3029584ca8fb24313964ddfd079c38c3f
checksum: 8bddffd59f61dea56efdde0c70a5b079b204ebec25a398a589665545b40b9ee80c86573576e38a29cb117289da057227228e788b819049a21211e0acecd916a9
languageName: node
linkType: hard

"@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.230":
version: 1.0.0-alpha.230
resolution: "@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.230"
"@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.232":
version: 1.0.0-alpha.232
resolution: "@hyperledger/aries-react-native-attestation@npm:1.0.0-alpha.232"
peerDependencies:
react: "*"
react-native: "*"
checksum: edc352b9aba1d0b379fb7488a446262a8b6ac4d43f1c7594359639760fd84ddb9eb080f9fd154b16550709baa5d678f7bfd05a734aea11d06028e56b6d972045
checksum: b74c09bd9070c5e6716be923e378fe24b316c05b77dab3382c01fce5ab7d9523b133e05655e6eee5b2d49e09526c77b03c6816a8664dbfa9c663b427180ac1f9
languageName: node
linkType: hard

Expand Down Expand Up @@ -8900,11 +8900,11 @@ __metadata:
"@formatjs/intl-relativetimeformat": "npm:9.3.1"
"@hyperledger/anoncreds-react-native": "npm:0.2.1"
"@hyperledger/aries-askar-react-native": "npm:0.2.1"
"@hyperledger/aries-bifold-core": "npm:1.0.0-alpha.230"
"@hyperledger/aries-bifold-remote-logs": "npm:1.0.0-alpha.230"
"@hyperledger/aries-bifold-verifier": "npm:1.0.0-alpha.230"
"@hyperledger/aries-oca": "npm:1.0.0-alpha.230"
"@hyperledger/aries-react-native-attestation": "npm:1.0.0-alpha.230"
"@hyperledger/aries-bifold-core": "npm:1.0.0-alpha.232"
"@hyperledger/aries-bifold-remote-logs": "npm:1.0.0-alpha.232"
"@hyperledger/aries-bifold-verifier": "npm:1.0.0-alpha.232"
"@hyperledger/aries-oca": "npm:1.0.0-alpha.232"
"@hyperledger/aries-react-native-attestation": "npm:1.0.0-alpha.232"
"@hyperledger/indy-vdr-react-native": "npm:0.2.2"
"@react-native-async-storage/async-storage": "npm:1.15.11"
"@react-native-community/masked-view": "npm:0.1.11"
Expand Down
Loading