Skip to content

Commit

Permalink
feat: for existing accounts consider mnemonic backup already done
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Feb 9, 2024
1 parent 18c5d6f commit dc9f2f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/extension/background-script/actions/accounts/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const add = async (message: MessageAccountAdd) => {
...newAccount,
id: accountId,
name,
isMnemonicBackupDone: false,
};

const mnemonic = await generateMnemonic({
Expand Down
5 changes: 4 additions & 1 deletion src/extension/background-script/actions/accounts/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ const get = async (message: MessageAccountGet) => {
liquidEnabled: !!account.mnemonic,
nostrEnabled: !!account.nostrPrivateKey,
hasMnemonic: !!account.mnemonic,
isMnemonicBackupDone: !!account.isMnemonicBackupDone,
// for existing accounts consider mnemonic backup already done
isMnemonicBackupDone: account.isMnemonicBackupDone
? account.isMnemonicBackupDone
: true,
// Note: undefined (default for new accounts) it is also considered imported
hasImportedNostrKey: account.hasImportedNostrKey !== false,
bitcoinNetwork: account.bitcoinNetwork || "bitcoin",
Expand Down

0 comments on commit dc9f2f1

Please sign in to comment.