1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 14:15:06 +01:00
metamask-extension/ui/hooks
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
..
useApproveTransaction.js
useCancelTransaction.js
useCancelTransaction.test.js
useCopyToClipboard.js
useCurrencyDisplay.js
useCurrencyDisplay.test.js
useCurrentAsset.js
useEqualityCheck.js
useEthFiatAmount.js
useGasFeeEstimates.js
useGasFeeEstimates.test.js
useGasFeeInputs.js Show advanced options, and hide radio buttons, for advanced gas settings users (#11751) 2021-08-04 20:24:40 -02:30
useGasFeeInputs.test.js
useI18nContext.js
useIncrementedGasFees.js
useMethodData.js
useMetricEvent.js
useOriginMetadata.js
usePrevious.js
useRetryTransaction.js
useRetryTransaction.test.js
useSafeGasEstimatePolling.js
useShouldAnimateGasEstimations.js
useShouldShowSpeedUp.js
useSwappedTokenValue.js
useTimeout.js
useTokenData.js
useTokenData.test.js
useTokenDisplayValue.js
useTokenDisplayValue.test.js
useTokenFiatAmount.js
useTokensToSearch.js
useTokenTracker.js
useTransactionDisplayData.js
useTransactionDisplayData.test.js
useUserPreferencedCurrency.js
useUserPreferencedCurrency.test.js