From 2cf5f14b0d8ea1c33ac09b3bbed578e351499d7d Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 13 Aug 2024 23:09:56 -0400 Subject: [PATCH] bugfixes --- src/charts/chart.js | 12 ++++++++---- src/charts/datafeed.js | 9 ++++++--- src/charts/ohlc.js | 2 +- src/components/NeedsSigner.vue | 3 --- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/charts/chart.js b/src/charts/chart.js index 77f278e..04592a7 100644 --- a/src/charts/chart.js +++ b/src/charts/chart.js @@ -23,10 +23,14 @@ export function removeSymbolChangedCallback(cb) { } function changeSymbol(symbol) { - const info = lookupSymbol(symbol.full_name) - lastSymbolChangedArgs = info - symbolChangedCbs.forEach((cb)=>cb(info)) - co.selectedSymbol = info + if (symbol===null) + co.selectedSymbol = null + else { + const info = lookupSymbol(symbol.full_name) + lastSymbolChangedArgs = info + symbolChangedCbs.forEach((cb) => cb(info)) + co.selectedSymbol = info + } } diff --git a/src/charts/datafeed.js b/src/charts/datafeed.js index b03b35d..6f45a6c 100644 --- a/src/charts/datafeed.js +++ b/src/charts/datafeed.js @@ -37,15 +37,18 @@ export function initFeeDropdown(w) { function updateFeeDropdown() { if (feeDropdown===null) return const symbolItem = useChartOrderStore().selectedSymbol - const feeOpts = { - items: symbolItem.pools.map((p)=> { + let items + if (symbolItem===null) + items = [{title: '0.00%'}] + else { + items = symbolItem.pools.map((p)=> { return { title: (p[1]/10000).toFixed(2)+'%', onSelect: ()=>selectPool(p), } }) } - feeDropdown.applyOptions(feeOpts) + feeDropdown.applyOptions({items}) } diff --git a/src/charts/ohlc.js b/src/charts/ohlc.js index 8f216be..71b4e51 100644 --- a/src/charts/ohlc.js +++ b/src/charts/ohlc.js @@ -125,7 +125,7 @@ export async function loadOHLC (symbol, contract, from, to, tvRes) { inverted ^= symbol.x.data.inverted } else { - baseURL = `//ohlc/` + baseURL = `/ohlc/` chainId = useStore().chainId } baseURL += `${chainId}/${contract}/` diff --git a/src/components/NeedsSigner.vue b/src/components/NeedsSigner.vue index 6546ffb..b640354 100644 --- a/src/components/NeedsSigner.vue +++ b/src/components/NeedsSigner.vue @@ -6,9 +6,6 @@ Welcome to Dexorder Beta! - - This beta test uses mock coins on the Arbitrum Sepolia testnet. - Play with the order builder without an account by clicking on the logo or on the button.