From ce2118a62bf9f398d4c97a000eb9b87b0d4fa2e2 Mon Sep 17 00:00:00 2001 From: chloe <44501120+chloezxyy@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:18:25 +0800 Subject: [PATCH] remove eslint-disable-next-line react-hooks/exhaustive-deps --- .../Portfolio/components/BottomSheetAddressDetailV2.tsx | 6 ------ .../screens/Portfolio/screens/AddressBookScreen.tsx | 8 -------- 2 files changed, 14 deletions(-) diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/BottomSheetAddressDetailV2.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/BottomSheetAddressDetailV2.tsx index 4b2f01a1ac..1249d3f88b 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/BottomSheetAddressDetailV2.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/BottomSheetAddressDetailV2.tsx @@ -104,7 +104,6 @@ export const BottomSheetAddressDetailV2 = ( const activeLabel = useAddressLabel(props.address); const { getAddressUrl } = useDeFiScanContext(); - // eslint-disable-next-line react-hooks/exhaustive-deps const onActiveAddressPress = useCallback( debounce(() => { if (showToast) { @@ -145,12 +144,10 @@ export const BottomSheetAddressDetailV2 = ( useEffect(() => { fetchAddresses().catch(logger.error); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [wallet, addressLength]); useEffect(() => { isNextAddressUsable().catch(logger.error); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [blockCount]); const CreateAddressButton = useCallback(() => { @@ -176,7 +173,6 @@ export const BottomSheetAddressDetailV2 = ( ); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [canCreateAddress, addressLength]); const onChangeAddress = async (index: number): Promise => { @@ -335,7 +331,6 @@ export const BottomSheetAddressDetailV2 = ( ); }, - // eslint-disable-next-line react-hooks/exhaustive-deps [labeledAddresses, domain], ); @@ -381,7 +376,6 @@ export const BottomSheetAddressDetailV2 = ( ); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [props, addressLength, activeLabel, domain, availableAddresses]); return ( diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx index 5d1788758f..bf19e0f036 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/AddressBookScreen.tsx @@ -162,12 +162,10 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { return () => { isSubscribed = false; }; - // eslint-disable-next-line react-hooks/exhaustive-deps }, [wallet, addressLength, walletAddressFromStore]); // Search const [searchString, setSearchString] = useState(""); - // eslint-disable-next-line react-hooks/exhaustive-deps const filterAddress = useCallback( debounce((searchString: string): void => { setFilteredAddressBook( @@ -241,7 +239,6 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { useEffect(() => { fetchAddresses().catch(logger.error); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { @@ -255,7 +252,6 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { ); }; updateLocalStorage().catch(Logging.error); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [userPreferencesFromStore]); useEffect(() => { @@ -269,7 +265,6 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { } else { setFilteredWalletAddress(walletAddress); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [ addressBook, walletAddress, @@ -286,7 +281,6 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { { shadowOpacity: 0 }, ], }); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const WhitelistedAddressItem = useCallback( @@ -423,7 +417,6 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { ); }, - // eslint-disable-next-line react-hooks/exhaustive-deps [filteredAddressBook, filteredWalletAddress, activeButtonGroup], ); @@ -524,7 +517,6 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element { ); }, - // eslint-disable-next-line react-hooks/exhaustive-deps [filteredAddressBook, filteredWalletAddress, activeButtonGroup], );