Show tx value sum if complete unblinding data is provided

fixes #1174
This commit is contained in:
softsimon
2022-02-22 16:53:59 +04:00
parent ced5862c3e
commit 6538071b62
2 changed files with 5 additions and 1 deletions

View File

@@ -95,6 +95,10 @@ export class TransactionsListComponent implements OnInit, OnChanges {
}
}
haveBlindedOutputValues(tx: Transaction): boolean {
return tx.vout.some((v: any) => v.value === undefined);
}
getTotalTxOutput(tx: Transaction) {
return tx.vout.map((v: any) => v.value || 0).reduce((a: number, b: number) => a + b);
}