| 41 | static const std::string WALLET_ENDPOINT_BASE = "/wallet/"; |
| 42 | |
| 43 | bool 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 | |
| 53 | std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request) |
| 54 | { |
no test coverage detected