diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-18 16:08:15 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-18 16:08:15 +0800 |
commit | 04845d42c01b41fc428b3c604796e84d4e2ac9a1 (patch) | |
tree | 298aee98e6a5cca3a72be5d94aafafe0ce027d92 /lib/autoprovider.js | |
parent | 27a8799e4809325bb2d7dbc7480a3de0f9d684d6 (diff) | |
parent | 0d526d66b76fbf7044ce80c64d1dc296308a8786 (diff) | |
download | dexon-04845d42c01b41fc428b3c604796e84d4e2ac9a1.tar.gz dexon-04845d42c01b41fc428b3c604796e84d4e2ac9a1.tar.zst dexon-04845d42c01b41fc428b3c604796e84d4e2ac9a1.zip |
Merge pull request #1 from cubedro/master
Fixed autoprovider bug
Diffstat (limited to 'lib/autoprovider.js')
-rw-r--r-- | lib/autoprovider.js | 10 |
1 files changed, 5 insertions, 5 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 <http://www.gnu.org/licenses/>. */ -/** @file websocket.js +/** @file autoprovider.js * @authors: * Marek Kotewicz <marek@ethdev.com> * Marian Oancea <marian@ethdev.com> @@ -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() { |