diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-21 05:18:47 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-21 05:18:47 +0800 |
commit | 934570d12fae9c67ae18fc914577f02a51af3bca (patch) | |
tree | f2d30a259d529338f22aa647f27dc55c2cee3c43 /packages/instant/src/util/gas_price_estimator.ts | |
parent | 748e3c0c5358b99f15baf4bf95da027c9b83eb89 (diff) | |
download | dexon-sol-tools-934570d12fae9c67ae18fc914577f02a51af3bca.tar.gz 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.ts | 5 |
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) { |