diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-19 07:02:55 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-19 07:02:55 +0800 |
commit | 22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b (patch) | |
tree | a64a8336516fd28de2c019e8c787c90950267331 /cmd/mist/gui.go | |
parent | 0dc566124aee24cf3f01b4e586bde7752da89824 (diff) | |
parent | a7f4ade7114ee962110cb7c140e7ce7bd3f6664f (diff) | |
download | dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.tar dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.tar.gz dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.tar.bz2 dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.tar.lz dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.tar.xz dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.tar.zst dexon-22d29a6d52ade3ebcd4ecb341e3f5eafddb8e17b.zip |
merge
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 0339f601e..3ab307174 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -309,13 +309,13 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { var ( ptx = xeth.NewJSTx(tx, pipe.World().State()) - send = nameReg.Storage(tx.Sender()) - rec = nameReg.Storage(tx.Recipient) + send = nameReg.Storage(tx.From()) + rec = nameReg.Storage(tx.To()) s, r string ) - if tx.CreatesContract() { - rec = nameReg.Storage(tx.CreationAddress(pipe.World().State())) + if core.MessageCreatesContract(tx) { + rec = nameReg.Storage(core.AddressFromMessage(tx)) } if send.Len() != 0 { @@ -326,10 +326,10 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { if rec.Len() != 0 { r = strings.Trim(rec.Str(), "\x00") } else { - if tx.CreatesContract() { - r = ethutil.Bytes2Hex(tx.CreationAddress(pipe.World().State())) + if core.MessageCreatesContract(tx) { + r = ethutil.Bytes2Hex(core.AddressFromMessage(tx)) } else { - r = ethutil.Bytes2Hex(tx.Recipient) + r = ethutil.Bytes2Hex(tx.To()) } } ptx.Sender = s @@ -454,11 +454,11 @@ func (gui *Gui) update() { object := state.GetAccount(gui.address()) if bytes.Compare(tx.Sender(), gui.address()) == 0 { - object.SubAmount(tx.Value) + object.SubAmount(tx.Value()) gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - } else if bytes.Compare(tx.Recipient, gui.address()) == 0 { - object.AddAmount(tx.Value) + } else if bytes.Compare(tx.To(), gui.address()) == 0 { + object.AddAmount(tx.Value()) gui.txDb.Put(tx.Hash(), tx.RlpEncode()) } |