From a6ca6e4ffec9c9cf7dae5dd0cdb06cbf560b454e Mon Sep 17 00:00:00 2001 From: Keaton Date: Thu, 30 Jul 2020 17:07:10 -0500 Subject: [PATCH 1/2] Change API to honor payserver_root Following the [changes proposed to `daemon.py`](https://github.com/WolfgangAxel/electrum/blob/web_interface_fixes/electrum/daemon.py), this updates all API links to fall under the `payserver_root` configuration. --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 4fd3104..038add7 100644 --- a/index.html +++ b/index.html @@ -59,7 +59,7 @@

QR Code:

var id = getUrlParameter('id'); if (id) { - var jqxhr = $.getJSON("/api/get_invoice?" + id, function() { + var jqxhr = $.getJSON("api/get_invoice?" + id, function() { console.log("getJSON:success"); }) .done( function(data) { @@ -105,7 +105,7 @@

QR Code:

} }); - var wss_address = (document.URL.startsWith("https") ? "wss" : "ws") + "://" + window.location.host +"/api/get_status?" + id; + var wss_address = document.URL.replace("http", "ws").match("(.*)/")[1] + "/api/get_status?" + id; console.log("Opening WSS: " + wss_address) var ws = new WebSocket(wss_address); var received_msg; From e763c318773833528586c1dfae63191704480801 Mon Sep 17 00:00:00 2001 From: Keaton Date: Thu, 30 Jul 2020 17:09:04 -0500 Subject: [PATCH 2/2] Change API to honor payserver_root Following the [changes proposed to `daemon.py`](https://github.com/WolfgangAxel/electrum/blob/web_interface_fixes/electrum/daemon.py), this updates all API links to fall under the `payserver_root` configuration. --- create_invoice.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_invoice.html b/create_invoice.html index a6e33e8..767b3ed 100644 --- a/create_invoice.html +++ b/create_invoice.html @@ -4,7 +4,7 @@ -
+