fix frontend js error on unconfirmed non-cpfp transactions
This commit is contained in:
parent
bd30f2eb12
commit
2548d2a5e9
@ -131,8 +131,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.cpfpInfo = null;
|
this.cpfpInfo = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// merge ancestors/descendants
|
||||||
const relatives = [...cpfpInfo.ancestors, ...cpfpInfo.descendants || [cpfpInfo.bestDescendant]];
|
const relatives = [...(cpfpInfo.ancestors || []), ...(cpfpInfo.descendants || [])];
|
||||||
|
if (cpfpInfo.bestDescendant && !cpfpInfo.descendants?.length) {
|
||||||
|
relatives.push(cpfpInfo.bestDescendant);
|
||||||
|
}
|
||||||
let totalWeight =
|
let totalWeight =
|
||||||
this.tx.weight +
|
this.tx.weight +
|
||||||
relatives.reduce((prev, val) => prev + val.weight, 0);
|
relatives.reduce((prev, val) => prev + val.weight, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user