aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-04-02 08:35:10 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-04-02 08:35:10 -0400
commit01a3392b1b778fa4fcf568013326d6ea1de4fb3b (patch)
tree4a498b5cc8d1121e9ab7276fc335b778043cd8a2 /src/wallet/rpcwallet.cpp
parent0660119ac372c2863d14060ac1bc9bc243771f94 (diff)
Drop bitcoin-wallet dependency on libevent
Don't require urlDecode function in wallet code since urlDecode implementation currently uses libevent. Just call urlDecode indirectly though URL_DECODE function pointer constant if available. In bitcoind and bitcoin-qt, URL_DECODE is implemented and used to interpret RPC wallet requests. In bitcoin-wallet, URL_DECODE is null to avoid depending on libevent.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 5d34e592db..9dd684a94c 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -77,9 +77,9 @@ bool HaveKey(const SigningProvider& wallet, const CKey& key)
bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name)
{
- if (request.URI.substr(0, WALLET_ENDPOINT_BASE.size()) == WALLET_ENDPOINT_BASE) {
+ if (URL_DECODE && request.URI.substr(0, WALLET_ENDPOINT_BASE.size()) == WALLET_ENDPOINT_BASE) {
// wallet endpoint was used
- wallet_name = urlDecode(request.URI.substr(WALLET_ENDPOINT_BASE.size()));
+ wallet_name = URL_DECODE(request.URI.substr(WALLET_ENDPOINT_BASE.size()));
return true;
}
return false;