1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Alex Donesky d359429f04
Stop GasFeeController polling when pop closes (#11746)
* Stop GasFeeController polling when pop closes

* Stop estimate gas polling on window unload

* lint + comments

* Improve client closed logic

* lint

* Add back _beforeUnload on unmount in gas-modal-page-container

* Add full check and call onClientClosed method for notifcation environment

* Add gas pollingToken tracking to appStateController and use to disconnect polling for each environment type

* remove unused method

* move controller manipulation logic from background.js to metamask-controller, disaggregate methods

* add beforeunload handling to reset gas polling tokens from root of send page

* cleanup, lint and address feedback

* clear appState gasPollingTokens when all instances of all env types are closed, fix pollingTokenType arg from onEnvironmentTypeClosed call in metamask-controller

* mock new methods to fix tests

* final bit of cleanup + comments

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-08-04 16:53:13 -05:00
..
account-import-strategies
constants
controllers Stop GasFeeController polling when pop closes (#11746) 2021-08-04 16:53:13 -05:00
lib Add Skylink support to ENS resolver (#11401) 2021-07-16 10:22:04 -05:00
migrations Use ESM imports in migrations index. (#11443) 2021-07-13 17:11:53 -05:00
platforms
background.js Stop GasFeeController polling when pop closes (#11746) 2021-08-04 16:53:13 -05:00
contentscript.js
disable-console.js
first-time-state.js
inpage.js
lockdown-run.js Build - refactor for bundle factoring and swappable runtime (#11080) 2021-07-15 10:59:34 -07:00
metamask-controller.js Stop GasFeeController polling when pop closes (#11746) 2021-08-04 16:53:13 -05:00
metamask-controller.test.js
phishing-detect.js
sentry-install.js Build - refactor for bundle factoring and swappable runtime (#11080) 2021-07-15 10:59:34 -07:00
ui.js Build - refactor for bundle factoring and swappable runtime (#11080) 2021-07-15 10:59:34 -07:00