This commit is contained in:
Tim Olson
2023-11-14 02:13:22 -04:00
parent d8fcf4209c
commit f0c0857d1c
6 changed files with 54 additions and 11 deletions

View File

@@ -62,9 +62,7 @@ export async function recentOrders( socket, chainId, vault, limit=25 ) {
where oi.chain=${chainId} and oi.vault='${vault}'
and sd.series='o' and sd.key=concat('${vault}','|',to_char(oi.order_index, 'FM00000'))
order by oi.order_index desc limit ${limit}`;
console.log('sql',sql)
const query = await db.query(sql)
console.log('got historical statuses', query)
const result = []
for( const {order_index, value} of query.rows)
result.push([order_index,JSON.parse(value)])