From cea8943820d302daba11cf9637dd6762547a9a1e Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Mon, 13 May 2024 14:25:20 -0400 Subject: [PATCH] use origin as url (#5710) --- src/screens/WalletConnectApprovalSheet.js | 2 +- src/walletConnect/index.tsx | 2 +- src/walletConnect/sheets/AuthRequest.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screens/WalletConnectApprovalSheet.js b/src/screens/WalletConnectApprovalSheet.js index 439f60e0e34..5ee144e9dc1 100644 --- a/src/screens/WalletConnectApprovalSheet.js +++ b/src/screens/WalletConnectApprovalSheet.js @@ -186,7 +186,7 @@ export default function WalletConnectApprovalSheet() { const verifiedData = params?.verifiedData; const { data: metadata } = useDappMetadata({ - url: verifiedData?.verifyUrl || dappUrl, + url: verifiedData?.origin || dappUrl, }); const isScam = metadata?.status === DAppStatus.Scam; diff --git a/src/walletConnect/index.tsx b/src/walletConnect/index.tsx index beced29f676..ffe69e3e6f0 100644 --- a/src/walletConnect/index.tsx +++ b/src/walletConnect/index.tsx @@ -918,7 +918,7 @@ export async function onAuthRequest(event: Web3WalletTypes.AuthRequest) { // need to prefetch dapp metadata since portal is static const url = // @ts-ignore Web3WalletTypes.AuthRequest type is missing VerifyContext - event?.verifyContext?.verifyUrl || event.params.requester.metadata.url; + event?.verifyContext?.origin || event.params.requester.metadata.url; const metadata = await fetchDappMetadata({ url, status: true }); const isScam = metadata.status === DAppStatus.Scam; diff --git a/src/walletConnect/sheets/AuthRequest.tsx b/src/walletConnect/sheets/AuthRequest.tsx index d4b9310a43c..7c7eefb5936 100644 --- a/src/walletConnect/sheets/AuthRequest.tsx +++ b/src/walletConnect/sheets/AuthRequest.tsx @@ -80,7 +80,7 @@ export function AuthRequest({ const { icons, name, url } = requesterMeta; - const dappUrl = verifiedData?.verifyUrl || url; + const dappUrl = verifiedData?.origin || url; const { data: metadata } = useDappMetadata({ url: dappUrl }); const isScam = metadata?.status === DAppStatus.Scam;