Skip to content

Commit

Permalink
fix: populate tx history on recover
Browse files Browse the repository at this point in the history
  • Loading branch information
janek26 committed May 24, 2022
1 parent b22cebe commit 758312d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/extension/src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ import { Wallet, WalletStorageProps } from "./wallet"
)
await wallet.setup()

const transactionTracker = await getTransactionsTracker(
// may get reassigned when a recovery happens
let transactionTracker = await getTransactionsTracker(
await wallet.getAccounts(),
getTransactionsStore,
trackTransations,
Expand Down Expand Up @@ -678,6 +679,11 @@ import { Wallet, WalletStorageProps } from "./wallet"
} = JSON.parse(encode.arrayBufferToString(plaintext))

await wallet.restoreSeedPhrase(seedPhrase, newPassword)
transactionTracker = await getTransactionsTracker(
await wallet.getAccounts(),
getTransactionsStore,
trackTransations,
)

return sendToTabAndUi({ type: "RECOVER_SEEDPHRASE_RES" })
} catch {
Expand Down

0 comments on commit 758312d

Please sign in to comment.