This commit is contained in:
tim
2024-08-13 23:09:56 -04:00
parent 90c504a8c9
commit 2cf5f14b0d
4 changed files with 15 additions and 11 deletions

View File

@@ -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
}
}

View File

@@ -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})
}

View File

@@ -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}/`