diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx index fbe213250f..4d30594853 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/components/AddressRow.tsx @@ -68,7 +68,7 @@ export function AddressRow({ setAddressLabel?: React.Dispatch>; }): JSX.Element { const { fetchWalletAddresses } = useWalletAddress(); - const { domain } = useDomainContext(); + const { domain, isEvmFeatureEnabled } = useDomainContext(); const defaultValue = ""; @@ -134,6 +134,7 @@ export function AddressRow({ if (onlyLocalAddress) { setAddressType(undefined); } else if ( + isEvmFeatureEnabled && getAddressType(address, networkName) === JellyfishAddressType.ETH ) { // Unsaved and valid EVM address @@ -267,14 +268,27 @@ export function AddressRow({ rules={{ required: true, validate: { - isValidAddress: (address) => - // Check if its either a valid EVM/DVM address && - !!getAddressType(address, networkName) && - // EVM -> EVM domain transfer is not allowed - !( - getAddressType(address, networkName) === - JellyfishAddressType.ETH && domain === DomainType.EVM - ), + isValidAddress: (address) => { + const addressType = getAddressType(address, networkName); + + // Check if address is EVM and feature flag is enabled + if ( + !isEvmFeatureEnabled && + addressType === JellyfishAddressType.ETH + ) { + return false; + } + + return ( + // Check if its either a valid EVM/DVM address && + !!addressType && + // EVM -> EVM domain transfer is not allowed + !( + addressType === JellyfishAddressType.ETH && + domain === DomainType.EVM + ) + ); + }, }, }} /> diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx index f0b2546d53..656365e1d7 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx @@ -517,7 +517,8 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { !formState.isValid || hasPendingJob || hasPendingBroadcastJob || - token === undefined + token === undefined || + (isEvmAddress && !isEvmFeatureEnabled) } label={translate("screens/SendScreen", "Continue")} onSubmit={onSubmit}