1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 08:09:15 +01:00
metamask-extension/app/scripts
Alex Donesky 02c0cbede9 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 20:24:40 -02:30
..
account-import-strategies Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
constants Add support for fiat on-ramp via Transak (#11376) 2021-06-25 08:10:24 -05:00
controllers Stop GasFeeController polling when pop closes (#11746) 2021-08-04 20:24:40 -02:30
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 use etherscan-link customBlockExplorer methods with customNetwork usage tracking (#11017) 2021-05-19 09:51:47 -05:00
background.js Stop GasFeeController polling when pop closes (#11746) 2021-08-04 20:24:40 -02:30
contentscript.js @metamask/post-message-stream@4.0.0 (#10989) 2021-05-05 16:07:48 -07:00
disable-console.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
first-time-state.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
inpage.js @metamask/providers@8.1.1 (#11078) 2021-05-12 19:51:14 -07:00
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 20:24:40 -02:30
metamask-controller.test.js add method to detect EIP 1559 support (#11369) 2021-06-25 11:24:00 -05:00
phishing-detect.js fix: replace dnode background with JSON-RPC (#10627) 2021-03-18 11:23:46 -07:00
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