pending order view bugfix

This commit is contained in:
Tim
2024-03-28 15:46:34 -04:00
parent 23e0deee91
commit b2a8636996
2 changed files with 16 additions and 11 deletions

View File

@@ -85,12 +85,16 @@
<tr v-for="(t, i) in item.order.tranches">
<td class="text-right">Tranche {{ i + 1 }}</td>
<td class="text-center w-33">
<suspense v-if="item.state > OrderState.Signing">
<span>
<token-amount :addr="item.amountToken" :amount="item.trancheFilled[i]" :raw="true"/>
/
</span>
</suspense>
<suspense>
<span>
<token-amount :addr="item.amountToken" :amount="item.trancheFilled[i]" :raw="true"/>
/
<token-amount :addr="item.amountToken" :amount="item.order.amount*BigInt(t.fraction)/65535n"/>
</span>
<span>
<token-amount :addr="item.amountToken" :amount="item.order.amount*BigInt(t.fraction)/65535n"/>
</span>
</suspense>
</td>
<td class="text-left">
@@ -202,11 +206,12 @@ const orders = computed(()=>{
// in-flight orders
for (const pend of ws.pendingOrders) {
console.log('pended order', pend)
result.splice(0, 0, {
result.push({
start: pend.placementTime,
order: pend.order,
filled: 0,
state: pend.state
state: pend.state,
amountToken: pend.order.amountIsInput ? pend.order.tokenIn : pend.order.tokenOut
})
}