mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 09:12:05 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9a8999239 | ||
|
|
ae0f556f75 |
+23
-1
@@ -1040,6 +1040,15 @@ class Slp {
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// Corner case: No results were returned from SLPDB. Mark each entry
|
||||
// as 'null'
|
||||
for (let i = 0; i < txids.length; i++) {
|
||||
formattedTokens.push({
|
||||
txid: txids[i],
|
||||
valid: null
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Catch a corner case of repeated txids. SLPDB will remove redundent TXIDs,
|
||||
@@ -1423,7 +1432,7 @@ class Slp {
|
||||
|
||||
let formattedTokens = []
|
||||
|
||||
// Combine the arrays. Why? Generally there is nothing in the u array.
|
||||
// Combine the confirmed and unconfirmed collections.
|
||||
const concatArray = tokenRes.data.c.concat(tokenRes.data.u)
|
||||
|
||||
const tokenIds = []
|
||||
@@ -1457,6 +1466,15 @@ class Slp {
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// Corner case: No results were returned from SLPDB. Mark each entry
|
||||
// as 'null'
|
||||
for (let i = 0; i < txids.length; i++) {
|
||||
formattedTokens.push({
|
||||
txid: txids[i],
|
||||
valid: null
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Catch a corner case of repeated txids. SLPDB will remove redundent TXIDs,
|
||||
@@ -1476,6 +1494,10 @@ class Slp {
|
||||
formattedTokens = newOutput
|
||||
}
|
||||
|
||||
// console.log(
|
||||
// `formattedTokens: ${JSON.stringify(formattedTokens, null, 2)}`
|
||||
// )
|
||||
|
||||
// Put the output array in the same order as the input array.
|
||||
const outAry = []
|
||||
for (let i = 0; i < txids.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user