Renamed chain
=> core
This commit is contained in:
12
ui/filter.go
12
ui/filter.go
@ -1,12 +1,12 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/chain"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
)
|
||||
|
||||
func NewFilterFromMap(object map[string]interface{}, eth chain.EthManager) *chain.Filter {
|
||||
filter := chain.NewFilter(eth)
|
||||
func NewFilterFromMap(object map[string]interface{}, eth core.EthManager) *core.Filter {
|
||||
filter := core.NewFilter(eth)
|
||||
|
||||
if object["earliest"] != nil {
|
||||
val := ethutil.NewValue(object["earliest"])
|
||||
@ -46,7 +46,7 @@ func NewFilterFromMap(object map[string]interface{}, eth chain.EthManager) *chai
|
||||
}
|
||||
|
||||
// Conversion methodn
|
||||
func mapToAccountChange(m map[string]interface{}) (d chain.AccountChange) {
|
||||
func mapToAccountChange(m map[string]interface{}) (d core.AccountChange) {
|
||||
if str, ok := m["id"].(string); ok {
|
||||
d.Address = ethutil.Hex2Bytes(str)
|
||||
}
|
||||
@ -60,9 +60,9 @@ func mapToAccountChange(m map[string]interface{}) (d chain.AccountChange) {
|
||||
|
||||
// data can come in in the following formats:
|
||||
// ["aabbccdd", {id: "ccddee", at: "11223344"}], "aabbcc", {id: "ccddee", at: "1122"}
|
||||
func makeAltered(v interface{}) (d []chain.AccountChange) {
|
||||
func makeAltered(v interface{}) (d []core.AccountChange) {
|
||||
if str, ok := v.(string); ok {
|
||||
d = append(d, chain.AccountChange{ethutil.Hex2Bytes(str), nil})
|
||||
d = append(d, core.AccountChange{ethutil.Hex2Bytes(str), nil})
|
||||
} else if obj, ok := v.(map[string]interface{}); ok {
|
||||
d = append(d, mapToAccountChange(obj))
|
||||
} else if slice, ok := v.([]interface{}); ok {
|
||||
|
Reference in New Issue
Block a user