Unblinding refactor fix

This commit is contained in:
softsimon
2021-08-18 03:34:17 +03:00
parent fe1d153632
commit e20100e437
2 changed files with 11 additions and 8 deletions

View File

@@ -156,10 +156,19 @@ export class TransactionComponent implements OnInit, OnDestroy {
);
})
)
.subscribe((tx: Transaction) => {
.subscribe(async (tx: Transaction) => {
if (!tx) {
return;
}
if (this.network === 'liquid') {
try {
await this.liquidUnblinding.checkUnblindedTx(tx)
} catch (error) {
this.errorUnblinded = error;
}
}
this.tx = tx;
if (tx.fee === undefined) {
this.tx.fee = 0;
@@ -197,12 +206,6 @@ export class TransactionComponent implements OnInit, OnDestroy {
this.fetchCpfp$.next(this.tx.txid);
}
}
if (this.network === 'liquid') {
this.liquidUnblinding.checkUnblindedTx(this.tx)
.catch((error) => {
this.errorUnblinded = error;
});
}
},
(error) => {
this.error = error;