Added "GET_PRICE" action.

This commit is contained in:
CalDescent
2023-01-19 20:47:06 +00:00
parent 86d6037af3
commit 57eacbdd59
3 changed files with 28 additions and 0 deletions

View File

@@ -190,6 +190,14 @@ window.addEventListener("message", (event) => {
response = httpGet(url);
break;
case "GET_PRICE":
url = "/apps/price?";
if (data.blockchain != null) url = url.concat("&blockchain=" + data.blockchain);
if (data.maxtrades != null) url = url.concat("&maxtrades=" + data.maxtrades);
if (data.inverse != null) url = url.concat("&inverse=" + data.inverse);
response = httpGet(url);
break;
default:
// Pass to parent (UI), in case they can fulfil this request
event.data.requestedHandler = "UI";