aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/filter.go')
-rw-r--r--ui/qt/filter.go19
1 files changed, 8 insertions, 11 deletions
diff --git a/ui/qt/filter.go b/ui/qt/filter.go
index 423d5bd43..bd3ad0303 100644
--- a/ui/qt/filter.go
+++ b/ui/qt/filter.go
@@ -3,30 +3,27 @@ package qt
import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/ui"
- "gopkg.in/qml.v1"
+ "github.com/obscuren/qml"
)
func NewFilterFromMap(object map[string]interface{}, eth core.EthManager) *core.Filter {
filter := ui.NewFilterFromMap(object, eth)
- if object["altered"] != nil {
- filter.Altered = makeAltered(object["altered"])
+ if object["topics"] != nil {
+ filter.SetTopics(makeTopics(object["topics"]))
}
return filter
}
-func makeAltered(v interface{}) (d []core.AccountChange) {
+func makeTopics(v interface{}) (d [][]byte) {
if qList, ok := v.(*qml.List); ok {
- var s []interface{}
+ var s []string
qList.Convert(&s)
- d = makeAltered(s)
- } else if qMap, ok := v.(*qml.Map); ok {
- var m map[string]interface{}
- qMap.Convert(&m)
-
- d = makeAltered(m)
+ d = ui.MakeTopics(s)
+ } else if str, ok := v.(string); ok {
+ d = ui.MakeTopics(str)
}
return