aboutsummaryrefslogtreecommitdiffstats
path: root/lib/providermanager.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/providermanager.js')
-rw-r--r--lib/providermanager.js14
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