mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
fix(utxo.get()): Handling corner-case when SLP indexer is not returning data
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user