mirror of
https://github.com/mempool/mempool.git
synced 2025-03-15 04:11:48 +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[] = [];
|
const foundTransactions: TransactionExtended[] = [];
|
||||||
|
|
||||||
newTransactions.forEach((tx) => {
|
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) {
|
if (someVin) {
|
||||||
foundTransactions.push(tx);
|
foundTransactions.push(tx);
|
||||||
return;
|
return;
|
||||||
|
@ -185,7 +185,7 @@ class WebsocketHandler {
|
||||||
const foundTransactions: TransactionExtended[] = [];
|
const foundTransactions: TransactionExtended[] = [];
|
||||||
|
|
||||||
transactions.forEach((tx) => {
|
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);
|
foundTransactions.push(tx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ export interface Prevout {
|
||||||
export interface Vin {
|
export interface Vin {
|
||||||
txid: string;
|
txid: string;
|
||||||
vout: number;
|
vout: number;
|
||||||
prevout: Prevout;
|
prevout?: Prevout;
|
||||||
scriptsig: string;
|
scriptsig: string;
|
||||||
scriptsig_asm: string;
|
scriptsig_asm: string;
|
||||||
inner_redeemscript_asm?: string;
|
inner_redeemscript_asm?: string;
|
||||||
|
|
Loading…
Add table
Reference in a new issue