From 1a9624af5146a790f6bc8c5167bf5a6c006a6644 Mon Sep 17 00:00:00 2001 From: Marian Oancea Date: Tue, 18 Nov 2014 09:11:16 +0200 Subject: [PATCH 1/2] Fixed require web3 bug Fixed error "Cannot find module './web3'" in autoprovider.js --- lib/autoprovider.js | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/autoprovider.js b/lib/autoprovider.js index 470861686..735f56349 100644 --- a/lib/autoprovider.js +++ b/lib/autoprovider.js @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** @file websocket.js +/** @file autoprovider.js * @authors: * Marek Kotewicz * Marian Oancea @@ -28,7 +28,7 @@ */ if (process.env.NODE_ENV !== 'build') { var WebSocket = require('ws'); // jshint ignore:line - var web3 = require('./web3'); // jshint ignore:line + var web3 = require('./main.js'); // jshint ignore:line } var AutoProvider = function (userOptions) { @@ -44,13 +44,13 @@ var AutoProvider = function (userOptions) { this.provider = new web3.providers.QtProvider(); return; } - + userOptions = userOptions || {}; var options = { httprpc: userOptions.httprpc || 'http://localhost:8080', websockets: userOptions.websockets || 'ws://localhost:40404/eth' }; - + var self = this; var closeWithSuccess = function (success) { ws.close(); @@ -71,7 +71,7 @@ var AutoProvider = function (userOptions) { var ws = new WebSocket(options.websockets); ws.onopen = function() { - closeWithSuccess(true); + closeWithSuccess(true); }; ws.onerror = function() { diff --git a/package.json b/package.json index 38465e7bd..868a76b1d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ethereum.js", "namespace": "ethereum", - "version": "0.0.3", + "version": "0.0.4", "description": "Ethereum Compatible JavaScript API", "main": "./index.js", "directories": { From 0d526d66b76fbf7044ce80c64d1dc296308a8786 Mon Sep 17 00:00:00 2001 From: Marian Oancea Date: Tue, 18 Nov 2014 09:23:14 +0200 Subject: [PATCH 2/2] Updated version Changed version from npm in order to publish the update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 868a76b1d..24141ea2e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ethereum.js", "namespace": "ethereum", - "version": "0.0.4", + "version": "0.0.5", "description": "Ethereum Compatible JavaScript API", "main": "./index.js", "directories": {