Skip to content

Commit 953c37d

Browse files
committed
don't count invalid fee payer txns
1 parent 9de8455 commit 953c37d

File tree

1 file changed

+4
-2
lines changed
  • src/features/Overview/SlotPerformance/ComputeUnitsCard

1 file changed

+4
-2
lines changed

src/features/Overview/SlotPerformance/ComputeUnitsCard/CuChart.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ function getChartData(transactions: SlotTransactions) {
5858
: -transactions.txn_compute_units_requested[txnIdx] +
5959
transactions.txn_compute_units_consumed[txnIdx]
6060
: 0;
61-
const fees =
62-
!event.isTxnStart && transactions.txn_landed[txnIdx]
61+
const fees = // fees are only paid by landed transactions with a valid fee payer (errors 5, 6 result in an invalid fee payer)
62+
!event.isTxnStart &&
63+
transactions.txn_landed[txnIdx] &&
64+
![5, 6].includes(transactions.txn_error_code[txnIdx])
6365
? Number(transactions.txn_priority_fee[txnIdx]) +
6466
Number(transactions.txn_transaction_fee[txnIdx])
6567
: 0;

0 commit comments

Comments
 (0)