MCPcopy Create free account
hub / github.com/ElementsProject/elements / ParseIncludeWatchonly

Function ParseIncludeWatchonly

src/wallet/rpc/util.cpp:34–43  ·  view source on GitHub ↗

Used by RPC commands that have an include_watchonly parameter. * We default to true for watchonly wallets if include_watchonly isn't * explicitly set. */

Source from the content-addressed store, hash-verified

32 * explicitly set.
33 */
34bool 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
45bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name)
46{

Callers 5

getbalanceFunction · 0.85
FundTransactionFunction · 0.85
transactions.cppFile · 0.85
listtransactionsFunction · 0.85
listsinceblockFunction · 0.85

Calls 3

IsWalletFlagSetMethod · 0.80
get_boolMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected