Skip to content

Fix #10081 - Use fetchWithCache to retrieve and store basic gas estimates#10098

Closed
darkwing wants to merge 1 commit intoMetaMask:developfrom
darkwing:10081-gas-fetch-cache
Closed

Fix #10081 - Use fetchWithCache to retrieve and store basic gas estimates#10098
darkwing wants to merge 1 commit intoMetaMask:developfrom
darkwing:10081-gas-fetch-cache

Conversation

@darkwing
Copy link
Copy Markdown
Contributor

@darkwing darkwing commented Dec 17, 2020

Fixes: #10081

Explanation: It appears we're currently fetching basic gas estimates and storing the result along with last fetched time, and then doing expiration validation, when fetchWithCache can do all of this for us.

Currently a WIP. Fighting with proxyquire to ensure storage can be stub'd in ui/app/helpers/utils/fetch-with-cache.js

@darkwing darkwing requested a review from a team as a code owner December 17, 2020 14:24
@darkwing darkwing requested a review from rekmarks December 17, 2020 14:24
@darkwing darkwing marked this pull request as draft December 17, 2020 14:24
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@darkwing darkwing force-pushed the 10081-gas-fetch-cache branch 4 times, most recently from 20865fa to 561e7cd Compare December 18, 2020 19:18
@darkwing darkwing marked this pull request as ready for review December 18, 2020 19:23
@darkwing darkwing force-pushed the 10081-gas-fetch-cache branch from 561e7cd to 4895e6c Compare December 18, 2020 19:47
@darkwing darkwing requested review from danjm and removed request for rekmarks January 6, 2021 20:50
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Looks pretty close to ready after a rebase.

}
}

export function resetCustomGasState() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to ask why this was removed as well, but I think I see now. It's dead code.

@darkwing
Copy link
Copy Markdown
Contributor Author

darkwing commented Feb 5, 2021

Superceded by #10384

@darkwing darkwing closed this Feb 5, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use fetchWithCache for retrieving basic gas estimates

2 participants