From 37bd52aefaf7ff31c4292e87582dba1aa042c66f Mon Sep 17 00:00:00 2001 From: PhilReact Date: Thu, 19 Dec 2024 23:41:06 +0200 Subject: [PATCH] fix wallet version --- src/background.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/background.ts b/src/background.ts index c6fdb62..bef13d3 100644 --- a/src/background.ts +++ b/src/background.ts @@ -2265,6 +2265,7 @@ export async function sendCoin( let keyPair = ""; if (skipConfirmPassword) { const resKeyPair = await getKeyPair(); + const parsedData = resKeyPair; const uint8PrivateKey = Base58.decode(parsedData.privateKey); const uint8PublicKey = Base58.decode(parsedData.publicKey); @@ -2274,7 +2275,7 @@ export async function sendCoin( }; } else { const response = await decryptStoredWallet(password, wallet); - const wallet2 = new PhraseWallet(response, walletVersion); + const wallet2 = new PhraseWallet(response, wallet?.version || walletVersion); keyPair = wallet2._addresses[0].keyPair; }