aboutsummaryrefslogtreecommitdiffstats
path: root/dist/ethereum.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/ethereum.js')
-rw-r--r--dist/ethereum.js31
1 files changed, 7 insertions, 24 deletions
diff --git a/dist/ethereum.js b/dist/ethereum.js
index fa4bcc591..4c36a7c71 100644
--- a/dist/ethereum.js
+++ b/dist/ethereum.js
@@ -1043,33 +1043,16 @@ var ProviderManager = function() {
var self = this;
var poll = function () {
- if (self.provider) {
- var pollsBatch = self.polls.map(function (data) {
- return data.data;
- });
-
- var payload = jsonrpc.toBatchPayload(pollsBatch);
- var results = self.provider.send(payload);
-
- self.polls.forEach(function (data, index) {
- var result = results[index];
-
- if (!jsonrpc.isValidResponse(result)) {
- console.log(result);
- return;
- }
-
- result = result.result;
- // dont call the callback if result is not an array, or empty one
- if (!(result instanceof Array) || result.length === 0) {
- return;
- }
+ self.polls.forEach(function (data) {
+ var result = self.send(data.data);
- data.callback(result);
+ if (!(result instanceof Array) || result.length === 0) {
+ return;
+ }
- });
+ data.callback(result);
+ });
- }
setTimeout(poll, 1000);
};
poll();