Skip to content

Commit

Permalink
feat: add OCA checkForUpdates to the splash screen (#1186)
Browse files Browse the repository at this point in the history
Signed-off-by: timbl-ont <[email protected]>
  • Loading branch information
timbl-ont authored Jul 12, 2024
1 parent d6da297 commit 903fc2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/legacy/core/App/screens/Splash.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Agent, HttpOutboundTransport, WsOutboundTransport } from '@credo-ts/core'
import { useAgent } from '@credo-ts/react-hooks'
import { agentDependencies } from '@credo-ts/react-native'
import { RemoteOCABundleResolver } from '@hyperledger/aries-oca/build/legacy'
import { useNavigation } from '@react-navigation/core'
import { CommonActions } from '@react-navigation/native'
import React, { useEffect, useState } from 'react'
Expand Down Expand Up @@ -98,6 +99,7 @@ const Splash: React.FC = () => {
const { version: TermsVersion } = container.resolve(TOKENS.SCREEN_TERMS)
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 styles = StyleSheet.create({
container: {
flex: 1,
Expand Down Expand Up @@ -208,6 +210,7 @@ const Splash: React.FC = () => {

const initAgent = async (): Promise<void> => {
try {
await ocaBundleResolver.checkForUpdates?.()
const credentials = await getWalletCredentials()

if (!credentials?.id || !credentials.key) {
Expand Down

0 comments on commit 903fc2e

Please sign in to comment.