diff --git a/basicswap/http_server.py b/basicswap/http_server.py index 0a9e804..96cfe69 100644 --- a/basicswap/http_server.py +++ b/basicswap/http_server.py @@ -5,6 +5,7 @@ # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import os +import json import struct import traceback import threading @@ -214,8 +215,16 @@ class HttpHandler(BaseHTTPRequestHandler): raise ValueError('Unknown Coin Type') cmd = form_data[b'cmd'][0].decode('utf-8') + try: - result = cmd + '\n' + swap_client.callcoincli(coin_type, cmd) + if coin_type == Coins.XMR: + ci = swap_client.ci(coin_type) + arr = cmd.split(None, 1) + method = arr[0] + params = json.loads(arr[1]) if len(arr) > 1 else [] + result = json.dumps(ci.rpc_wallet_cb(method, params), indent=4) + else: + result = cmd + '\n' + swap_client.callcoincli(coin_type, cmd) except Exception as ex: result = str(ex) diff --git a/doc/release-notes.md b/doc/release-notes.md index 886111a..9b619a4 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -5,6 +5,7 @@ - Track failed and successful swaps by address. - Added rate lookup helper when creating offer. - Prevent old shutdown link from shutting down a new session. +- ui: Connected XMR wallet to rpc page. 0.0.26