mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 11:36:07 +01:00
Bugfix for null error when using transaction tracking
This commit is contained in:
parent
4574d18ce3
commit
677f99d03b
2 changed files with 3 additions and 3 deletions
|
@ -136,7 +136,7 @@ class WebsocketHandler {
|
|||
const foundTransactions: TransactionExtended[] = [];
|
||||
|
||||
newTransactions.forEach((tx) => {
|
||||
const someVin = tx.vin.some((vin) => vin.prevout.scriptpubkey_address === client['track-address']);
|
||||
const someVin = tx.vin.some((vin) => vin.prevout && vin.prevout.scriptpubkey_address === client['track-address']);
|
||||
if (someVin) {
|
||||
foundTransactions.push(tx);
|
||||
return;
|
||||
|
@ -185,7 +185,7 @@ class WebsocketHandler {
|
|||
const foundTransactions: TransactionExtended[] = [];
|
||||
|
||||
transactions.forEach((tx) => {
|
||||
if (tx.vin && tx.vin.some((vin) => vin.prevout.scriptpubkey_address === client['track-address'])) {
|
||||
if (tx.vin && tx.vin.some((vin) => vin.prevout && vin.prevout.scriptpubkey_address === client['track-address'])) {
|
||||
foundTransactions.push(tx);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ export interface Prevout {
|
|||
export interface Vin {
|
||||
txid: string;
|
||||
vout: number;
|
||||
prevout: Prevout;
|
||||
prevout?: Prevout;
|
||||
scriptsig: string;
|
||||
scriptsig_asm: string;
|
||||
inner_redeemscript_asm?: string;
|
||||
|
|
Loading…
Add table
Reference in a new issue