From 59705870bc7ee1c65be77152cf9a3df0ed34819f Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 19 Nov 2024 17:35:22 +0100 Subject: [PATCH] fix(wallet): Handle case where timestamp is undefined in transaction-card (#4126) --- .../wallet/src/ui/app/components/transactions-card/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/wallet/src/ui/app/components/transactions-card/index.tsx b/apps/wallet/src/ui/app/components/transactions-card/index.tsx index 0e11a5f23ee..ab15c187695 100644 --- a/apps/wallet/src/ui/app/components/transactions-card/index.tsx +++ b/apps/wallet/src/ui/app/components/transactions-card/index.tsx @@ -50,8 +50,9 @@ export function TransactionCard({ txn, address }: TransactionCardProps) { const error = txn.effects?.status.error; - const timestamp = txn.timestampMs; - const transactionDate = formatDate(Number(timestamp), ['month', 'day', 'hour', 'minute']); + const transactionDate = !txn.timestampMs + ? '--' + : formatDate(Number(txn.timestampMs), ['month', 'day', 'hour', 'minute']); return (