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

Function GetWalletNameFromJSONRPCRequest

src/wallet/rpc/util.cpp:45–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name)
46{
47 if (URL_DECODE && request.URI.substr(0, WALLET_ENDPOINT_BASE.size()) == WALLET_ENDPOINT_BASE) {
48 // wallet endpoint was used
49 wallet_name = URL_DECODE(request.URI.substr(WALLET_ENDPOINT_BASE.size()));
50 return true;
51 }
52 return false;
53}
54
55std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request)
56{

Callers 2

unloadwalletFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected