diff options
Diffstat (limited to 'ui/library.go')
-rw-r--r-- | ui/library.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |