Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions apps/explorer/src/comps/TxTransactionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ export function TransactionTotal(props: { transaction: Transaction }) {
const amountParts = React.useMemo(() => {
if (!batchData) return

return batchData.knownEvents.flatMap((event) =>
event.parts.filter(
(part): part is Extract<KnownEventPart, { type: 'amount' }> =>
part.type === 'amount',
),
)
return batchData.knownEvents
.filter((event) => event.type !== 'approval')
.flatMap((event) =>
event.parts.filter(
(part): part is Extract<KnownEventPart, { type: 'amount' }> =>
part.type === 'amount',
),
)
}, [batchData])

const infiniteLabel = <span className="text-secondary">−</span>
Expand Down
14 changes: 8 additions & 6 deletions apps/explorer/src/routes/_layout/address/$address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1391,12 +1391,14 @@ function TransactionTotalCell(props: { transaction: EnrichedTransaction }) {
const { transaction } = props

const amountParts = React.useMemo(() => {
return transaction.knownEvents.flatMap((event) =>
event.parts.filter(
(part): part is Extract<KnownEventPart, { type: 'amount' }> =>
part.type === 'amount',
),
)
return transaction.knownEvents
.filter((event) => event.type !== 'approval')
.flatMap((event) =>
event.parts.filter(
(part): part is Extract<KnownEventPart, { type: 'amount' }> =>
part.type === 'amount',
),
)
}, [transaction.knownEvents])

const infiniteLabel = <span className="text-secondary">−</span>
Expand Down
Loading