diff --git a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx index 6b9d7ed544..f1a168083e 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/ConvertConfirmationScreen.tsx @@ -239,7 +239,7 @@ export function ConvertConfirmationScreen({ route }: Props): JSX.Element { fee, }), suffix: ` ${sourceToken.displayTextSymbol}${ - convertDirection === ConvertDirection.dvmToEvm ? "" : "-EVM" + convertDirection !== ConvertDirection.evmToDvm ? "" : "-EVM" }`, testID: "resulting_tokens_value", themedProps: { 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 d78d3b90b4..704ff20105 100644 --- a/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx +++ b/mobile-app/app/screens/AppNavigator/screens/Portfolio/screens/SendScreen.tsx @@ -44,6 +44,10 @@ import { useSafeAreaInsets } from "react-native-safe-area-context"; import { AddressRow } from "@screens/AppNavigator/screens/Portfolio/components/AddressRow"; import { useDomainContext } from "@contexts/DomainContext"; import { ConvertDirection } from "@screens/enum"; +import { + AddressType as AddressCategory, + getAddressType as getAddressCategory, +} from "@waveshq/walletkit-core"; import { useTokenPrice } from "../hooks/TokenPrice"; import { ActiveUSDValueV2 } from "../../Loans/VaultDetail/components/ActiveUSDValueV2"; import { PortfolioParamList } from "../PortfolioNavigator"; @@ -139,6 +143,9 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { let infoText; let themedProps; let status = TransactionCardStatus.Default; + const isEvmAddress = + getAddressCategory(getValues("address"), networkName) === + AddressCategory.ETH; if (new BigNumber(amountToSend).isGreaterThan(token?.amount ?? 0)) { infoText = "Insufficient balance"; @@ -147,6 +154,17 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { light: tailwind("text-red-v2"), }; status = TransactionCardStatus.Error; + } else if ( + isEvmAddress && + (token?.isDAT === false || token?.isLPS === true) + ) { + infoText = + "Transferring non-DAT tokens or LP tokens to an EVM address is not supported"; + themedProps = { + dark: tailwind("text-red-v2"), + light: tailwind("text-red-v2"), + }; + status = TransactionCardStatus.Error; } else if ( token?.isLPS === true && new BigNumber(amountToSend).isGreaterThan(0) @@ -179,7 +197,7 @@ export function SendScreen({ route, navigation }: Props): JSX.Element { style: tailwind("text-xs mt-2 ml-5 font-normal-v2"), }, }; - }, [token, isReservedUtxoUsed, amountToSend]); + }, [token, isReservedUtxoUsed, amountToSend, address]); useEffect(() => { setToken(route.params.token);