From bf8ac15e8eca2606a9aab647414b5580e5876ff8 Mon Sep 17 00:00:00 2001 From: Jakub Koci Date: Fri, 8 Sep 2023 15:31:40 +0200 Subject: [PATCH] fix: Indy to Askar migration code samples Signed-off-by: Jakub Koci --- guides/updating/update-indy-sdk-to-askar.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/guides/updating/update-indy-sdk-to-askar.md b/guides/updating/update-indy-sdk-to-askar.md index e82a661e..74695c67 100644 --- a/guides/updating/update-indy-sdk-to-askar.md +++ b/guides/updating/update-indy-sdk-to-askar.md @@ -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, }) @@ -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}` @@ -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}`