Add IsLegacy to CWallet so that the GUI knows whether to show watchonly

This commit is contained in:
Andrew Chow
2019-08-14 14:25:53 -04:00
parent 1cb42b22b1
commit ce24a94494
7 changed files with 34 additions and 11 deletions

View File

@@ -1851,7 +1851,7 @@ static UniValue keypoolrefill(const JSONRPCRequest& request)
},
}.Check(request);
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
if (pwallet->IsLegacy() && pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
throw JSONRPCError(RPC_WALLET_ERROR, "Error: Private keys are disabled for this wallet");
}