Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
changes to make whisper working
  • Loading branch information
debris committed Oct 29, 2014
commit cb607b4911711501a8e70db0fe2148c51272c719
2 changes: 1 addition & 1 deletion httprpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
var self = this;
this.sendRequest(payload, function (request) {
var parsed = JSON.parse(request.responseText);
if (!parsed.result) {
if (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result) {
return;
}
self.handlers.forEach(function (handler) {
Expand Down
12 changes: 8 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
}).then(function (request) {
return new Promise(function (resolve, reject) {
web3.provider.send(request, function (result) {
if (result) {
if (result || typeof result === "boolean") {
resolve(result);
} else {
reject(result);
}
return;
}
reject(result);
});
});
}).catch(function( err) {
Expand Down Expand Up @@ -373,6 +373,10 @@
});
};

Filter.prototype.arrived = function(callback) {
this.changed(callback);
}

Filter.prototype.changed = function(callback) {
var self = this;
this.promise.then(function(id) {
Expand Down