core
core copied to clipboard
fix: use hardcoded Infura gas API urls
Explanation
legacyAPIEndpoint and EIP1559APIEndpoint options are the gas API urls used in GasFeeController.
This PR aims to remove those and put the new Infura URL as hardcoded.
New Infura API also expects an auth header on requests, hence this PR is adding new options infuraAPIKey and infuraAPIKeySecret to constructor.
References
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2254
Changelog
@metamask/gas-fee-controller
-
BREAKING: Removed the constructor options
legacyAPIEndpointandEIP1559APIEndpoint. These URLs are now hardcoded within the controller. -
BREAKING: The controller's constructor now requires
infuraAPIKeyandinfuraAPIKeySecretparameters. These are used to construct and send the Authorization header for Infura gas API requests.
Checklist
- [X] I've updated the test suite for new or updated code as appropriate
- [X] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
- [X] I've highlighted breaking changes using the "BREAKING" category above as appropriate