aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/gas_price_estimator.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-21 05:18:47 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-21 05:18:47 +0800
commit934570d12fae9c67ae18fc914577f02a51af3bca (patch)
treef2d30a259d529338f22aa647f27dc55c2cee3c43 /packages/instant/src/util/gas_price_estimator.ts
parent748e3c0c5358b99f15baf4bf95da027c9b83eb89 (diff)
downloaddexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar
dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar.gz
dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar.bz2
dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar.lz
dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar.xz
dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar.zst
dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.zip
Explicit error reporting
Diffstat (limited to 'packages/instant/src/util/gas_price_estimator.ts')
-rw-r--r--packages/instant/src/util/gas_price_estimator.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/instant/src/util/gas_price_estimator.ts b/packages/instant/src/util/gas_price_estimator.ts
index 6b15809a3..332c8d00a 100644
--- a/packages/instant/src/util/gas_price_estimator.ts
+++ b/packages/instant/src/util/gas_price_estimator.ts
@@ -7,6 +7,8 @@ import {
GWEI_IN_WEI,
} from '../constants';
+import { errorReporter } from './error_reporter';
+
interface EthGasStationResult {
average: number;
fastestWait: number;
@@ -42,8 +44,9 @@ export class GasPriceEstimator {
let fetchedAmount: GasInfo | undefined;
try {
fetchedAmount = await fetchFastAmountInWeiAsync();
- } catch {
+ } catch (e) {
fetchedAmount = undefined;
+ errorReporter.report(e);
}
if (fetchedAmount) {