Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix estimate gas if from is not provided. (#6714)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored and gavofyork committed Oct 11, 2017
1 parent df19b8d commit 34c65f6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/src/util/tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 34c65f6

Please sign in to comment.