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;
}
if (!address) {
return Promise.resolve({ func, options, values });
}
const promise = (!address)
? Promise.resolve(false)
: WalletsUtils.isWallet(api, address);
return WalletsUtils
.isWallet(api, address)
return promise
.then((isWallet) => {
if (!isWallet) {
return { func, options, values };