Populate from in estimateGas for determining gas limit.

This commit is contained in:
Richard Moore 2018-06-24 18:47:36 -04:00
parent 18aa885aef
commit 1d2fe8993b
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
5 changed files with 5 additions and 2 deletions

1
dist/ethers.js vendored
View File

@ -15181,6 +15181,7 @@ var Wallet = /** @class */ (function (_super) {
tx.to = this.provider.resolveName(tx.to);
}
if (tx.gasLimit == null) {
tx.from = this.getAddress();
tx.gasLimit = this.provider.estimateGas(tx);
}
if (tx.gasPrice == null) {

2
dist/ethers.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -104,6 +104,7 @@ export class Wallet extends Signer {
}
if (tx.gasLimit == null) {
tx.from = this.getAddress();
tx.gasLimit = this.provider.estimateGas(tx);
}

View File

@ -110,6 +110,7 @@ var Wallet = /** @class */ (function (_super) {
tx.to = this.provider.resolveName(tx.to);
}
if (tx.gasLimit == null) {
tx.from = this.getAddress();
tx.gasLimit = this.provider.estimateGas(tx);
}
if (tx.gasPrice == null) {