Comparing version 0.7.8 to 0.7.9
@@ -235,2 +235,5 @@ 'use strict'; | ||
this.transport.setOptions(options); | ||
if (options.hasOwnProperty('useTestNet')) { | ||
_config2.default.set('address_prefix', options.useTestNet ? 'TST' : 'STM'); | ||
} | ||
} | ||
@@ -237,0 +240,0 @@ }, { |
@@ -11,2 +11,8 @@ 'use strict'; | ||
var _config = require('../../../config.js'); | ||
var _config2 = _interopRequireDefault(_config); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Low-level types that make up operations | ||
@@ -20,3 +26,3 @@ | ||
var Types = { useTestNet: false }; | ||
var Types = {}; | ||
module.exports = Types; | ||
@@ -127,7 +133,7 @@ | ||
precision = 3; | ||
symbol = this.useTestNet ? "TESTS" : "STEEM"; | ||
symbol = _config2.default.get("address_prefix") == "STM" ? "STEEM" : "TESTS"; | ||
break; | ||
case "@@000000013": | ||
precision = 3; | ||
symbol = this.useTestNet ? "TBD" : "SBD"; | ||
symbol = _config2.default.get("address_prefix") == "STM" ? "SBD" : "TBD"; | ||
break; | ||
@@ -233,7 +239,7 @@ case "@@000000037": | ||
precision = 3; | ||
symbol = this.useTestNet ? "TESTS" : "STEEM"; | ||
symbol = _config2.default.get("address_prefix") == "STM" ? "STEEM" : "TESTS"; | ||
break; | ||
case "@@000000013": | ||
precision = 3; | ||
symbol = this.useTestNet ? "TBD" : "SBD"; | ||
symbol = _config2.default.get("address_prefix") == "STM" ? "SBD" : "TBD"; | ||
break; | ||
@@ -240,0 +246,0 @@ case "@@000000037": |
@@ -1,1 +0,1 @@ | ||
{"name":"steem","version":"0.7.8","description":"Steem.js the JavaScript API for Steem blockchain","main":"lib/index.js","scripts":{"test":"eslint --quiet src test; mocha -t 40000 --require babel-polyfill --require babel-register","test-auth":"npm test -- --grep 'steem.auth'","build":"npm run build-browser && npm run build-node","build-browser":"rm -rf dist && NODE_ENV=production node ./node_modules/webpack/bin/webpack.js && gzip -k -f ./dist/*.js && du -h ./dist/*","build-node":"mkdir -p ./lib && cp -r ./src/* ./lib/ && babel ./src --out-dir ./lib","prepublish":"npm run build"},"browser":{"ws":false,"crypto":false},"repository":{"type":"git","url":"git+https://github.com/steemit/steem-js.git"},"keywords":["steem","steemit","blockchain","steemjs"],"author":"Fabien (https://github.com/bonustrack)","license":"MIT","bugs":{"url":"https://github.com/steemit/steem-js/issues"},"homepage":"https://github.com/steemit/steem-js#readme","dependencies":{"@steemit/rpc-auth":"^1.1.1","bigi":"^1.4.2","bluebird":"^3.4.6","browserify-aes":"^1.0.6","bs58":"^4.0.0","buffer":"^5.0.6","bytebuffer":"^5.0.1","create-hash":"^1.1.2","create-hmac":"^1.1.4","cross-env":"^5.0.0","cross-fetch":"^1.1.1","debug":"^2.6.8","detect-node":"^2.0.3","ecurve":"^1.0.5","lodash":"^4.16.4","retry":"^0.12.0","secure-random":"^1.1.2","ws":"^3.3.2"},"devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.1.1","babel-loader":"^6.2.5","babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.16.0","babel-preset-es2017":"^6.16.0","babel-register":"^6.14.0","bluebird":"^3.4.6","eslint":"^3.5.0","eslint-plugin-import":"^1.15.0","eslint-plugin-jsx-a11y":"^2.2.2","eslint-plugin-react":"^6.2.1","json-loader":"^0.5.4","mocha":"^3.0.2","mocha-make-stub":"^2.3.2","should":"^11.1.0","webpack":"^1.13.2","webpack-visualizer-plugin":"^0.1.5"},"contributors":["Fabien (https://github.com/bonustrack)","James Calfee (https://github.com/jcalfee)","Nilesh Suthar (https://github.com/nil1511)","Pedro Tacla Yamada (https://github.com/yamadapc)"]} | ||
{"name":"steem","version":"0.7.9","description":"Steem.js the JavaScript API for Steem blockchain","main":"lib/index.js","scripts":{"test":"eslint --quiet src test; mocha -t 40000 --require babel-polyfill --require babel-register","test-auth":"npm test -- --grep 'steem.auth'","build":"npm run build-browser && npm run build-node","build-browser":"rm -rf dist && NODE_ENV=production node ./node_modules/webpack/bin/webpack.js && gzip -k -f ./dist/*.js && du -h ./dist/*","build-node":"mkdir -p ./lib && cp -r ./src/* ./lib/ && babel ./src --out-dir ./lib","prepublish":"npm run build"},"browser":{"ws":false,"crypto":false},"repository":{"type":"git","url":"git+https://github.com/steemit/steem-js.git"},"keywords":["steem","steemit","blockchain","steemjs"],"author":"Fabien (https://github.com/bonustrack)","license":"MIT","bugs":{"url":"https://github.com/steemit/steem-js/issues"},"homepage":"https://github.com/steemit/steem-js#readme","dependencies":{"@steemit/rpc-auth":"^1.1.1","bigi":"^1.4.2","bluebird":"^3.4.6","browserify-aes":"^1.0.6","bs58":"^4.0.0","buffer":"^5.0.6","bytebuffer":"^5.0.1","create-hash":"^1.1.2","create-hmac":"^1.1.4","cross-env":"^5.0.0","cross-fetch":"^1.1.1","debug":"^2.6.8","detect-node":"^2.0.3","ecurve":"^1.0.5","lodash":"^4.16.4","retry":"^0.12.0","secure-random":"^1.1.2","ws":"^3.3.2"},"devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.1.1","babel-loader":"^6.2.5","babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.16.0","babel-preset-es2017":"^6.16.0","babel-register":"^6.14.0","bluebird":"^3.4.6","eslint":"^3.5.0","eslint-plugin-import":"^1.15.0","eslint-plugin-jsx-a11y":"^2.2.2","eslint-plugin-react":"^6.2.1","json-loader":"^0.5.4","mocha":"^3.0.2","mocha-make-stub":"^2.3.2","should":"^11.1.0","webpack":"^1.13.2","webpack-visualizer-plugin":"^0.1.5"},"contributors":["Fabien (https://github.com/bonustrack)","James Calfee (https://github.com/jcalfee)","Nilesh Suthar (https://github.com/nil1511)","Pedro Tacla Yamada (https://github.com/yamadapc)"]} |
@@ -103,2 +103,3 @@ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/steemit/steem-js/blob/master/LICENSE) | ||
chain_id: '46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32', | ||
useTestNet: true, | ||
}); | ||
@@ -109,8 +110,2 @@ ``` | ||
Furthermore, you need to change asset serializations for the testnet. | ||
```js | ||
Types.useTestNet = true | ||
``` | ||
## Contributions | ||
@@ -117,0 +112,0 @@ Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list or on Steemit Chat channel #steemjs https://steemit.chat/channel/steemjs. |
@@ -14,2 +14,5 @@ import assert from 'assert' | ||
it('signs and verifies smt_create', function(done) { | ||
let url = steem.config.get('uri'); | ||
steem.api.setOptions({ url: url, useAppbaseApi: true }); | ||
let tx = { | ||
@@ -16,0 +19,0 @@ 'operations': [[ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
12308
17509037
117