changes to make whisper working

pull/272/merge
Marek Kotewicz 10 years ago
parent 31c6159019
commit cb607b4911
  1. 2
      httprpc.js
  2. 10
      main.js

@ -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) {

@ -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) {
@ -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) {

Loading…
Cancel
Save