-
-
Notifications
You must be signed in to change notification settings - Fork 268
Add metaswaps API and normalize all gas fee units to dec gwei #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add metaswaps API and normalize all gas fee units to dec gwei #507
Conversation
src/gas/GasFeeController.ts
Outdated
| } catch (error) { | ||
| try { | ||
| estimates = await this.fetchLegacyGasPriceEstimate(this.ethQuery); | ||
| estimates = await this.fetchEthGasPriceEstimate(this.ethQuery); | ||
| gasEstimateType = GAS_ESTIMATE_TYPES.ETH_GASPRICE; | ||
| } catch (error2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are not tracking error from fetchGasEstimates or fetchLegacyGasPriceEstimates we can just } catch { and rename error2 to error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8383700 to
f39df36
Compare
|
@wachunei rebased to remove the superfulous commit |
wachunei
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Breaking changes
fetchLegacyGasPriceEstimatehas been renamed tofetchEthGasPriceEstimatebecause eth_gasPrice is not legacy, it is just a fall back.fetchLegacyGasPriceEstimates(note plurality Estimates) is the method that will return metaswaps API estimates.Non Breaking Changes