From 43b1c853d6ef8337fe67c26e4d72ebb44ce36f23 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 16 Mar 2024 19:18:39 -0400 Subject: [PATCH] metadata.x.data change --- src/charts/datafeed.js | 2 +- src/charts/jBars.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/charts/datafeed.js b/src/charts/datafeed.js index 9b6c9d1..05ac3f1 100644 --- a/src/charts/datafeed.js +++ b/src/charts/datafeed.js @@ -252,7 +252,7 @@ export const DataFeed = { // todo need to consider the selected fee tier let bars, metadata; const pool = useChartOrderStore().selectedPool; - [bars, metadata] = await jBars(pool[0], from, to, resolution); // This is the one that does all the work + [bars, metadata] = await jBars(symbolInfo, pool[0], from, to, resolution); // This is the one that does all the work if (firstDataRequest) { lastBarsCache.set(symbolInfo.full_name, { ...bars[bars.length - 1], diff --git a/src/charts/jBars.js b/src/charts/jBars.js index 33f0bae..ec458e9 100644 --- a/src/charts/jBars.js +++ b/src/charts/jBars.js @@ -1,4 +1,4 @@ -import {useStore} from "@/store/store.js"; +import {useOrderStore, useStore} from "@/store/store.js"; import {metadata} from "@/version.js"; const file_res = ['1m', '3m', '5m', '10m', '15m', '30m', '1H', '2H', '4H', '8H', '12H', '1D', '2D', '3D', '1W',]; @@ -13,7 +13,7 @@ export function tvResolutionToPeriodString(res) { return resMap[res] } -export async function jBars (contract, from, to, res) { +export async function jBars (symbolInfo, contract, from, to, res) { console.log('[jBars]: Method call', res, from, to); const toDate = new Date(to*1000); @@ -86,7 +86,7 @@ export async function jBars (contract, from, to, res) { let chainId = useStore().chainId const meta = metadata.p[contract] - let inverted = meta.inverted + let inverted = symbolInfo.inverted if (meta.x?.data) { baseURL = meta.x.data.uri chainId = meta.x.data.chain