fix(trading): internal timestamp date unix formatting (#5505)

This commit is contained in:
m.ray 2023-12-14 17:10:17 +02:00 committed by GitHub
parent ec837854cf
commit 4b208e90bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -135,7 +135,7 @@ describe('MarketInfoPanels', () => {
render(<DataSourceProof dataSourceSpecId={''} {...props} />);
expect(screen.getByText('Internal conditions')).toBeInTheDocument();
const dateFromUnixTimestamp = condition.value
? getDateTimeFormat().format(new Date(parseInt(condition.value)))
? getDateTimeFormat().format(new Date(parseInt(condition.value) * 1000))
: '-';
expect(
screen.getByText(

View File

@ -1263,7 +1263,9 @@ export const DataSourceProof = ({
{data.sourceType.sourceType?.conditions?.map((condition, i) => {
if (!condition) return null;
const dateFromUnixTimestamp = condition.value
? getDateTimeFormat().format(new Date(parseInt(condition.value)))
? getDateTimeFormat().format(
new Date(parseInt(condition.value) * 1000)
)
: '-';
return (
<p key={i}>