diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts index 7ffb6f05504..7430bf38974 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts @@ -20,13 +20,13 @@ export const useCoinmarketModalCrypto = ({ receiveCurrency }: CoinmarketModalCry }, [receiveCurrency, dispatch]); // after unmount set off CryptoSymbol for modals - useEffect( - () => () => { + // eslint-disable-next-line arrow-body-style + useEffect(() => { + return () => { dispatch({ type: SET_MODAL_CRYPTO_CURRENCY, modalCryptoId: undefined, }); - }, - [dispatch], - ); + }; + }, [dispatch]); }; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx index 5df282fc641..3dfa4468738 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx @@ -476,14 +476,14 @@ export const useCoinmarketBuyForm = ({ ], ); - useEffect( - () => () => { + // eslint-disable-next-line arrow-body-style + useEffect(() => { + return () => { if (abortControllerRef.current) { abortControllerRef.current.abort(); } - }, - [], - ); + }; + }, []); return { type, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts index a2d295bf380..4d141276564 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts @@ -670,14 +670,14 @@ export const useCoinmarketExchangeForm = ({ handleChange, ]); - useEffect( - () => () => { + // eslint-disable-next-line arrow-body-style + useEffect(() => { + return () => { if (abortControllerRef.current) { abortControllerRef.current.abort(); } - }, - [], - ); + }; + }, []); // handle edge case when there are no longer quotes of selected exchange type useEffect(() => { diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts index b2dcde943cc..6bf0c27cc32 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts @@ -647,14 +647,14 @@ export const useCoinmarketSellForm = ({ handleChange, ]); - useEffect( - () => () => { + // eslint-disable-next-line arrow-body-style + useEffect(() => { + return () => { if (abortControllerRef.current) { abortControllerRef.current.abort(); } - }, - [], - ); + }; + }, []); return { type, diff --git a/suite-native/module-authorize-device/src/components/connect/ConnectDeviceScreenHeader.tsx b/suite-native/module-authorize-device/src/components/connect/ConnectDeviceScreenHeader.tsx index 2ef3b17b998..e326a0f6dcf 100644 --- a/suite-native/module-authorize-device/src/components/connect/ConnectDeviceScreenHeader.tsx +++ b/suite-native/module-authorize-device/src/components/connect/ConnectDeviceScreenHeader.tsx @@ -104,12 +104,12 @@ export const ConnectDeviceScreenHeader = ({ }, [handleCancel]); // Hide alert when navigating away from the PIN entry screen (PIN entered or canceled on device) - useEffect( - () => () => { + // eslint-disable-next-line arrow-body-style + useEffect(() => { + return () => { hideAlert(); - }, - [hideAlert], - ); + }; + }, [hideAlert]); return (