diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-16 23:46:29 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-16 23:46:29 +0800 |
commit | 5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb (patch) | |
tree | d5ba6197a8c0c8e36bb92ee9fc8aad717cb2d178 /cmd/mist/gui.go | |
parent | 8393dab470c40678caf36ada82e312d29c4cf5c4 (diff) | |
parent | 22893b7ac925c49168c119f293ea8befc3aff5cc (diff) | |
download | dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.gz dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.tar.zst dexon-5e7702fd050ed5520a03cc2cfc8b1f45a70f35fb.zip |
Merge remote-tracking branch 'upstream/develop' into frontier/js
Conflicts:
cmd/ethereum/js.go
javascript/types.go
Diffstat (limited to 'cmd/mist/gui.go')
-rw-r--r-- | cmd/mist/gui.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index e50dfad14..19ad09454 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -35,7 +35,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/ui/qt/qwhisper" "github.com/ethereum/go-ethereum/xeth" @@ -91,7 +91,7 @@ func NewWindow(ethereum *eth.Ethereum) *Gui { plugins: make(map[string]plugin), serviceEvents: make(chan ServEv, 1), } - data, _ := ethutil.ReadAllFile(path.Join(ethereum.DataDir, "plugins.json")) + data, _ := common.ReadAllFile(path.Join(ethereum.DataDir, "plugins.json")) json.Unmarshal([]byte(data), &gui.plugins) return gui @@ -198,7 +198,7 @@ func (gui *Gui) loadAddressBook() { it := nameReg.Trie().Iterator() for it.Next() { if it.Key[0] != 0 { - view.Call("addAddress", struct{ Name, Address string }{string(it.Key), ethutil.Bytes2Hex(it.Value)}) + view.Call("addAddress", struct{ Name, Address string }{string(it.Key), common.Bytes2Hex(it.Value)}) } } @@ -219,7 +219,7 @@ func (self *Gui) loadMergedMiningOptions() { Checked bool Name, Address string Id, ItemId int - }{false, string(it.Key), ethutil.Bytes2Hex(it.Value), 0, i}) + }{false, string(it.Key), common.Bytes2Hex(it.Value), 0, i}) i++ @@ -238,8 +238,8 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { var ( ptx = xeth.NewTx(tx) - send = ethutil.Bytes2Hex(tx.From()) - rec = ethutil.Bytes2Hex(tx.To()) + send = common.Bytes2Hex(tx.From()) + rec = common.Bytes2Hex(tx.To()) ) ptx.Sender = send ptx.Address = rec @@ -263,7 +263,7 @@ func (gui *Gui) readPreviousTransactions() { } func (gui *Gui) processBlock(block *types.Block, initial bool) { - name := ethutil.Bytes2Hex(block.Coinbase()) + name := common.Bytes2Hex(block.Coinbase()) b := xeth.NewBlock(block) b.Name = name @@ -277,10 +277,10 @@ func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) { if unconfirmedFunds.Cmp(big.NewInt(0)) < 0 { pos = "-" } - val := ethutil.CurrencyToString(new(big.Int).Abs(ethutil.BigCopy(unconfirmedFunds))) - str = fmt.Sprintf("%v (%s %v)", ethutil.CurrencyToString(amount), pos, val) + val := common.CurrencyToString(new(big.Int).Abs(common.BigCopy(unconfirmedFunds))) + str = fmt.Sprintf("%v (%s %v)", common.CurrencyToString(amount), pos, val) } else { - str = fmt.Sprintf("%v", ethutil.CurrencyToString(amount)) + str = fmt.Sprintf("%v", common.CurrencyToString(amount)) } gui.win.Root().Call("setWalletValue", str) |