Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Fix display of mining rewards in overview tx list
Browse files Browse the repository at this point in the history
Closes #406
  • Loading branch information
nop33 committed Oct 11, 2022
1 parent b435989 commit 93e2cb3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/OverviewPage/TransactionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ const OverviewPageTransactionList = ({ className, onTransactionClick }: Overview
ReactTooltip.rebuild()
}, [addresses])

const shouldHideTx = (tx: Transaction, address: Address) =>
tx.inputs &&
tx.inputs.length > 0 &&
hasOnlyInputsWith(tx.inputs, addresses) &&
getDirection(tx, address.hash) == 'in' &&
tx.timestamp !== GENESIS_TIMESTAMP

return (
<Table isLoading={showSkeletonLoading} className={className} minWidth="500px">
{allPendingTxs.map(({ data: tx, address }: BelongingToAddress<PendingTx>) => (
Expand All @@ -68,12 +75,7 @@ const OverviewPageTransactionList = ({ className, onTransactionClick }: Overview
</TableRow>
))}
{allConfirmedTxs.map(({ data: tx, address }: BelongingToAddress<Transaction>) => {
if (
hasOnlyInputsWith((tx as Transaction).inputs ?? [], addresses) &&
getDirection(tx, address.hash) == 'in' &&
tx.timestamp !== GENESIS_TIMESTAMP
)
return null
if (shouldHideTx(tx, address)) return null
return (
<TableRow
key={`${tx.hash}-${address.hash}`}
Expand Down

0 comments on commit 93e2cb3

Please sign in to comment.