mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 03:28:07 +00:00
small filter improvement
This commit is contained in:
parent
d59b1cddfc
commit
d097821665
8
dist/web3-light.js
vendored
8
dist/web3-light.js
vendored
@ -2635,6 +2635,7 @@ var Filter = function (options, methods, formatter, callback) {
|
||||
});
|
||||
this.options = getOptions(options);
|
||||
this.implementation = implementation;
|
||||
this.filterId = null;
|
||||
this.callbacks = [];
|
||||
this.pollFilters = [];
|
||||
this.formatter = formatter;
|
||||
@ -2645,12 +2646,13 @@ var Filter = function (options, methods, formatter, callback) {
|
||||
});
|
||||
} else {
|
||||
self.filterId = id;
|
||||
// get filter logs at start
|
||||
|
||||
// get filter logs for the already existing watch calls
|
||||
self.callbacks.forEach(function(cb){
|
||||
getLogsAtStart(self, cb);
|
||||
});
|
||||
pollFilter(self);
|
||||
|
||||
if(self.callbacks.length > 0)
|
||||
pollFilter(self);
|
||||
|
||||
// start to watch immediately
|
||||
if(callback) {
|
||||
|
4
dist/web3-light.min.js
vendored
4
dist/web3-light.min.js
vendored
File diff suppressed because one or more lines are too long
8
dist/web3.js
vendored
8
dist/web3.js
vendored
@ -2635,6 +2635,7 @@ var Filter = function (options, methods, formatter, callback) {
|
||||
});
|
||||
this.options = getOptions(options);
|
||||
this.implementation = implementation;
|
||||
this.filterId = null;
|
||||
this.callbacks = [];
|
||||
this.pollFilters = [];
|
||||
this.formatter = formatter;
|
||||
@ -2645,12 +2646,13 @@ var Filter = function (options, methods, formatter, callback) {
|
||||
});
|
||||
} else {
|
||||
self.filterId = id;
|
||||
// get filter logs at start
|
||||
|
||||
// get filter logs for the already existing watch calls
|
||||
self.callbacks.forEach(function(cb){
|
||||
getLogsAtStart(self, cb);
|
||||
});
|
||||
pollFilter(self);
|
||||
|
||||
if(self.callbacks.length > 0)
|
||||
pollFilter(self);
|
||||
|
||||
// start to watch immediately
|
||||
if(callback) {
|
||||
|
87
dist/web3.js.map
vendored
87
dist/web3.js.map
vendored
File diff suppressed because one or more lines are too long
6
dist/web3.min.js
vendored
6
dist/web3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -135,6 +135,7 @@ var Filter = function (options, methods, formatter, callback) {
|
||||
});
|
||||
this.options = getOptions(options);
|
||||
this.implementation = implementation;
|
||||
this.filterId = null;
|
||||
this.callbacks = [];
|
||||
this.pollFilters = [];
|
||||
this.formatter = formatter;
|
||||
@ -145,12 +146,13 @@ var Filter = function (options, methods, formatter, callback) {
|
||||
});
|
||||
} else {
|
||||
self.filterId = id;
|
||||
// get filter logs at start
|
||||
|
||||
// get filter logs for the already existing watch calls
|
||||
self.callbacks.forEach(function(cb){
|
||||
getLogsAtStart(self, cb);
|
||||
});
|
||||
pollFilter(self);
|
||||
|
||||
if(self.callbacks.length > 0)
|
||||
pollFilter(self);
|
||||
|
||||
// start to watch immediately
|
||||
if(callback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user