diff --git a/config.json b/config.json index 02bc7bab..f7087f25 100644 --- a/config.json +++ b/config.json @@ -106,7 +106,7 @@ }, "dapp": { "masterrequired": true, - "masterpassword": "rJ1T2sZH3cLU", + "masterpassword": "", "autoexec": [] }, "wsClient": { @@ -114,4 +114,4 @@ "enabled": true }, "nethash": "bd330166898377fb28743ceef5e43a5d9d0a3efd9b3451fb7bc53530bb0a6d64" -} \ No newline at end of file +} diff --git a/modules/node.js b/modules/node.js index 98cbf573..a84dacad 100644 --- a/modules/node.js +++ b/modules/node.js @@ -100,23 +100,27 @@ Node.prototype.shared = { * @return {Function} cb Callback function from params (through setImmediate) * @return {Object} cb.err Always return `null` here * @return {Object} cb.obj Anonymous object with version info - * @return {String} cb.obj.build Build information (if available, otherwise '') - * @return {String} cb.obj.commit Hash of last git commit (if available, otherwise '') - * @return {String} cb.obj.version Lisk version from config file + * @return {Object} cb.obj.network Anonymous object with network info + * @return {Object} cb.obj.wsClient Anonymous object with WebSocket Client info + * @return {Boolean} cb.obj.wsClient.enabled are webSockets available. + * @return {Object} cb.obj.version Anonymous object with version info + * @return {String} cb.obj.version.build Build information (if available, otherwise '') + * @return {String} cb.obj.version.commit Hash of last git commit (if available, otherwise '') + * @return {String} cb.obj.version.version ADAMANT version from package.json */ getStatus: function (req, cb) { var lastBlock = modules.blocks.lastBlock.get(); - var wsClientEnabled = false; + var wsClientOptions = { + enabled: false + }; if (library.config.wsClient) { if (library.config.wsClient.enabled) { - wsClientEnabled = true; + wsClientOptions.enabled = true; + wsClientOptions.port = library.config.wsClient.portWS; } } return setImmediate(cb, null, { - wsClient: { - enabled: wsClientEnabled - }, network: { broadhash: modules.system.getBroadhash(), epoch: constants.epochTime, @@ -131,7 +135,8 @@ Node.prototype.shared = { build: library.build, commit: library.lastCommit, version: library.config.version - } + }, + wsClient: wsClientOptions }); } };