Skip to content

Commit

Permalink
feat: display dropped label for all dropped tx statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
He1DAr committed Nov 20, 2024
1 parent ea80e0d commit 9d7712c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/app/txid/[txId]/TxPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const txStatusLabelMap = {
non_canonical: 'Non-canonical (orphaned)',
failed: 'Failed',
dropped: 'Dropped',
dropped_problematic: 'Dropped (problematic)',
};

export const TxPage: React.FC<{
Expand Down
7 changes: 1 addition & 6 deletions src/common/utils/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ export function getTransactionStatus(tx: Transaction | MempoolTransaction) {
}
} else if (tx?.tx_status === 'abort_by_response' || tx?.tx_status === 'abort_by_post_condition') {
return TransactionStatus.FAILED;
} else if (
tx?.tx_status === 'dropped_replace_across_fork' ||
tx?.tx_status === 'dropped_replace_by_fee' ||
tx?.tx_status === 'dropped_stale_garbage_collect' ||
tx?.tx_status === 'dropped_too_expensive'
) {
} else if (tx?.tx_status.startsWith('dropped_')) {
return TransactionStatus.DROPPED;
}
return TransactionStatus.PENDING;
Expand Down

0 comments on commit 9d7712c

Please sign in to comment.