Commit d4f9daa6 authored by Maran's avatar Maran

Refactor hex encode and remove coupling of popup to main window

parent 1eda1d25
...@@ -342,8 +342,6 @@ ApplicationWindow { ...@@ -342,8 +342,6 @@ ApplicationWindow {
property var block property var block
width: root.width width: root.width
height: 240 height: 240
x: root.x
y: root.y + root.height
Component{ Component{
id: blockDetailsDelegate id: blockDetailsDelegate
Rectangle { Rectangle {
...@@ -442,6 +440,7 @@ ApplicationWindow { ...@@ -442,6 +440,7 @@ ApplicationWindow {
text: "Contract" text: "Contract"
anchors.top: contractLabel.bottom anchors.top: contractLabel.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.bottom: popup.bottom
wrapMode: Text.Wrap wrapMode: Text.Wrap
width: parent.width - 30 width: parent.width - 30
height: 80 height: 80
......
...@@ -2,7 +2,6 @@ package ethui ...@@ -2,7 +2,6 @@ package ethui
import ( import (
"bitbucket.org/kardianos/osext" "bitbucket.org/kardianos/osext"
"encoding/hex"
"github.com/ethereum/eth-go" "github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethutil"
...@@ -94,7 +93,7 @@ func (self *UiLib) StartDbWithContractAndData(contractHash, data string) { ...@@ -94,7 +93,7 @@ func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
dbWindow := NewDebuggerWindow(self) dbWindow := NewDebuggerWindow(self)
object := self.eth.StateManager().CurrentState().GetStateObject(ethutil.FromHex(contractHash)) object := self.eth.StateManager().CurrentState().GetStateObject(ethutil.FromHex(contractHash))
if len(object.Script()) > 0 { if len(object.Script()) > 0 {
dbWindow.SetCode("0x" + hex.EncodeToString(object.Script())) dbWindow.SetCode("0x" + ethutil.Hex(object.Script()))
} }
dbWindow.SetData(data) dbWindow.SetData(data)
......
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