diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-22 03:29:02 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-22 03:29:02 +0800 |
commit | 0d2cccc2ce88753a22ed60b74f50a376750d6483 (patch) | |
tree | dfac89690d428f4bf3ddd9d24a96535b7fcd9b86 /lib/providermanager.js | |
parent | e1fcffcc810bdf6a116cc12e21c5a8750cb86d23 (diff) | |
download | dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.tar dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.tar.gz dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.tar.bz2 dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.tar.lz dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.tar.xz dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.tar.zst dexon-0d2cccc2ce88753a22ed60b74f50a376750d6483.zip |
http sync api
Diffstat (limited to 'lib/providermanager.js')
-rw-r--r-- | lib/providermanager.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/providermanager.js b/lib/providermanager.js index f79a9b087..83ea9417b 100644 --- a/lib/providermanager.js +++ b/lib/providermanager.js @@ -56,21 +56,17 @@ var ProviderManager = function() { }; /// sends outgoing requests, if provider is not available, enqueue the request -ProviderManager.prototype.send = function(data, cb) { +ProviderManager.prototype.send = function(data) { data._id = this.id; - if (cb) { - web3._callbacks[data._id] = cb; - } data.args = data.args || []; this.id++; - if(this.provider !== undefined) { - this.provider.send(data); - } else { - console.warn("provider is not set"); - this.queued.push(data); + if (this.provider === undefined) { + console.error("provider is not set"); } + + return this.provider.send(data); }; /// setups provider, which will be used for sending messages |