diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-29 01:35:49 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-29 01:36:23 +0800 |
commit | 872b2497114209119becf2e8a4d4a5818e2084ee (patch) | |
tree | fa20b37eca386628f4b3bb54e248704d5b742b6f /cmd/mist/ui_lib.go | |
parent | 1146f25015b6d84072b71c490aba246e3010bd87 (diff) | |
download | go-tangerine-872b2497114209119becf2e8a4d4a5818e2084ee.tar.gz go-tangerine-872b2497114209119becf2e8a4d4a5818e2084ee.tar.zst go-tangerine-872b2497114209119becf2e8a4d4a5818e2084ee.zip |
further cleaned up xeth interface
Diffstat (limited to 'cmd/mist/ui_lib.go')
-rw-r--r-- | cmd/mist/ui_lib.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index ca3884a82..0bffc4cd1 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -44,7 +44,7 @@ type memAddr struct { // UI Library that has some basic functionality exposed type UiLib struct { - *xeth.JSXEth + *xeth.XEth engine *qml.Engine eth *eth.Ethereum connected bool @@ -63,7 +63,7 @@ type UiLib struct { } func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib { - lib := &UiLib{JSXEth: xeth.NewJSXEth(eth), engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(eth), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)} + lib := &UiLib{XEth: xeth.New(eth), engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(eth), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)} lib.miner = miner.New(eth.KeyManager().Address(), eth) lib.filterManager = filter.NewFilterManager(eth.EventMux()) go lib.filterManager.Start() @@ -180,7 +180,7 @@ func (self *UiLib) StartDebugger() { func (self *UiLib) Transact(params map[string]interface{}) (string, error) { object := mapToTxParams(params) - return self.JSXEth.Transact( + return self.XEth.Transact( object["from"], object["to"], object["value"], @@ -202,7 +202,7 @@ func (self *UiLib) Compile(code string) (string, error) { func (self *UiLib) Call(params map[string]interface{}) (string, error) { object := mapToTxParams(params) - return self.JSXEth.Execute( + return self.XEth.Execute( object["to"], object["value"], object["gas"], @@ -261,7 +261,7 @@ func (self *UiLib) ToAscii(data string) string { func (self *UiLib) NewFilter(object map[string]interface{}, view *qml.Common) (id int) { filter := qt.NewFilterFromMap(object, self.eth) filter.MessageCallback = func(messages state.Messages) { - view.Call("messages", xeth.ToJSMessages(messages), id) + view.Call("messages", xeth.ToMessages(messages), id) } id = self.filterManager.InstallFilter(filter) return id @@ -279,7 +279,7 @@ func (self *UiLib) NewFilterString(typ string, view *qml.Common) (id int) { func (self *UiLib) Messages(id int) *ethutil.List { filter := self.filterManager.GetFilter(id) if filter != nil { - messages := xeth.ToJSMessages(filter.Find()) + messages := xeth.ToMessages(filter.Find()) return messages } |