Fix estimate gas if from is not provided. (#6714)

This commit is contained in:
Tomasz Drwięga 2017-10-11 21:05:38 +02:00 committed by Gav Wood
parent df19b8df69
commit 34c65f60ef

View File

@ -81,12 +81,11 @@ export function getTxOptions (api, func, _options, values = []) {
options.to = options.to || func.contract.address; options.to = options.to || func.contract.address;
} }
if (!address) { const promise = (!address)
return Promise.resolve({ func, options, values }); ? Promise.resolve(false)
} : WalletsUtils.isWallet(api, address);
return WalletsUtils return promise
.isWallet(api, address)
.then((isWallet) => { .then((isWallet) => {
if (!isWallet) { if (!isWallet) {
return { func, options, values }; return { func, options, values };