diff --git a/ChartsSpace/PlottersManager.js b/ChartsSpace/PlottersManager.js index 75b6c2811..f1b5728f1 100644 --- a/ChartsSpace/PlottersManager.js +++ b/ChartsSpace/PlottersManager.js @@ -229,7 +229,7 @@ function newPlottersManager () { moduleCodeName: pProductCard.product.plotter.moduleName, panelCodeName: panelConfig.codeName } - let panelOwner = exchange + ' ' + market.assetB + '/' + market.assetA + let panelOwner = exchange + ' ' + market.quotedAsset + '/' + market.baseAsset let plotterPanelHandle = canvas.panelsSpace.createNewPanel('Plotter Panel', parameters, panelOwner, pProductCard.session) let plotterPanel = canvas.panelsSpace.getPanel(plotterPanelHandle, panelOwner) /* Connect Panel to the Plotter via an Event. */ @@ -250,7 +250,7 @@ function newPlottersManager () { moduleCodeName: pProductCard.product.plotter.moduleName, panelCodeName: panel.id } - let panelOwner = exchange + ' ' + market.assetB + '/' + market.assetA + let panelOwner = exchange + ' ' + market.quotedAsset + '/' + market.baseAsset let plotterPanelHandle = canvas.panelsSpace.createNewPanel('Plotter Panel', parameters, panelOwner, pProductCard.session, panel) let plotterPanel = canvas.panelsSpace.getPanel(plotterPanelHandle, panelOwner) diff --git a/ChartsSpace/TimeMachine.js b/ChartsSpace/TimeMachine.js index 13add3ae8..d94df0324 100644 --- a/ChartsSpace/TimeMachine.js +++ b/ChartsSpace/TimeMachine.js @@ -172,8 +172,8 @@ function newTimeMachine () { if ( exchange === DEFAULT_EXCHANGE && - market.assetA === DEFAULT_MARKET.assetA && - market.assetB === DEFAULT_MARKET.assetB + market.baseAsset === DEFAULT_MARKET.baseAsset && + market.quotedAsset === DEFAULT_MARKET.quotedAsset ) { continue } initializeTimelineChart(exchange, market) diff --git a/ChartsSpace/TimelineChart.js b/ChartsSpace/TimelineChart.js index 6736c475c..a5bca7edb 100644 --- a/ChartsSpace/TimelineChart.js +++ b/ChartsSpace/TimelineChart.js @@ -30,8 +30,8 @@ function newTimelineChart () { let productsPanel /* Background */ - let logoAssetA - let logoAssetB + let logoBaseAsset + let logoQuotedAsset let logoExchange let logoAA let canDrawLogoA = false @@ -80,7 +80,7 @@ function newTimelineChart () { saveUserPosition(thisObject.container, timeLineCoordinateSystem, event) }) - let panelOwner = exchange + ' ' + market.assetB + '/' + market.assetA + let panelOwner = exchange + ' ' + market.quotedAsset + '/' + market.baseAsset productsPanelHandle = canvas.panelsSpace.createNewPanel('Products Panel', undefined, panelOwner) let productsPanel = canvas.panelsSpace.getPanel(productsPanelHandle, panelOwner) productsPanel.initialize(exchange, market) @@ -278,7 +278,7 @@ function newTimelineChart () { function drawBackground () { if (thisObject.container.frame.isInViewPort()) { if (window.CHART_ON_FOCUS === '') { - window.CHART_ON_FOCUS = exchange + ' ' + market.assetB + '/' + market.assetA + window.CHART_ON_FOCUS = exchange + ' ' + market.quotedAsset + '/' + market.baseAsset drawChartsBackgroundImages() } diff --git a/CockpitSpace/AssetBalances.js b/CockpitSpace/AssetBalances.js index 5b7db2c35..d9fa9ff85 100644 --- a/CockpitSpace/AssetBalances.js +++ b/CockpitSpace/AssetBalances.js @@ -1,5 +1,5 @@ -function newAssetBalances () { +function newQuotedAssetalances () { const MODULE_NAME = 'Asset Balances' let thisObject = { @@ -87,10 +87,10 @@ function newAssetBalances () { speedometer.draw() } - drawAssetBalances() + drawQuotedAssetalances() } - function drawAssetBalances () { + function drawQuotedAssetalances () { if (thisObject.paramsArray === undefined) { return } let fontSize diff --git a/Dashboard.js b/Dashboard.js index de8915fb5..c4b0be206 100644 --- a/Dashboard.js +++ b/Dashboard.js @@ -85,8 +85,8 @@ function newDashboard () { let market = { id: 2, - assetA: 'USDT', - assetB: 'BTC' + baseAsset: 'USDT', + quotedAsset: 'BTC' } markets = new Map() diff --git a/Globals.js b/Globals.js index 0c9c7149c..281a3da9e 100644 --- a/Globals.js +++ b/Globals.js @@ -7,14 +7,14 @@ const CANVAS_APP_NAME = 'Canvas App' const SUPPORTED_EXCHANGES = ["Poloniex"]; const SUPPORTED_MARKETS = [ { - assetA: "USDT", - assetB: "BTC", + baseAsset: "USDT", + quotedAsset: "BTC", } ]; const DEFAULT_EXCHANGE = "Poloniex"; const DEFAULT_MARKET = { - assetA: "USDT", - assetB: "BTC", + baseAsset: "USDT", + quotedAsset: "BTC", }; UI_COLOR = { diff --git a/Panels/ProductsPanel.js b/Panels/ProductsPanel.js index d52590b12..a46ddf5b5 100644 --- a/Panels/ProductsPanel.js +++ b/Panels/ProductsPanel.js @@ -42,7 +42,7 @@ function newProductsPanel () { exchange = pExchange market = pMarket - thisObject.container.name = 'Layers @ ' + exchange + ' ' + market.assetB + '/' + market.assetA + thisObject.container.name = 'Layers @ ' + exchange + ' ' + market.quotedAsset + '/' + market.baseAsset thisObject.container.frame.containerName = thisObject.container.name thisObject.container.frame.width = UI_PANEL.WIDTH.LARGE thisObject.container.frame.height = UI_PANEL.HEIGHT.LARGE * 1.5 // viewPort.visibleArea.bottomLeft.y - viewPort.visibleArea.topLeft.y // UI_PANEL.HEIGHT.LARGE; @@ -212,7 +212,7 @@ function newProductsPanel () { productCard.bot = bot productCard.product = product productCard.fitFunction = thisObject.fitFunction - productCard.code = exchange + '-' + market.assetB + '/' + market.assetA + '-' + dataMine.codeName + '-' + bot.codeName + '-' + product.codeName + productCard.code = exchange + '-' + market.quotedAsset + '/' + market.baseAsset + '-' + dataMine.codeName + '-' + bot.codeName + '-' + product.codeName if (session !== undefined) { productCard.code = productCard.code + '-' + session.id @@ -439,7 +439,7 @@ function newProductsPanel () { if (product.codeName === layerCode.product) { /* We have a layer that is matching the current product */ - let cardCode = exchange + '-' + market.assetB + '/' + market.assetA + '-' + dataMine.codeName + '-' + bot.codeName + '-' + product.codeName + '-' + process.session.id + let cardCode = exchange + '-' + market.quotedAsset + '/' + market.baseAsset + '-' + dataMine.codeName + '-' + bot.codeName + '-' + product.codeName + '-' + process.session.id let cardFound = removeFromLocalProductCards(cardCode) if (cardFound !== true) { productCard = addProductCard(dataMine, bot, product, process.session) diff --git a/Spaces/CockpitSpace.js b/Spaces/CockpitSpace.js index 39c2f2a0a..bc9611a72 100644 --- a/Spaces/CockpitSpace.js +++ b/Spaces/CockpitSpace.js @@ -5,7 +5,7 @@ let thisObject = { container: undefined, status: 'BOTTOM', - assetBalances: undefined, + quotedAssetalances: undefined, fullscreen: undefined, toTop: toTop, toBottom: toBottom, @@ -40,7 +40,7 @@ thisObject.container.finalize() thisObject.container = undefined - thisObject.assetBalances = undefined + thisObject.quotedAssetalances = undefined thisObject.fullscreen = undefined } @@ -65,8 +65,8 @@ canvasBrowserResizedEventSubscriptionId = window.canvasApp.eventHandler.listenToEvent('Browser Resized', resize) selfMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick) - thisObject.assetBalances = newAssetBalances() - thisObject.assetBalances.initialize() + thisObject.quotedAssetalances = newQuotedAssetalances() + thisObject.quotedAssetalances.initialize() thisObject.fullscreen = newFullScreen() thisObject.fullscreen.container.connectToParent(thisObject.container) @@ -171,7 +171,7 @@ drawBackground() - thisObject.assetBalances.draw() + thisObject.quotedAssetalances.draw() thisObject.fullscreen.draw() }