diff --git a/src/charts/datafeed.js b/src/charts/datafeed.js index 06168e7..378bc42 100644 --- a/src/charts/datafeed.js +++ b/src/charts/datafeed.js @@ -54,7 +54,7 @@ function addSymbol(p, base, quote, inverted) { const exchange = ['UNIv2', 'UNIv3'][p.e] const full_name = exchange + ':' + symbol // + '%' + formatFee(fee) if (full_name in symbolsSeen) { - // add this pool's address to the index but don't create a new symbol + // add this pool's address to the existing index but don't create a new symbol indexes[full_name].as.push(p.a) return } @@ -62,7 +62,7 @@ function addSymbol(p, base, quote, inverted) { const longExchange = ['Uniswap v2', 'Uniswap v3',][p.e] const description = `${base.n} / ${quote.n}` const type = 'swap' - _symbols[full_name] = {symbol, full_name, description, exchange, type, inverted, base, quote} + _symbols[full_name] = {symbol, full_name, description, exchange, type, inverted, base, quote, x:p.x} indexes[full_name] = { // key id: full_name, diff --git a/src/components/BuySellToggle.vue b/src/components/BuySellToggle.vue index 5eea235..0fb6453 100644 --- a/src/components/BuySellToggle.vue +++ b/src/components/BuySellToggle.vue @@ -1,6 +1,5 @@ - + \ No newline at end of file diff --git a/src/components/chart/ChartOrderPane.vue b/src/components/chart/ChartOrderPane.vue new file mode 100644 index 0000000..285221f --- /dev/null +++ b/src/components/chart/ChartOrderPane.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/src/components/chart/LimitBuilder.vue b/src/components/chart/LimitBuilder.vue index ca8e72c..ae27127 100644 --- a/src/components/chart/LimitBuilder.vue +++ b/src/components/chart/LimitBuilder.vue @@ -260,9 +260,6 @@ const colors = computed( ()=> { }) -let priceRangeId = null - - function adjustShapes() { const limits = prices.value // console.log('limits', limits) @@ -334,7 +331,7 @@ function deleteBuilder() { if (!props.builder.priceA) - lineA.createOrDraw(); + lineA.createOrDraw(); // initiate drawing mode diff --git a/src/components/chart/MarketBuilder.vue b/src/components/chart/MarketBuilder.vue new file mode 100644 index 0000000..70a2bcb --- /dev/null +++ b/src/components/chart/MarketBuilder.vue @@ -0,0 +1,40 @@ + + + + + + diff --git a/src/components/chart/Test.vue b/src/components/chart/Test.vue deleted file mode 100644 index 08fecc1..0000000 --- a/src/components/chart/Test.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/chart/Toolbar.vue b/src/components/chart/Toolbar.vue index 041d060..e5ebf18 100644 --- a/src/components/chart/Toolbar.vue +++ b/src/components/chart/Toolbar.vue @@ -3,14 +3,12 @@ - - Limit - - Test - + New Order + +
+ + +
@@ -28,6 +26,16 @@ const co = useChartOrderStore() let shape = null +function newOrder() { + console.log('new order 1') + co.newOrder() +} + + +function confirmDiscard() { + // todo show dialog +} + function test() { const testCb = { @@ -40,10 +48,6 @@ function test() { } -function build(component, options={}) { - co.addBuilder(component, options) -} -