Skip to content
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

Fix resetPolling functionality #546

Merged
merged 6 commits into from
Jul 28, 2021
Merged

Fix resetPolling functionality #546

merged 6 commits into from
Jul 28, 2021

Conversation

rickycodes
Copy link
Member

@rickycodes rickycodes commented Jul 28, 2021

This PR addresses the problem of the resetPolling being called on every network controller state change, so more frequent than necessary. We now check by chainId if the network changed and we don't update the network controller properties if they are the same.

@rickycodes rickycodes requested a review from a team as a code owner July 28, 2021 19:01
@rickycodes rickycodes changed the title use this.getGasFeeEstimatesAndStartPolling Fix resetPolling functionality Jul 28, 2021
@rickycodes rickycodes changed the title Fix resetPolling functionality Fix resetPolling functionality Jul 28, 2021
@rickycodes rickycodes merged commit 9aeae42 into main Jul 28, 2021
@rickycodes rickycodes deleted the bugfix/resetPolling branch July 28, 2021 20:38
@rickycodes rickycodes mentioned this pull request Jul 28, 2021
rickycodes added a commit that referenced this pull request Aug 3, 2021
…to dynamic-speed-up

* 'dynamic-speed-up' of github.com:MetaMask/controllers:
  Bump @metamask/auto-changelog from 2.4.0 to 2.5.0 (#549)
  Update Changelog (#548)
  14.0.2 (#547)
  Fix `resetPolling` functionality (#546)
  TokenService improvements (#541)
  Release/14.0.1 (#545)
  Make gweiDecToWEIBN util resilient against params with too many decimals (#544)
  Bump @metamask/contract-metadata from 1.27.0 to 1.28.0 (#540)
  14.0.0 (#539)
  Bug: Mainnet NFT Autodetect API  (#536)
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* use this.getGasFeeEstimatesAndStartPolling

* Only call resetPolling if ChainId has actually changed

* Again, only update if isEIP1559Compatible has changed

* Also update this.currentChainId

* use getChainId()

* Use this.getChainId()

Co-authored-by: Andre Pimenta <andrepimenta7@gmail.com>
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* use this.getGasFeeEstimatesAndStartPolling

* Only call resetPolling if ChainId has actually changed

* Again, only update if isEIP1559Compatible has changed

* Also update this.currentChainId

* use getChainId()

* Use this.getChainId()

Co-authored-by: Andre Pimenta <andrepimenta7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants