Add blocks.extras.totalFees and show it in blockchain blocks component
This commit is contained in:
@@ -116,6 +116,9 @@ class Blocks {
|
||||
Common.median(transactionsTmp.map((tx) => tx.effectiveFeePerVsize)) : 0;
|
||||
blockExtended.extras.feeRange = transactionsTmp.length > 0 ?
|
||||
Common.getFeesInRange(transactionsTmp, 8) : [0, 0];
|
||||
blockExtended.extras.totalFees = transactionsTmp.reduce((acc, tx) => {
|
||||
return acc + tx.fee;
|
||||
}, 0)
|
||||
|
||||
if (Common.indexingEnabled()) {
|
||||
let pool: PoolTag;
|
||||
|
||||
@@ -78,6 +78,7 @@ export interface TransactionStripped {
|
||||
}
|
||||
|
||||
export interface BlockExtension {
|
||||
totalFees?: number;
|
||||
medianFee?: number;
|
||||
feeRange?: number[];
|
||||
reward?: number;
|
||||
|
||||
Reference in New Issue
Block a user