symbol rework; fee % switching; symbol search improvements
This commit is contained in:
@@ -49,15 +49,14 @@ export const useChartOrderStore = defineStore('chart_orders', () => {
|
||||
const orders = ref([defaultOrder]) // order models in UI format
|
||||
const selectedOrder = ref(null)
|
||||
const selectedSymbol = ref(null)
|
||||
const selectedPool = ref(null)
|
||||
const intervalSecs = ref(0)
|
||||
const baseToken = computed(()=>selectedSymbol.value === null ? null : selectedSymbol.value.base)
|
||||
const quoteToken = computed(()=>selectedSymbol.value === null ? null : selectedSymbol.value.quote)
|
||||
const price = computed(() => {
|
||||
if (!selectedPool.value || !selectedSymbol.value)
|
||||
if (!selectedSymbol.value)
|
||||
return null
|
||||
const s = useStore()
|
||||
let result = s.poolPrices[[s.chainId, selectedPool.value[0]]]
|
||||
let result = s.poolPrices[[s.chainId, selectedSymbol.address]]
|
||||
if (selectedSymbol.value.inverted)
|
||||
result = 1 / result
|
||||
return result
|
||||
@@ -94,7 +93,7 @@ export const useChartOrderStore = defineStore('chart_orders', () => {
|
||||
}
|
||||
|
||||
return {
|
||||
chartReady, selectedSymbol, selectedPool, intervalSecs, baseToken, quoteToken, price,
|
||||
chartReady, selectedSymbol, intervalSecs, baseToken, quoteToken, price,
|
||||
orders, drawing, newOrder, removeOrder, resetOrders, meanRange,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user