Merge pull request #5924 from steven-ecc/5893-enforce-recovery-phrase-backup

Require wallet recovery phrase to be backed up for z_getnewaccount an…
This commit is contained in:
Kris Nuttycombe 2022-05-03 21:13:35 -06:00 committed by GitHub
commit b7d6120b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -3268,6 +3268,7 @@ UniValue z_getnewaccount(const UniValue& params, bool fHelp)
LOCK(pwalletMain->cs_wallet);
EnsureWalletIsUnlocked();
EnsureWalletIsBackedUp(Params());
// Generate the new account.
auto ufvkNew = pwalletMain->GenerateNewUnifiedSpendingKey();
@ -3363,6 +3364,7 @@ UniValue z_getaddressforaccount(const UniValue& params, bool fHelp)
}
EnsureWalletIsUnlocked();
EnsureWalletIsBackedUp(Params());
auto res = pwalletMain->GenerateUnifiedAddress(account, receiverTypes, j);