Skip to content

Commit

Permalink
Merge pull request #1 from cubedro/master
Browse files Browse the repository at this point in the history
Fixed autoprovider bug
  • Loading branch information
debris committed Nov 18, 2014
2 parents 27a8799 + 0d526d6 commit 04845d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/autoprovider.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public License
along with ethereum.js. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file websocket.js
/** @file autoprovider.js
* @authors:
* Marek Kotewicz <marek@ethdev.com>
* Marian Oancea <marian@ethdev.com>
Expand All @@ -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) {
Expand All @@ -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();
Expand All @@ -71,7 +71,7 @@ var AutoProvider = function (userOptions) {
var ws = new WebSocket(options.websockets);

ws.onopen = function() {
closeWithSuccess(true);
closeWithSuccess(true);
};

ws.onerror = function() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ethereum.js",
"namespace": "ethereum",
"version": "0.0.3",
"version": "0.0.5",
"description": "Ethereum Compatible JavaScript API",
"main": "./index.js",
"directories": {
Expand Down

0 comments on commit 04845d4

Please sign in to comment.