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 25c808a1ac..bc172161f1 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/BottomSheetAddressDetailV2.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/BottomSheetAddressDetailV2.tsx @@ -105,10 +105,11 @@ export const BottomSheetAddressDetailV2 = ( const { getAddressUrl } = useDeFiScanContext(); const onActiveAddressPress = useCallback( - debounce(() => { + debounce((addressToCopy: string) => { if (showToast) { return; } + Clipboard.setString(addressToCopy); setShowToast(true); setTimeout(() => setShowToast(false), TOAST_DURATION); }, 500), @@ -117,7 +118,6 @@ export const BottomSheetAddressDetailV2 = ( useEffect(() => { if (showToast) { - Clipboard.setString(props.address); toast.show(translate("components/toaster", "Address copied"), { type: "wallet_toast", placement: "top", @@ -126,7 +126,7 @@ export const BottomSheetAddressDetailV2 = ( } else { toast.hideAll(); } - }, [showToast, props.address]); + }, [showToast]); // Getting addresses const fetchAddresses = async (): Promise => { @@ -349,6 +349,8 @@ export const BottomSheetAddressDetailV2 = ( const activeAddress = availableAddresses.find( ({ dvm }) => dvm === props.address, ); + const activeDomainAddress = + domain === DomainType.DVM ? activeAddress?.dvm : activeAddress?.evm; return ( )} onActiveAddressPress(activeDomainAddress ?? "")} />