Added 'Z' to time strings sent by history API to be consistent with ISO 8601

This commit is contained in:
dd 2021-12-03 01:18:05 -05:00
parent 60b2c4b92d
commit 15e2035fea
3 changed files with 5 additions and 8 deletions

View File

@ -63,12 +63,9 @@ const AccountFunding = () => {
stats[asset] = x
.map(([key, value]) => {
const funding = roundToDecimal(
value.total_funding,
QUOTE_DECIMALS + 1
)
const funding = roundToDecimal(value.total_funding, QUOTE_DECIMALS)
if (funding !== 0) {
return { ...value, time: key }
return { ...value, time: key + 'Z' }
} else {
return null
}

View File

@ -293,7 +293,7 @@ const LiquidationHistoryTable = ({ history, view }) => {
perpMarket
)
const date = new Date(activity_details.block_datetime)
const date = new Date(activity_details.block_datetime + 'Z')
const lostDecimals = assetLost.symbol === 'SOL' ? 9 : 6
const gainedDecimals = assetGained.symbol === 'SOL' ? 9 : 6
return (
@ -453,7 +453,7 @@ const HistoryTable = ({ history, view }) => {
</thead>
<tbody>
{items.map((activity_details: any, index) => {
const date = new Date(activity_details.block_datetime)
const date = new Date(activity_details.block_datetime + 'Z')
return (
<TrBody index={index} key={activity_details.signature}>
<Td>

View File

@ -97,7 +97,7 @@ const AccountInterest = () => {
token.decimals + 1
)
if (borrows > 0 || deposits > 0) {
return { ...value, time: key }
return { ...value, time: key + 'Z' }
} else {
return null
}