diff --git a/src/entries/popup/components/AppConnection/AppConnectionNudgeBanner.tsx b/src/entries/popup/components/AppConnection/AppConnectionNudgeBanner.tsx index 4354195eac..de6197ee29 100644 --- a/src/entries/popup/components/AppConnection/AppConnectionNudgeBanner.tsx +++ b/src/entries/popup/components/AppConnection/AppConnectionNudgeBanner.tsx @@ -105,7 +105,10 @@ export const AppConnectionNudgeBanner = ({ {i18n.t('app_connection_switcher.banner.connect_to', { - appName: dappMetadata?.appName || dappMetadata?.appHost, + appName: + dappMetadata?.appName || + dappMetadata?.appHost || + 'dApp', })} diff --git a/src/entries/popup/components/AppConnection/AppConnectionWatcher.tsx b/src/entries/popup/components/AppConnection/AppConnectionWatcher.tsx index 4632479677..8075da0daf 100644 --- a/src/entries/popup/components/AppConnection/AppConnectionWatcher.tsx +++ b/src/entries/popup/components/AppConnection/AppConnectionWatcher.tsx @@ -58,7 +58,7 @@ export const AppConnectionWatcher = () => { if (showNudgeSheet) setShowNudgeSheet(false); triggerToast({ title: i18n.t('app_connection_switcher.banner.app_connected', { - appName: dappMetadata?.appName || dappMetadata?.appHostName, + appName: dappMetadata?.appName || dappMetadata?.appHostName || 'dApp', }), description: chainsLabel[activeSession?.chainId || ChainId.mainnet], }); @@ -117,6 +117,9 @@ export const AppConnectionWatcher = () => { clearTimeout(timeoutRef.current); } + // Injection failed, or attempting to connect to `chrome://` url + if (url === '') return; + if ( nudgeSheetEnabled && !appHasInteractedWithNudgeSheet({ host: dappMetadata?.appHost }) @@ -139,6 +142,7 @@ export const AppConnectionWatcher = () => { handleBannerTimeout, nudgeSheetEnabled, setAppHasInteractedWithNudgeSheet, + url, ]); const hide = useCallback(() => {