good morning!!!!

Skip to content
Snippets Groups Projects
Commit cb607b49 authored by Marek Kotewicz's avatar Marek Kotewicz
Browse files

changes to make whisper working

parent 31c61590
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
var self = this; var self = this;
this.sendRequest(payload, function (request) { this.sendRequest(payload, function (request) {
var parsed = JSON.parse(request.responseText); var parsed = JSON.parse(request.responseText);
if (!parsed.result) { if (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result) {
return; return;
} }
self.handlers.forEach(function (handler) { self.handlers.forEach(function (handler) {
......
...@@ -131,11 +131,11 @@ ...@@ -131,11 +131,11 @@
}).then(function (request) { }).then(function (request) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
web3.provider.send(request, function (result) { web3.provider.send(request, function (result) {
if (result) { if (result || typeof result === "boolean") {
resolve(result); resolve(result);
} else { return;
reject(result);
} }
reject(result);
}); });
}); });
}).catch(function( err) { }).catch(function( err) {
...@@ -373,6 +373,10 @@ ...@@ -373,6 +373,10 @@
}); });
}; };
Filter.prototype.arrived = function(callback) {
this.changed(callback);
}
Filter.prototype.changed = function(callback) { Filter.prototype.changed = function(callback) {
var self = this; var self = this;
this.promise.then(function(id) { this.promise.then(function(id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment