Skip to content

Commit

Permalink
fix: fixed pending tx receipt time
Browse files Browse the repository at this point in the history
  • Loading branch information
BLuEScioN committed Dec 19, 2024
1 parent 6ab9767 commit 8971b2d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/common/components/transaction-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8971b2d

Please # to comment.