diff --git a/src/components/Tables/PurchaseHistoryTable/index.tsx b/src/components/Tables/PurchaseHistoryTable/index.tsx
index aedd6659..e6c2c49d 100644
--- a/src/components/Tables/PurchaseHistoryTable/index.tsx
+++ b/src/components/Tables/PurchaseHistoryTable/index.tsx
@@ -114,10 +114,7 @@ export const PurchaseHistoryTable = ({ data }: PurchaseHistoryTableProps) => {
{type}
- {timeAgo.format(
- new Date(timestamp).getTime(),
- 'round-minute'
- )}
+ {timeAgo.format(timestamp, 'round-minute')}
)
diff --git a/src/components/Tables/TxHistoryTable/index.tsx b/src/components/Tables/TxHistoryTable/index.tsx
index aa44770f..83839e4e 100644
--- a/src/components/Tables/TxHistoryTable/index.tsx
+++ b/src/components/Tables/TxHistoryTable/index.tsx
@@ -89,10 +89,7 @@ export const TxHistoryTable = ({ data }: TxHistoryTableProps) => {
)}
- {timeAgo.format(
- new Date(timestamp).getTime(),
- 'round-minute'
- )}
+ {timeAgo.format(timestamp, 'round-minute')}
)
diff --git a/src/hooks/accountExtrinsics.ts b/src/hooks/accountExtrinsics.ts
index ce98b781..5bceb979 100644
--- a/src/hooks/accountExtrinsics.ts
+++ b/src/hooks/accountExtrinsics.ts
@@ -56,7 +56,7 @@ export const useAccountExtrinsics = (
extrinsicId: item.id,
module: item.module,
call: item.call,
- timestamp: item.timestamp,
+ timestamp: new Date(`${item.timestamp}Z`),
success: item.success,
} as AccountTxHistoryItem)
)
diff --git a/src/hooks/sale/purchaseHistory.ts b/src/hooks/sale/purchaseHistory.ts
index 3f57f880..e450d0c8 100644
--- a/src/hooks/sale/purchaseHistory.ts
+++ b/src/hooks/sale/purchaseHistory.ts
@@ -59,7 +59,7 @@ export const usePurchaseHistory = (
address: account,
core,
extrinsicId: `${height}-${extrinsicId}`,
- timestamp,
+ timestamp: new Date(`${timestamp}Z`),
price: parseInt(price),
type: purchaseType,
} as PurchaseHistoryItem)
diff --git a/src/hooks/sale/saleDetails.ts b/src/hooks/sale/saleDetails.ts
index e1c4978a..ede2ef8d 100644
--- a/src/hooks/sale/saleDetails.ts
+++ b/src/hooks/sale/saleDetails.ts
@@ -54,7 +54,7 @@ export const useSaleDetails = (network: NetworkType, saleCycle: number) => {
address: account,
core,
extrinsicId: `${height}-${extrinsicId}`,
- timestamp,
+ timestamp: new Date(`${timestamp}Z`),
price: parseInt(price),
type: purchaseType,
} as PurchaseHistoryItem)
diff --git a/src/hooks/sale/salesHistory.ts b/src/hooks/sale/salesHistory.ts
index cdafa5ea..1308d619 100644
--- a/src/hooks/sale/salesHistory.ts
+++ b/src/hooks/sale/salesHistory.ts
@@ -53,8 +53,8 @@ export const useSalesHistory = (network: NetworkType) => {
regionEnd,
startBlock: height,
endBlock: saleEnd,
- startTimestamp: Date.parse(timestamp),
- endTimestamp: Date.parse(tsSaleEnd),
+ startTimestamp: Date.parse(`${timestamp}Z`),
+ endTimestamp: Date.parse(`${tsSaleEnd}Z`),
startPrice,
endPrice,
} as SalesHistoryItem)
diff --git a/src/models/extrinsics/index.ts b/src/models/extrinsics/index.ts
index 46003233..110775d7 100644
--- a/src/models/extrinsics/index.ts
+++ b/src/models/extrinsics/index.ts
@@ -15,6 +15,6 @@ export type AccountTxHistoryItem = {
extrinsicId: string;
module: string;
call: string;
- timestamp: string;
+ timestamp: Date;
success: boolean;
};
diff --git a/src/models/regions/sale.ts b/src/models/regions/sale.ts
index 2a6ccf61..8729346b 100644
--- a/src/models/regions/sale.ts
+++ b/src/models/regions/sale.ts
@@ -106,7 +106,7 @@ export type PurchaseHistoryItem = {
address: string;
core: number;
extrinsicId: string;
- timestamp: string;
+ timestamp: Date;
price: number;
type: string;
};