mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
Unblinding refactor fix
This commit is contained in:
parent
fe1d153632
commit
e20100e437
@ -68,7 +68,7 @@ export class LiquidUnblinding {
|
|||||||
tx._unblinded = { matched, total: this.commitments.size };
|
tx._unblinded = { matched, total: this.commitments.size };
|
||||||
this.deduceBlinded(tx);
|
this.deduceBlinded(tx);
|
||||||
if (matched < this.commitments.size) {
|
if (matched < this.commitments.size) {
|
||||||
throw new Error(`Error: Invalid blinding data.`)
|
throw new Error(`Invalid blinding data.`)
|
||||||
}
|
}
|
||||||
tx._deduced = false; // invalidate cache so deduction is attempted again
|
tx._deduced = false; // invalidate cache so deduction is attempted again
|
||||||
return tx._unblinded;
|
return tx._unblinded;
|
||||||
|
@ -156,10 +156,19 @@ export class TransactionComponent implements OnInit, OnDestroy {
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.subscribe((tx: Transaction) => {
|
.subscribe(async (tx: Transaction) => {
|
||||||
if (!tx) {
|
if (!tx) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.network === 'liquid') {
|
||||||
|
try {
|
||||||
|
await this.liquidUnblinding.checkUnblindedTx(tx)
|
||||||
|
} catch (error) {
|
||||||
|
this.errorUnblinded = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.tx = tx;
|
this.tx = tx;
|
||||||
if (tx.fee === undefined) {
|
if (tx.fee === undefined) {
|
||||||
this.tx.fee = 0;
|
this.tx.fee = 0;
|
||||||
@ -197,12 +206,6 @@ export class TransactionComponent implements OnInit, OnDestroy {
|
|||||||
this.fetchCpfp$.next(this.tx.txid);
|
this.fetchCpfp$.next(this.tx.txid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.network === 'liquid') {
|
|
||||||
this.liquidUnblinding.checkUnblindedTx(this.tx)
|
|
||||||
.catch((error) => {
|
|
||||||
this.errorUnblinded = error;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
this.error = error;
|
this.error = error;
|
||||||
|
Loading…
Reference in New Issue
Block a user