diff --git a/src/screens/SignTransactionSheet.tsx b/src/screens/SignTransactionSheet.tsx index fb66164b754..ee8e15f7cdc 100644 --- a/src/screens/SignTransactionSheet.tsx +++ b/src/screens/SignTransactionSheet.tsx @@ -220,9 +220,13 @@ export const SignTransactionSheet = () => { null ); const formattedDappUrl = useMemo(() => { - const { hostname } = new URL(transactionDetails?.dappUrl); - return hostname; - }, [transactionDetails?.dappUrl]); + try { + const { hostname } = new URL(transactionDetails?.dappUrl); + return hostname; + } catch { + return transactionDetails?.dappUrl; + } + }, [transactionDetails]); const { gasLimit,