Fix estimate gas if from is not provided. (#6714)
This commit is contained in:
parent
df19b8df69
commit
34c65f60ef
@ -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 };
|
||||
|
Loading…
Reference in New Issue
Block a user