mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
Merge pull request #192 from Permissionless-Software-Foundation/ct-unstable
fix(token data): Returning CID and not actual content
This commit is contained in:
Generated
+7
-7
@@ -9,7 +9,7 @@
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@psf/bch-js": "6.2.9",
|
||||
"@psf/bch-js": "6.2.14",
|
||||
"apidoc": "^0.26.0",
|
||||
"axios": "^0.21.1",
|
||||
"bitcore-lib-cash": "^8.23.1",
|
||||
@@ -833,9 +833,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@psf/bch-js": {
|
||||
"version": "6.2.9",
|
||||
"resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.2.9.tgz",
|
||||
"integrity": "sha512-7oj1+DqiSqOvl5Pn4PdLG+1hSptWqLHLEqen7UvkCL1KSR4qqVaI3m/j3SCHb6nWEZ4HceZalav2AM1LYHDEWg==",
|
||||
"version": "6.2.14",
|
||||
"resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.2.14.tgz",
|
||||
"integrity": "sha512-tHF2DyBRgYHTvdhVY58dOzbCOuKQrhc9QvYyj+K4c7mfsVgprjU+FTcM9ZFcE3A+0G/92VBP4/kkfccqfdLlWA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@chris.troutner/bip32-utils": "1.0.5",
|
||||
@@ -16055,9 +16055,9 @@
|
||||
}
|
||||
},
|
||||
"@psf/bch-js": {
|
||||
"version": "6.2.9",
|
||||
"resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.2.9.tgz",
|
||||
"integrity": "sha512-7oj1+DqiSqOvl5Pn4PdLG+1hSptWqLHLEqen7UvkCL1KSR4qqVaI3m/j3SCHb6nWEZ4HceZalav2AM1LYHDEWg==",
|
||||
"version": "6.2.14",
|
||||
"resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.2.14.tgz",
|
||||
"integrity": "sha512-tHF2DyBRgYHTvdhVY58dOzbCOuKQrhc9QvYyj+K4c7mfsVgprjU+FTcM9ZFcE3A+0G/92VBP4/kkfccqfdLlWA==",
|
||||
"requires": {
|
||||
"@chris.troutner/bip32-utils": "1.0.5",
|
||||
"@psf/bip21": "2.0.1",
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
"node": ">=10.15.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@psf/bch-js": "6.2.9",
|
||||
"@psf/bch-js": "6.2.14",
|
||||
"apidoc": "^0.26.0",
|
||||
"axios": "^0.21.1",
|
||||
"bitcore-lib-cash": "^8.23.1",
|
||||
|
||||
@@ -271,7 +271,8 @@ class PsfSlpIndexer {
|
||||
|
||||
// try to get immutable data
|
||||
try {
|
||||
const immutableData = await _this.getCIDData(tokenStats.documentUri)
|
||||
// const immutableData = await _this.getCIDData(tokenStats.documentUri)
|
||||
const immutableData = tokenStats.documentUri
|
||||
tokenData.immutableData = immutableData
|
||||
} catch (error) {
|
||||
tokenData.immutableData = ''
|
||||
@@ -367,8 +368,9 @@ class PsfSlpIndexer {
|
||||
if (!cid) {
|
||||
throw new Error('CID could not be found in OP_RETURN data')
|
||||
}
|
||||
const result = cid
|
||||
|
||||
const result = await _this.getCIDData(cid)
|
||||
// const result = await _this.getCIDData(cid)
|
||||
// console.log(`response.data: ${JSON.stringify(response.data, null, 2)}`)
|
||||
|
||||
return result
|
||||
|
||||
@@ -706,8 +706,8 @@ describe('#PsfSlpIndexer', () => {
|
||||
assert.property(result, 'mutableData')
|
||||
|
||||
assert.isObject(result.genesisData)
|
||||
assert.isObject(result.immutableData)
|
||||
assert.isObject(result.mutableData)
|
||||
// assert.isObject(result.immutableData)
|
||||
// assert.isObject(result.mutableData)
|
||||
|
||||
const genesisData = result.genesisData
|
||||
assert.property(genesisData, 'ticker')
|
||||
@@ -745,7 +745,7 @@ describe('#PsfSlpIndexer', () => {
|
||||
|
||||
assert.isObject(result.genesisData)
|
||||
assert.isObject(result.mutableData)
|
||||
assert.equal(result.immutableData, '')
|
||||
// assert.equal(result.immutableData, '')
|
||||
|
||||
const genesisData = result.genesisData
|
||||
assert.property(genesisData, 'ticker')
|
||||
@@ -782,8 +782,8 @@ describe('#PsfSlpIndexer', () => {
|
||||
assert.property(result, 'mutableData')
|
||||
|
||||
assert.isObject(result.genesisData)
|
||||
assert.isObject(result.immutableData)
|
||||
assert.equal(result.mutableData, '')
|
||||
// assert.isObject(result.immutableData)
|
||||
// assert.equal(result.mutableData, '')
|
||||
|
||||
const genesisData = result.genesisData
|
||||
assert.property(genesisData, 'ticker')
|
||||
@@ -904,7 +904,7 @@ describe('#PsfSlpIndexer', () => {
|
||||
const documentHash = 'c37ba29f40ecc61662ea56324fdb72a5f1e66add2078854c2144765b9030358a'
|
||||
|
||||
const result = await uut.getMutableData(documentHash)
|
||||
assert.isObject(result)
|
||||
assert.isString(result)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user