diff options
Diffstat (limited to 'common/registrar/ethreg/api.go')
-rw-r--r-- | common/registrar/ethreg/api.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/registrar/ethreg/api.go b/common/registrar/ethreg/api.go index d035616f2..6d77a9385 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,8 +254,7 @@ func (be *registryAPIBackend) Transact(fromStr, toStr, nonceStr, valueStr, gasSt tx = types.NewTransaction(nonce, to, value, gas, price, data) } - acc := accounts.Account{from} - signature, err := be.am.Sign(acc, tx.SigHash().Bytes()) + signature, err := be.am.Sign(from, tx.SigHash().Bytes()) if err != nil { return "", err } |