Skip to content

Commit 4c649e0

Browse files
authored
Merge pull request #1582 from input-output-hk/fix/lw-12170-await-libsodium-ready-in-wallet-manager-init
feat: [lw-12170] await for libsodium(Crypto) ready in wallet manager
2 parents b13c33d + 59e93cf commit 4c649e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/web-extension/src/walletManager/walletManager.ts

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
import { WalletRepository } from './WalletRepository';
1818
import { Witnesser } from '@cardano-sdk/key-management';
1919
import { buildBip32Witnesser, buildNativeScriptWitnesser } from './util';
20+
import { ready } from '@cardano-sdk/crypto';
2021

2122
/**
2223
* Checks if the wallet is a bip32 wallet.
@@ -108,6 +109,7 @@ export class WalletManager<WalletMetadata extends { name: string }, AccountMetad
108109

109110
/** `activate` the wallet with props of last activated wallet (load from `managerStorage`) */
110111
async initialize() {
112+
await ready();
111113
const { [this.#managerStorageKey]: lastActivateProps } = await this.#managerStorage.get(this.#managerStorageKey);
112114

113115
if (!lastActivateProps) {

0 commit comments

Comments
 (0)