Better errors on gas estimation failure.
This commit is contained in:
parent
e6bab2e94f
commit
0e6b810def
@ -169,7 +169,13 @@ export abstract class Signer {
|
||||
});
|
||||
}
|
||||
|
||||
if (tx.gasLimit == null) { tx.gasLimit = this.estimateGas(tx); }
|
||||
if (tx.gasLimit == null) {
|
||||
tx.gasLimit = this.estimateGas(tx).catch((error) => {
|
||||
logger.throwError("unable to estimate gas; specify manually", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
||||
tx: tx
|
||||
});
|
||||
});
|
||||
}
|
||||
if (tx.chainId == null) { tx.chainId = this.getChainId(); }
|
||||
|
||||
return resolveProperties(tx);
|
||||
|
Loading…
Reference in New Issue
Block a user