MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetWalletNameFromJSONRPCRequest

Function GetWalletNameFromJSONRPCRequest

src/wallet/rpcwallet.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

unloadwalletFunction · 0.85

Calls 2

urlDecodeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected