From 816966ca317d79217d734d5c8e5f4986f27e2053 Mon Sep 17 00:00:00 2001 From: Nicholas Barnett Date: Wed, 18 Dec 2024 17:34:04 -0600 Subject: [PATCH] fix: fixed pending tx receipt time --- src/common/components/transaction-item.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/components/transaction-item.tsx b/src/common/components/transaction-item.tsx index 44c6e3d07..c9ee8c2a5 100644 --- a/src/common/components/transaction-item.tsx +++ b/src/common/components/transaction-item.tsx @@ -30,10 +30,18 @@ export interface TxItemProps extends FlexProps { } const getTransactionTime = (tx: Transaction | MempoolTransaction) => { - if ((tx as any).block_time !== 'undefined' && (tx as any).block_time !== -1) { + if ( + (tx as any).block_time && + typeof (tx as any).block_time !== 'undefined' && + (tx as any).block_time !== -1 + ) { return (tx as any).block_time; } - if (typeof (tx as any).burn_block_time !== 'undefined' && (tx as any).burn_block_time !== -1) { + if ( + (tx as any).burn_block_time && + typeof (tx as any).burn_block_time !== 'undefined' && + (tx as any).burn_block_time !== -1 + ) { return (tx as any).burn_block_time; } else if ((tx as any).burn_block_time === -1) { return (tx as any).parent_burn_block_time;