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

fix: Indy to Askar migration code samples #134

Merged
merged 2 commits into from
Sep 11, 2023
Merged
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
11 changes: 7 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,19 @@ 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() },
ariesAskar: new AskarModule({
ariesAskar,
}),
},
dependencies: agentDependencies,
})
Expand All @@ -133,7 +136,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 +154,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
Loading