aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-21 18:16:41 +0800
committerobscuren <geffobscura@gmail.com>2014-03-21 18:16:41 +0800
commit0db86e4485176aff7c45f0ce673174ec8407c0fc (patch)
tree747db9bfe82beb0d7d455b964d666da9162daac0 /ui
parent85e04476845a5a41836824b133d939faf4e1c3fa (diff)
downloadgo-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar
go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.gz
go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.bz2
go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.lz
go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.xz
go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.tar.zst
go-tangerine-0db86e4485176aff7c45f0ce673174ec8407c0fc.zip
Updated to work with the new chain
Diffstat (limited to 'ui')
-rw-r--r--ui/gui.go1
-rw-r--r--ui/library.go6
2 files changed, 4 insertions, 3 deletions
diff --git a/ui/gui.go b/ui/gui.go
index 5f0b6e52d..c8f4bedab 100644
--- a/ui/gui.go
+++ b/ui/gui.go
@@ -81,6 +81,7 @@ func (ui *Gui) Start() {
Init: func(p *Tx, obj qml.Object) { p.Value = ""; p.Hash = ""; p.Address = "" },
}})
+ ethutil.Config.SetClientString(fmt.Sprintf("/Ethereal v%s", "0.1"))
ethutil.Config.Log.Infoln("[GUI] Starting GUI")
// Create a new QML engine
ui.engine = qml.NewEngine()
diff --git a/ui/library.go b/ui/library.go
index 8dda0a89e..05fffd579 100644
--- a/ui/library.go
+++ b/ui/library.go
@@ -27,14 +27,14 @@ func (lib *EthLib) CreateTx(receiver, a, data string) string {
}
k, _ := ethutil.Config.Db.Get([]byte("KeyRing"))
- keyRing := ethutil.NewValueFromBytes(k)
+ keyPair := ethutil.NewKeyFromBytes(k)
amount := ethutil.Big(a)
code := ethchain.Compile(strings.Split(data, "\n"))
tx := ethchain.NewTransaction(hash, amount, code)
- tx.Nonce = lib.stateManager.GetAddrState(keyRing.Get(1).Bytes()).Nonce
+ tx.Nonce = lib.stateManager.GetAddrState(keyPair.Address()).Nonce
- tx.Sign(keyRing.Get(0).Bytes())
+ tx.Sign(keyPair.PrivateKey)
lib.txPool.QueueTransaction(tx)