diff --git a/CloudVM/CloudSupport.js b/CloudVM/CloudSupport.js index 9431f17cf..a494e7e39 100644 --- a/CloudVM/CloudSupport.js +++ b/CloudVM/CloudSupport.js @@ -71,7 +71,7 @@ function webRequire(pModulePath) { MODULE.newPoloniexAPIClient = newPoloniexAPIClient; return MODULE; } - case './ExchangeAPI': { + case './Exchange/ExchangeAPI': { let MODULE = {}; MODULE.newExchangeAPI = newExchangeAPI; diff --git a/CloudVM/CloudVM.js b/CloudVM/CloudVM.js index 62c81268f..7b9b6b285 100644 --- a/CloudVM/CloudVM.js +++ b/CloudVM/CloudVM.js @@ -32,6 +32,11 @@ function newCloudVM() { window.CURRENT_EXECUTION_AT = "Browser"; window.STORAGE_PERMISSIONS = ecosystem.getStoragePermissions(); + window.MARKET = { + assetA: "USDT", + assetB: "BTC" + }; + /* When running at the browser, the AACloud VM will look for this data, in this case it does not contain any key or secret, since the browser only know the session token the user received when he logged in. diff --git a/CloudVM/Exchange/ExchangeAPI.js b/Exchange/ExchangeAPI.js similarity index 98% rename from CloudVM/Exchange/ExchangeAPI.js rename to Exchange/ExchangeAPI.js index fcf576abf..3e2d517e0 100644 --- a/CloudVM/Exchange/ExchangeAPI.js +++ b/Exchange/ExchangeAPI.js @@ -7,7 +7,6 @@ let thisObject = { API: { - analizeResponse: analizeResponse, returnOpenOrders: returnOpenOrders, returnOrderTrades: returnOrderTrades, buy: buy, diff --git a/Project.njsproj b/Project.njsproj index d4fbd65a8..b77efe7fe 100644 --- a/Project.njsproj +++ b/Project.njsproj @@ -56,6 +56,7 @@ Code + @@ -230,6 +231,7 @@ + diff --git a/Scripts/AppLoader.js b/Scripts/AppLoader.js index b7def164d..d5ed3f931 100644 --- a/Scripts/AppLoader.js +++ b/Scripts/AppLoader.js @@ -64,7 +64,7 @@ "FloatingSpace/FloatingObject.js", "FloatingSpace/FloatingLayer.js", - "CloudVM/Exchange/ExchangeAPI.js", + "Exchange/ExchangeAPI.js", "CloudVM/CloudSupport.js", "CloudVM/CloudRequire.js", "CloudVM/WebFS.js", diff --git a/server.js b/server.js index c4ed69077..0d3bc98b7 100644 --- a/server.js +++ b/server.js @@ -451,6 +451,23 @@ function onBrowserRequest(request, response) { } break; + case "Exchange": // This means the Exchange folder. + { + let filePath = requestParameters[2]; + + if (requestParameters[3] !== undefined) { + filePath = filePath + "/" + requestParameters[3]; + } + + if (requestParameters[4] !== undefined) { + filePath = filePath + "/" + requestParameters[4]; + } + + respondWithFile('./Exchange/' + filePath, response); + + } + break; + case "Images": // This means the Scripts folder. {