Merge pull request #83 from Permissionless-Software-Foundation/ct-unstable

fix(bch-js): Updating to v4.5.2
This commit is contained in:
Chris Troutner
2021-01-07 13:28:01 -08:00
committed by GitHub
5 changed files with 3123 additions and 4618 deletions
+3115 -4612
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -22,16 +22,16 @@
"coverage": "nyc report --reporter=text-lcov | coveralls", "coverage": "nyc report --reporter=text-lcov | coveralls",
"coverage:report": "export NETWORK=mainnet && nyc --reporter=html mocha --timeout 25000 test/v4/", "coverage:report": "export NETWORK=mainnet && nyc --reporter=html mocha --timeout 25000 test/v4/",
"docs": "./node_modules/.bin/apidoc -i src/routes/v4 -o docs", "docs": "./node_modules/.bin/apidoc -i src/routes/v4 -o docs",
"test:temp1": "export NETWORK=mainnet && export TEST=integration && mocha --timeout 25000 test/v4/integration/price.js", "test:temp1": "export NETWORK=mainnet && export TEST=integration && mocha --timeout 25000 -g '#generateSendOpReturn()' test/v4/integration/",
"test:temp2": "mocha test/v4/rate-limits.js" "test:temp2": "mocha test/v4/rate-limits.js"
}, },
"engines": { "engines": {
"node": ">=10.15.1" "node": ">=10.15.1"
}, },
"dependencies": { "dependencies": {
"@psf/bch-js": "^4.2.5", "@psf/bch-js": "^4.5.2",
"apidoc": "^0.23.0", "apidoc": "^0.23.0",
"axios": "^0.19.0", "axios": "^0.21.1",
"bitcore-lib-cash": "^8.23.1", "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",
+2 -2
View File
@@ -262,11 +262,11 @@ function onError (error) {
case 'EACCES': case 'EACCES':
console.error(`${bind} requires elevated privileges`) console.error(`${bind} requires elevated privileges`)
process.exit(1) process.exit(1)
break // break
case 'EADDRINUSE': case 'EADDRINUSE':
console.error(`${bind} is already in use`) console.error(`${bind} is already in use`)
process.exit(1) process.exit(1)
break // break
default: default:
throw error throw error
} }
+2
View File
@@ -1896,6 +1896,7 @@ class Slp {
}) })
} }
console.log(`sendQty: ${JSON.stringify(sendQty, null, 2)}`)
const opReturn = await _this.bchjs.SLP.TokenType1.generateSendOpReturn( const opReturn = await _this.bchjs.SLP.TokenType1.generateSendOpReturn(
tokenUtxos, tokenUtxos,
sendQty sendQty
@@ -1907,6 +1908,7 @@ class Slp {
res.status(200) res.status(200)
return res.json({ script, outputs: opReturn.outputs }) return res.json({ script, outputs: opReturn.outputs })
} catch (err) { } catch (err) {
console.log('err: ', err)
wlogger.error('Error in slp.js/generateSendOpReturn().', err) wlogger.error('Error in slp.js/generateSendOpReturn().', err)
// Decode the error message. // Decode the error message.
+1 -1
View File
@@ -1287,7 +1287,7 @@ describe('#SLP', () => {
}) })
}) })
describe('generateSendOpReturn()', () => { describe('#generateSendOpReturn()', () => {
const generateSendOpReturn = slpRoute.generateSendOpReturn const generateSendOpReturn = slpRoute.generateSendOpReturn
// Validate tokenUtxos input // Validate tokenUtxos input
it('should throw 400 if tokenUtxos is missing', async () => { it('should throw 400 if tokenUtxos is missing', async () => {