Skip to content

Commit

Permalink
fix: Indy to Askar migration code samples
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Koci <jakub.koci@gmail.com>
  • Loading branch information
jakubkoci committed Sep 8, 2023
1 parent 307e93d commit bf8ac15
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions guides/updating/update-indy-sdk-to-askar.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,21 @@ The agent is not allowed to be initialized to run this script. This makes sure n
:::

```typescript
import { IndySdkToAskarMigrationUpdater } from '@hyperledger/indy-sdk-to-askar-migration'
import { agentDependencies } from '@aries-framework/react-native'
import { AskarModule } from '@aries-framework/askar'
import { IndySdkToAskarMigrationUpdater } from '@aries-framework/indy-sdk-to-askar-migration'
import { ariesAskar } from '@hyperledger/aries-askar-react-native'

const oldAgent = new Agent({
config: {
/* ... */
},
modules: {
modules: { askar: new AskarModule() },
modules: {
ariesAskar: new AskarModule({
ariesAskar,
}),
},
},
dependencies: agentDependencies,
})
Expand All @@ -133,7 +138,7 @@ import fs from 'react-native-fs'
const base = fs.ExternalDirectoryPath
const indyClient = '.indy_client'
const wallet = 'wallet'
const walletId = agent.config.walletConfig.walletId
const walletId = agent.config.walletConfig.id
const file = 'sqlite.db'

const dbPath = `${base}/${indyClient}/${wallet}/${walletId}/${file}`
Expand All @@ -151,7 +156,7 @@ import fs from 'react-native-fs'
const base = fs.DocumentDirectoryPath
const indyClient = '.indy_client'
const wallet = 'wallet'
const walletId = agent.config.walletConfig.walletId
const walletId = agent.config.walletConfig.id
const file = 'sqlite.db'

const dbPath = `${base}/${indyClient}/${wallet}/${walletId}/${file}`
Expand Down

0 comments on commit bf8ac15

Please sign in to comment.