Refactor hex encode and remove coupling of popup to main window

This commit is contained in:
Maran
2014-05-28 16:14:24 +02:00
parent 1eda1d25b0
commit d4f9daa631
2 changed files with 2 additions and 4 deletions

View File

@ -2,7 +2,6 @@ package ethui
import (
"bitbucket.org/kardianos/osext"
"encoding/hex"
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
@ -94,7 +93,7 @@ func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
dbWindow := NewDebuggerWindow(self)
object := self.eth.StateManager().CurrentState().GetStateObject(ethutil.FromHex(contractHash))
if len(object.Script()) > 0 {
dbWindow.SetCode("0x" + hex.EncodeToString(object.Script()))
dbWindow.SetCode("0x" + ethutil.Hex(object.Script()))
}
dbWindow.SetData(data)