Commit 77badc8c authored by obscuren's avatar obscuren

Updated to reflect the Filter changes in eth-go

parent e57989c0
...@@ -4,10 +4,10 @@ import ( ...@@ -4,10 +4,10 @@ import (
"fmt" "fmt"
"github.com/ethereum/eth-go" "github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethpipe" "github.com/ethereum/eth-go/ethpipe"
"github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ui"
"github.com/obscuren/otto" "github.com/obscuren/otto"
) )
...@@ -128,7 +128,7 @@ func (self *JSEthereum) toVal(v interface{}) otto.Value { ...@@ -128,7 +128,7 @@ func (self *JSEthereum) toVal(v interface{}) otto.Value {
} }
func (self *JSEthereum) Messages(object map[string]interface{}) otto.Value { func (self *JSEthereum) Messages(object map[string]interface{}) otto.Value {
filter := ethchain.NewFilterFromMap(object, self.ethereum) filter := ui.NewFilterFromMap(object, self.ethereum)
messages := filter.Find() messages := filter.Find()
var msgs []JSMessage var msgs []JSMessage
......
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"github.com/ethereum/eth-go/ethpipe" "github.com/ethereum/eth-go/ethpipe"
"github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/event" "github.com/ethereum/eth-go/event"
"github.com/ethereum/eth-go/ui/qt"
"github.com/ethereum/go-ethereum/javascript" "github.com/ethereum/go-ethereum/javascript"
"gopkg.in/qml.v1" "gopkg.in/qml.v1"
) )
...@@ -103,11 +104,11 @@ func (app *ExtApplication) mainLoop() { ...@@ -103,11 +104,11 @@ func (app *ExtApplication) mainLoop() {
} }
func (self *ExtApplication) Watch(filterOptions map[string]interface{}, identifier string) { func (self *ExtApplication) Watch(filterOptions map[string]interface{}, identifier string) {
self.filters[identifier] = ethchain.NewFilterFromMap(filterOptions, self.eth) self.filters[identifier] = qt.NewFilterFromMap(filterOptions, self.eth)
} }
func (self *ExtApplication) GetMessages(object map[string]interface{}) string { func (self *ExtApplication) GetMessages(object map[string]interface{}) string {
filter := ethchain.NewFilterFromMap(object, self.eth) filter := qt.NewFilterFromMap(object, self.eth)
messages := filter.Find() messages := filter.Find()
var msgs []javascript.JSMessage var msgs []javascript.JSMessage
......
...@@ -13,6 +13,7 @@ import ( ...@@ -13,6 +13,7 @@ import (
"github.com/ethereum/eth-go/ethpipe" "github.com/ethereum/eth-go/ethpipe"
"github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ui/qt"
"github.com/ethereum/go-ethereum/javascript" "github.com/ethereum/go-ethereum/javascript"
"gopkg.in/qml.v1" "gopkg.in/qml.v1"
) )
...@@ -194,7 +195,7 @@ func (self *UiLib) StartDebugger() { ...@@ -194,7 +195,7 @@ func (self *UiLib) StartDebugger() {
} }
func (self *UiLib) NewFilter(object map[string]interface{}) (id int) { func (self *UiLib) NewFilter(object map[string]interface{}) (id int) {
filter := ethchain.NewFilterFromMap(object, self.eth) filter := qt.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)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment