Fix for effective fee rate calculation bug.

This commit is contained in:
softsimon 2021-04-12 13:02:31 +04:00
parent 4c8d261da0
commit 4ab4581393
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -108,7 +108,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
} else {
this.apiService.getCpfpinfo$(this.tx.txid)
.subscribe((cpfpInfo) => {
const lowerFeeParents = cpfpInfo.ancestors.filter((parent) => (parent.fee / (parent.weight / 4)) < tx.effectiveFeePerVsize);
const lowerFeeParents = cpfpInfo.ancestors.filter((parent) => (parent.fee / (parent.weight / 4)) < tx.feePerVsize);
let totalWeight = tx.weight + lowerFeeParents.reduce((prev, val) => prev + val.weight, 0);
let totalFees = tx.fee + lowerFeeParents.reduce((prev, val) => prev + val.fee, 0);