mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 09:12:05 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02818da317 | ||
|
|
9804ea8c3a | ||
|
|
4bfe198a62 | ||
|
|
453cbacf9d | ||
|
|
42d88a149a | ||
|
|
2e97430856 | ||
|
|
60bf587031 | ||
|
|
68d1226ded | ||
|
|
f6dc788492 | ||
|
|
a515334a94 | ||
|
|
6be1369182 | ||
|
|
6455522ba6 | ||
|
|
d9a8999239 | ||
|
|
ae0f556f75 |
@@ -16,6 +16,7 @@ start-local-testnet.sh
|
|||||||
test-fullstack-main.sh
|
test-fullstack-main.sh
|
||||||
start-fullstack-main.sh
|
start-fullstack-main.sh
|
||||||
start-fullstack-test.sh
|
start-fullstack-test.sh
|
||||||
|
start-fullstack-testnet.sh
|
||||||
start-free-main.sh
|
start-free-main.sh
|
||||||
start-local-mainnet.sh.save
|
start-local-mainnet.sh.save
|
||||||
start-local-testnet.sh.save
|
start-local-testnet.sh.save
|
||||||
|
|||||||
Generated
+926
-2558
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -28,10 +28,10 @@
|
|||||||
"node": ">=10.15.1"
|
"node": ">=10.15.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@psf/bch-js": "^3.7.1",
|
"@psf/bch-js": "^4.2.5",
|
||||||
"apidoc": "^0.23.0",
|
"apidoc": "^0.23.0",
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"bitcore-lib-cash": "^8.20.3",
|
"bitcore-lib-cash": "^8.23.1",
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
"cookie-parser": "~1.4.3",
|
"cookie-parser": "~1.4.3",
|
||||||
"cors": "^2.8.3",
|
"cors": "^2.8.3",
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
"proxyquire": "^2.1.0",
|
"proxyquire": "^2.1.0",
|
||||||
"request": "^2.88.0",
|
"request": "^2.88.0",
|
||||||
"request-promise": "^4.2.2",
|
"request-promise": "^4.2.2",
|
||||||
"semantic-release": "^17.0.0",
|
"semantic-release": "^17.3.0",
|
||||||
"sinon": "^9.0.0",
|
"sinon": "^9.0.0",
|
||||||
"standard": "^14.3.1",
|
"standard": "^14.3.1",
|
||||||
"typescript": "^3.1.4"
|
"typescript": "^3.1.4"
|
||||||
|
|||||||
+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,
|
// Catch a corner case of repeated txids. SLPDB will remove redundent TXIDs,
|
||||||
@@ -1423,7 +1432,7 @@ class Slp {
|
|||||||
|
|
||||||
let formattedTokens = []
|
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 concatArray = tokenRes.data.c.concat(tokenRes.data.u)
|
||||||
|
|
||||||
const tokenIds = []
|
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,
|
// Catch a corner case of repeated txids. SLPDB will remove redundent TXIDs,
|
||||||
@@ -1476,6 +1494,10 @@ class Slp {
|
|||||||
formattedTokens = newOutput
|
formattedTokens = newOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log(
|
||||||
|
// `formattedTokens: ${JSON.stringify(formattedTokens, null, 2)}`
|
||||||
|
// )
|
||||||
|
|
||||||
// Put the output array in the same order as the input array.
|
// Put the output array in the same order as the input array.
|
||||||
const outAry = []
|
const outAry = []
|
||||||
for (let i = 0; i < txids.length; i++) {
|
for (let i = 0; i < txids.length; i++) {
|
||||||
|
|||||||
+1
-1
@@ -732,7 +732,7 @@ describe('#SLP', () => {
|
|||||||
|
|
||||||
// Note: This should change from null to true once SLPDB finishes indexing.
|
// Note: This should change from null to true once SLPDB finishes indexing.
|
||||||
assert.equal(result[4].txid, txids[4])
|
assert.equal(result[4].txid, txids[4])
|
||||||
assert.equal(result[4].valid, null)
|
assert.equal(result[4].valid, true)
|
||||||
|
|
||||||
assert.equal(result[5].txid, txids[5])
|
assert.equal(result[5].txid, txids[5])
|
||||||
assert.equal(result[5].valid, null)
|
assert.equal(result[5].valid, null)
|
||||||
|
|||||||
Reference in New Issue
Block a user