|
|
@ -193,21 +193,21 @@ func (self *UiLib) StartDebugger() { |
|
|
|
dbWindow.Show() |
|
|
|
dbWindow.Show() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (self *UiLib) NewFilter(object map[string]interface{}) int { |
|
|
|
func (self *UiLib) NewFilter(object map[string]interface{}) (id int) { |
|
|
|
filter, id := self.eth.InstallFilter(object) |
|
|
|
filter := ethchain.NewFilterFromMap(object, self.eth) |
|
|
|
filter.MessageCallback = func(messages ethstate.Messages) { |
|
|
|
filter.MessageCallback = func(messages ethstate.Messages) { |
|
|
|
self.win.Root().Call("invokeFilterCallback", ethpipe.ToJSMessages(messages), id) |
|
|
|
self.win.Root().Call("invokeFilterCallback", ethpipe.ToJSMessages(messages), id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
id = self.eth.InstallFilter(filter) |
|
|
|
return id |
|
|
|
return id |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (self *UiLib) NewFilterString(typ string) int { |
|
|
|
func (self *UiLib) NewFilterString(typ string) (id int) { |
|
|
|
filter, id := self.eth.InstallFilter(nil) |
|
|
|
filter := ethchain.NewFilter(self.eth) |
|
|
|
filter.BlockCallback = func(block *ethchain.Block) { |
|
|
|
filter.BlockCallback = func(block *ethchain.Block) { |
|
|
|
self.win.Root().Call("invokeFilterCallback", "{}", id) |
|
|
|
self.win.Root().Call("invokeFilterCallback", "{}", id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
id = self.eth.InstallFilter(filter) |
|
|
|
return id |
|
|
|
return id |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|