Used by RPC commands that have an include_watchonly parameter. * We default to true for watchonly wallets if include_watchonly isn't * explicitly set. */
| 32 | * explicitly set. |
| 33 | */ |
| 34 | bool ParseIncludeWatchonly(const UniValue& include_watchonly, const CWallet& wallet) |
| 35 | { |
| 36 | if (include_watchonly.isNull()) { |
| 37 | // if include_watchonly isn't explicitly set, then check if we have a watchonly wallet |
| 38 | return wallet.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); |
| 39 | } |
| 40 | |
| 41 | // otherwise return whatever include_watchonly was set to |
| 42 | return include_watchonly.get_bool(); |
| 43 | } |
| 44 | |
| 45 | bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name) |
| 46 | { |
no test coverage detected