metadata.x.data change
This commit is contained in:
@@ -252,7 +252,7 @@ export const DataFeed = {
|
|||||||
// todo need to consider the selected fee tier
|
// todo need to consider the selected fee tier
|
||||||
let bars, metadata;
|
let bars, metadata;
|
||||||
const pool = useChartOrderStore().selectedPool;
|
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) {
|
if (firstDataRequest) {
|
||||||
lastBarsCache.set(symbolInfo.full_name, {
|
lastBarsCache.set(symbolInfo.full_name, {
|
||||||
...bars[bars.length - 1],
|
...bars[bars.length - 1],
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {useStore} from "@/store/store.js";
|
import {useOrderStore, useStore} from "@/store/store.js";
|
||||||
import {metadata} from "@/version.js";
|
import {metadata} from "@/version.js";
|
||||||
|
|
||||||
const file_res = ['1m', '3m', '5m', '10m', '15m', '30m', '1H', '2H', '4H', '8H', '12H', '1D', '2D', '3D', '1W',];
|
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]
|
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);
|
console.log('[jBars]: Method call', res, from, to);
|
||||||
|
|
||||||
const toDate = new Date(to*1000);
|
const toDate = new Date(to*1000);
|
||||||
@@ -86,7 +86,7 @@ export async function jBars (contract, from, to, res) {
|
|||||||
|
|
||||||
let chainId = useStore().chainId
|
let chainId = useStore().chainId
|
||||||
const meta = metadata.p[contract]
|
const meta = metadata.p[contract]
|
||||||
let inverted = meta.inverted
|
let inverted = symbolInfo.inverted
|
||||||
if (meta.x?.data) {
|
if (meta.x?.data) {
|
||||||
baseURL = meta.x.data.uri
|
baseURL = meta.x.data.uri
|
||||||
chainId = meta.x.data.chain
|
chainId = meta.x.data.chain
|
||||||
|
|||||||
Reference in New Issue
Block a user