From 4260a74d91b0cf48220adc2cdfa929e05769b4e0 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Sun, 29 Jun 2025 14:36:44 -0700 Subject: [PATCH] fix(utxo.get()): Handling corner-case when SLP indexer is not returning data --- src/utxo.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utxo.js b/src/utxo.js index d8c399b..efd3bde 100644 --- a/src/utxo.js +++ b/src/utxo.js @@ -153,7 +153,9 @@ class UTXO { // the indexer. const txData = await this.psfSlpIndexer.tx(thisUtxo.tx_hash) // console.log(`txData: ${JSON.stringify(txData, null, 2)}`) - if (txData.txData.isValidSlp === null) { + + // txData.txData === undefined if the SLP indexer is syncing. + if (!txData.txData || txData.txData.isValidSlp === null) { thisUtxo.isSlp = null } else { thisUtxo.isSlp = false