placement, line drawing, and price display fixes (inverted test)
This commit is contained in:
@@ -94,13 +94,13 @@
|
||||
<div>
|
||||
<div class="mx-3" v-if="t.marketOrder">market order</div>
|
||||
<line-price class="mx-3" v-if="!t.marketOrder"
|
||||
:base="item.token0" :quote="item.token1"
|
||||
:base="item.order.tokenIn" :quote="item.order.tokenOut"
|
||||
:b="t.minLine.intercept" :m="t.minLine.slope" :is-min="true"
|
||||
:buy="item.order.tokenIn===item.token1" :show-btn="false"/>
|
||||
:show-btn="false"/>
|
||||
<line-price class="mx-3" v-if="!t.marketOrder"
|
||||
:base="item.token0" :quote="item.token1"
|
||||
:base="item.order.tokenIn" :quote="item.order.tokenOut"
|
||||
:b="t.maxLine.intercept" :m="t.maxLine.slope" :is-min="false"
|
||||
:buy="item.order.tokenIn===item.token1" :show-btn="false"/>
|
||||
:show-btn="false"/>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
@@ -140,7 +140,7 @@
|
||||
<pair-price :base="item.order.tokenIn" :quote="item.order.tokenOut" :value="item.trancheStatus[i].avg" :show-btn="false"/>
|
||||
</suspense>
|
||||
</td>
|
||||
<td>{{ item.trancheStatus[i].status }}(todo:status)</td>
|
||||
<td>{{ item.trancheStatus[i].status }}<!--todo:tranche status--></td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -149,7 +149,6 @@
|
||||
|
||||
<script setup>
|
||||
import LinePrice from "@/components/LinePrice.vue";
|
||||
import {FixedNumber} from "ethers";
|
||||
import {useStore} from "@/store/store";
|
||||
import {computed, defineAsyncComponent, onUnmounted, ref, watch} from "vue";
|
||||
import Btn from "@/components/Btn.vue"
|
||||
@@ -174,7 +173,7 @@ const props = defineProps(['vault'])
|
||||
const vaultAddr = computed(()=>props.vault?props.vault:s.vault)
|
||||
const selected = ref([])
|
||||
|
||||
watch(selected, ()=>{
|
||||
watch(selected, async ()=>{
|
||||
const statusIndex = {}
|
||||
for (const order of orders.value)
|
||||
statusIndex[order.id] = order
|
||||
@@ -191,7 +190,7 @@ watch(selected, ()=>{
|
||||
const symbol = lookupSymbol(symbolKey)
|
||||
if (co.selectedSymbol.ticker !== symbolKey) {
|
||||
co.selectedSymbol = symbol
|
||||
setSymbol(symbol)
|
||||
await setSymbol(symbol)
|
||||
}
|
||||
orderShapes[id] = new OrderShapes(symbol, status)
|
||||
}
|
||||
@@ -308,8 +307,6 @@ const orders = computed(()=>{
|
||||
st.output = !o.amountIsInput ? o.amount : 0
|
||||
st.remaining = o.amount - st.filled
|
||||
st.selectable = st.state===OrderState.Open
|
||||
st.token0 = o.tokenIn < o.tokenOut ? o.tokenIn : o.tokenOut
|
||||
st.token1 = o.tokenIn < o.tokenOut ? o.tokenOut : o.tokenIn
|
||||
for( const ts of st.trancheStatus ) {
|
||||
let filledIn = 0n
|
||||
let filledOut = 0n
|
||||
|
||||
Reference in New Issue
Block a user