SwapOrderStatus.startTime

This commit is contained in:
tim
2024-07-22 13:48:43 -04:00
parent 78a6671fdf
commit 9c17377b62
2 changed files with 8 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
<div>
<v-data-table :headers="datatableHeaders" :items="orders" item-value="id"
item-selectable="selectable" :show-select="false" :show-expand="true">
<template v-slot:item.start="{ value }">{{ timestampString(value) }}</template>
<template v-slot:item.startTime="{ value }">{{ timestampString(value) }}</template>
<template v-slot:item.input="{ item }">
<span v-if="item.order.amountIsInput">
<span v-if="item.state > OrderState.Signing">
@@ -223,7 +223,7 @@ const orders = computed(()=>{
result.push({
chainId: pend.chainId,
id: pend.id,
start: pend.placementTime,
startTime: pend.placementTime,
order: pend.order,
filled: 0,
state: pend.state,
@@ -270,7 +270,7 @@ const orders = computed(()=>{
st.token1 = o.tokenIn < o.tokenOut ? o.tokenOut : o.tokenIn
}
}
result.sort((a,b)=>b.start-a.start)
result.sort((a,b)=>b.startTime-a.startTime)
console.log('orders', result)
return result
})
@@ -280,12 +280,12 @@ function describeTrancheTime(st, isStart, t) {
if( t.minIsBarrier || t.maxIsBarrier )
return 'barrier'
if( isStart && t.startTime > 0 ) {
const started = t.startTimeIsRelative ? st.start + t.startTime : t.startTime
const started = t.startTimeIsRelative ? st.startTime + t.startTime : t.startTime
result += started*1000 < Date.now() ? 'Activated ' : 'Activates '
result += timestampString(started) + ' '
}
if( !isStart && t.endTime < 4294967295 ) {
const ended = t.endTimeIsRelative ? st.start + t.endTime : t.endTime
const ended = t.endTimeIsRelative ? st.startTime + t.endTime : t.endTime
result += ended*1000 < Date.now() ? 'Ended ' : 'Ending '
result += timestampString(ended)
}