File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
- var Filter = function ( eth , options ) {
1
+ var Filter = function ( options ) {
2
2
this . callbacks = { } ;
3
3
this . seed = Math . floor ( Math . random ( ) * 1000000 ) ;
4
- this . eth = eth ;
4
+ this . options = options ;
5
5
6
6
eth . registerFilter ( options , this . seed ) ;
7
7
} ;
8
8
9
9
Filter . prototype . changed = function ( callback ) {
10
10
var cbseed = Math . floor ( Math . random ( ) * 1000000 ) ;
11
- this . eth . registerFilterCallback ( this . seed , cbseed ) ;
11
+ eth . registerFilterCallback ( this . seed , cbseed ) ;
12
12
13
13
var self = this ;
14
14
message . connect ( function ( messages , seed , callbackSeed ) {
@@ -21,3 +21,7 @@ Filter.prototype.changed = function(callback) {
21
21
Filter . prototype . uninstall = function ( ) {
22
22
eth . uninstallFilter ( this . seed )
23
23
}
24
+
25
+ Filter . prototype . messages = function ( ) {
26
+ return JSON . parse ( eth . messages ( this . options ) )
27
+ }
You can’t perform that action at this time.
0 commit comments