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;
|
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 };
|
||||||
|
Loading…
Reference in New Issue
Block a user