symbol rework; fee % switching; symbol search improvements
This commit is contained in:
@@ -167,7 +167,7 @@ import {DISTANT_FUTURE, isOpen, OrderState} from "@/blockchain/orderlib.js";
|
||||
import Pulse from "@/components/Pulse.vue";
|
||||
import {OrderShapes} from "@/charts/ordershapes.js";
|
||||
import {useChartOrderStore} from "@/orderbuild.js";
|
||||
import {lookupSymbol} from "@/charts/datafeed.js";
|
||||
import {lookupSymbol, tickerForOrder} from "@/charts/datafeed.js";
|
||||
import {setSymbol} from "@/charts/chart.js";
|
||||
import {uniswapV3AveragePrice} from "@/blockchain/uniswap.js";
|
||||
|
||||
@@ -187,17 +187,14 @@ watch(selected, async ()=>{
|
||||
for (const order of orders.value)
|
||||
statusIndex[order.id] = order
|
||||
const selectedIndex = {}
|
||||
const chainId = s.chainId
|
||||
for (const id of selected.value) {
|
||||
selectedIndex[id] = true
|
||||
const status = statusIndex[id];
|
||||
if (!(id in orderShapes)) {
|
||||
let base = status.order.tokenIn
|
||||
let quote = status.order.tokenOut
|
||||
if (base > quote)
|
||||
[base, quote] = [quote, base]
|
||||
const symbolKey = `${base}/${quote}`
|
||||
const symbol = lookupSymbol(symbolKey)
|
||||
if (co.selectedSymbol.ticker !== symbolKey) {
|
||||
const ticker = tickerForOrder(chainId, status.order)
|
||||
const symbol = lookupSymbol(ticker)
|
||||
if (co.selectedSymbol.ticker !== ticker) {
|
||||
co.selectedSymbol = symbol
|
||||
await setSymbol(symbol)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user