fix trade history date display

This commit is contained in:
tjs 2023-03-04 12:46:21 -05:00
parent 6fce2640a4
commit 0f87d0c07b
1 changed files with 3 additions and 2 deletions

View File

@ -142,13 +142,14 @@ const formatTradeHistory = (
return tradeHistory.flat().map((event) => {
let trade
let market = selectedMarket
let time = ''
let time: string | number = ''
if (isSerumFillEvent(event)) {
trade = parseSerumEvent(event)
} else if (isPerpFillEvent(event)) {
trade = parsePerpEvent(mangoAccountAddress, event)
market = selectedMarket
time = trade.timestamp.toString()
time = trade.timestamp.toNumber() * 1000
} else {
trade = parseApiTradeHistory(mangoAccountAddress, event)
time = trade.block_datetime