diff --git a/src/rpc/handlers/GatewayBalances.cpp b/src/rpc/handlers/GatewayBalances.cpp index 8d6c7477..4121a4c6 100644 --- a/src/rpc/handlers/GatewayBalances.cpp +++ b/src/rpc/handlers/GatewayBalances.cpp @@ -25,7 +25,7 @@ doGatewayBalances(Context const& context) std::map> frozenBalances; std::set hotWallets; - if (request.contains("hot_wallet")) + if (request.contains(JS(hotwallet))) { auto getAccountID = [](auto const& j) -> std::optional { @@ -44,7 +44,7 @@ doGatewayBalances(Context const& context) return {}; }; - auto const& hw = request.at("hot_wallet"); + auto const& hw = request.at(JS(hotwallet)); bool valid = true; // null is treated as a valid 0-sized array of hotwallet @@ -110,7 +110,7 @@ doGatewayBalances(Context const& context) if (hotWallets.count(peer) > 0) { // This is a specified hot wallet - hotBalances[peer].push_back(balance); + hotBalances[peer].push_back(-balance); } else if (balSign > 0) { @@ -120,7 +120,7 @@ doGatewayBalances(Context const& context) else if (freeze) { // An obligation the gateway has frozen - frozenBalances[peer].push_back(balance); + frozenBalances[peer].push_back(-balance); } else {