Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend GasFeeController to poll for network status
When a user is about to send a transaction or is looking at a swap quote, we would like to inform them if the network is busy so that we can push them to use a lower fee setting. GasFeeController already provides a way to poll for fee estimates, which we employ on transaction preview screens. This commit updates the polling code so that we also gauge network status as we pull estimates. This is done by hitting another endpoint in the MetaSwap API which specifically gives us a base fee threshold we can use to determine whether the network is busy (falling back to using `eth_feeHistory` if the API is not available).
- Loading branch information
Showing
10 changed files
with
486 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.