forked from cerc-io/laconicd-deprecated
fix doCall if args.From is nil (#518)
This commit is contained in:
parent
fe99e7e493
commit
0d545939d8
@ -517,11 +517,10 @@ func (e *PublicEthAPI) doCall(
|
||||
var addr common.Address
|
||||
|
||||
if args.From == nil {
|
||||
key, exist := checkKeyInKeyring(e.keys, *args.From)
|
||||
if exist {
|
||||
addr = common.BytesToAddress(key.PubKey().Address().Bytes())
|
||||
addrs, err := e.Accounts()
|
||||
if err == nil && len(addrs) > 0 {
|
||||
addr = addrs[0]
|
||||
}
|
||||
// No error handled here intentionally to match geth behaviour
|
||||
} else {
|
||||
addr = *args.From
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user