aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/registrar/ethreg/api.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/registrar/ethreg/api.go b/common/registrar/ethreg/api.go
index d035616f2..4bffe69c5 100644
--- a/common/registrar/ethreg/api.go
+++ b/common/registrar/ethreg/api.go
@@ -158,8 +158,8 @@ func (be *registryAPIBackend) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr
var from *state.StateObject
if len(fromStr) == 0 {
- accounts, err := be.am.Accounts()
- if err != nil || len(accounts) == 0 {
+ accounts := be.am.Accounts()
+ if len(accounts) == 0 {
from = statedb.GetOrNewStateObject(common.Address{})
} else {
from = statedb.GetOrNewStateObject(accounts[0].Address)
@@ -254,7 +254,7 @@ func (be *registryAPIBackend) Transact(fromStr, toStr, nonceStr, valueStr, gasSt
tx = types.NewTransaction(nonce, to, value, gas, price, data)
}
- acc := accounts.Account{from}
+ acc := accounts.Account{Address: from}
signature, err := be.am.Sign(acc, tx.SigHash().Bytes())
if err != nil {
return "", err