post-order line draw improvements
This commit is contained in:
@@ -95,7 +95,7 @@ socket.on( 'of', (chainId, vault, orderIndex, filled)=>{
|
||||
}
|
||||
|
||||
const status = s.orders[vault][orderIndex]
|
||||
console.log('apply fills', status, filled)
|
||||
// console.log('apply fills', status, filled)
|
||||
|
||||
let orderIn = 0n
|
||||
let orderOut = 0n
|
||||
@@ -107,7 +107,10 @@ socket.on( 'of', (chainId, vault, orderIndex, filled)=>{
|
||||
const numOld = ts.fills.length;
|
||||
for (let i=0; i<fills.length; i++) {
|
||||
const fill = fills[i]
|
||||
const [tx, time, fi, fo, fee] = fill
|
||||
let [tx, time, fi, fo, fee] = fill
|
||||
fi = BigInt(fi)
|
||||
fo = BigInt(fo)
|
||||
fee = BigInt(fee)
|
||||
filledIn += fi
|
||||
filledOut += fo
|
||||
if (i<=numOld) {
|
||||
@@ -124,8 +127,9 @@ socket.on( 'of', (chainId, vault, orderIndex, filled)=>{
|
||||
orderIn += filledIn
|
||||
orderOut += filledOut
|
||||
}
|
||||
status[7] = orderIn.toString()
|
||||
status[8] = orderOut.toString()
|
||||
status.filledIn = orderIn
|
||||
status.filledOut = orderOut
|
||||
status.filled = status.order.amountIsInput ? orderIn : orderOut
|
||||
|
||||
console.log('apply fills completed', status)
|
||||
// console.log('apply fills completed', status)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user