From af7ce2ccf785f383fa66402df1018995a42a0d57 Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Fri, 14 Jan 2022 17:23:27 +0800 Subject: [PATCH 1/7] chore: wallet connecting tip --- packages/mask/shared-ui/locales/en-US.json | 5 +- packages/mask/shared-ui/locales/qya-AA.json | 4 +- packages/mask/shared-ui/locales/zh-CN.json | 4 +- packages/mask/shared-ui/locales/zh-TW.json | 4 +- .../ConnectionProgress.tsx | 59 +++++++++++++++++-- .../SNSAdaptor/ConnectWalletDialog/index.tsx | 2 +- packages/mask/src/resources/FlashIcon.tsx | 34 +++++++++++ packages/theme/src/constants.ts | 2 +- packages/theme/src/index.ts | 1 + packages/web3-shared/evm/pipes/index.ts | 28 +++++++++ 10 files changed, 128 insertions(+), 15 deletions(-) create mode 100644 packages/mask/src/resources/FlashIcon.tsx diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index 654fd07ae8f5..44940d8c2f78 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -259,8 +259,9 @@ "plugin_wallet_snackbar_swap_token": "Swap Token", "plugin_wallet_guiding_step_1": "1. Choose Network", "plugin_wallet_guiding_step_2": "2. Choose Wallet", - "plugin_wallet_connect_to": "Connect to", - "plugin_wallet_connected_to": "Connected to", + "plugin_wallet_connect_with": "Connect with", + "plugin_wallet_connected_with": "Connected with", + "plugin_wallet_connect_tip": "Please make sure that your {{providerName}} wallet is provided by the offical {{providerShortenLink}}.", "plugin_wallet_collections": "Collections", "plugin_wallet_select_a_token": "Select a Token", "plugin_wallet_select_a_nft_contract": "Select an NFT Contract", diff --git a/packages/mask/shared-ui/locales/qya-AA.json b/packages/mask/shared-ui/locales/qya-AA.json index e3859d09d86d..03eaeec6d6e9 100644 --- a/packages/mask/shared-ui/locales/qya-AA.json +++ b/packages/mask/shared-ui/locales/qya-AA.json @@ -259,8 +259,8 @@ "plugin_wallet_snackbar_swap_token": "crwdns10641:0crwdne10641:0", "plugin_wallet_guiding_step_1": "crwdns10197:0crwdne10197:0", "plugin_wallet_guiding_step_2": "crwdns10199:0crwdne10199:0", - "plugin_wallet_connect_to": "crwdns10201:0crwdne10201:0", - "plugin_wallet_connected_to": "crwdns10203:0crwdne10203:0", + "plugin_wallet_connect_with": "crwdns10201:0crwdne10201:0", + "plugin_wallet_connected_with": "crwdns10203:0crwdne10203:0", "plugin_wallet_collections": "crwdns8141:0crwdne8141:0", "plugin_wallet_select_a_token": "crwdns4589:0crwdne4589:0", "plugin_wallet_select_a_nft_contract": "crwdns7923:0crwdne7923:0", diff --git a/packages/mask/shared-ui/locales/zh-CN.json b/packages/mask/shared-ui/locales/zh-CN.json index 9721aa728801..d7709fd14d79 100644 --- a/packages/mask/shared-ui/locales/zh-CN.json +++ b/packages/mask/shared-ui/locales/zh-CN.json @@ -252,8 +252,8 @@ "plugin_wallet_snackbar_swap_token": "兑换代币", "plugin_wallet_guiding_step_1": "1. 选择网络", "plugin_wallet_guiding_step_2": "2. 选择钱包", - "plugin_wallet_connect_to": "连接到", - "plugin_wallet_connected_to": "已连接到", + "plugin_wallet_connect_with": "连接到", + "plugin_wallet_connected_with": "已连接到", "plugin_wallet_collections": "收藏品", "plugin_wallet_select_a_token": "选择代币", "plugin_wallet_select_a_nft_contract": "选择 NFT 合约", diff --git a/packages/mask/shared-ui/locales/zh-TW.json b/packages/mask/shared-ui/locales/zh-TW.json index fea4dc44b50b..f17decd03cb4 100644 --- a/packages/mask/shared-ui/locales/zh-TW.json +++ b/packages/mask/shared-ui/locales/zh-TW.json @@ -196,8 +196,8 @@ "plugin_powered_by": "提供者為 ", "plugin_wallet_guiding_step_1": "1. 選擇網路", "plugin_wallet_guiding_step_2": "2. 選擇錢包", - "plugin_wallet_connect_to": "連接", - "plugin_wallet_connected_to": "連接到", + "plugin_wallet_connect_with": "連接", + "plugin_wallet_connected_with": "連接到", "plugin_wallet_collections": "收藏", "plugin_wallet_select_a_token": "選擇一個代幣", "plugin_wallet_select_a_nft_contract": "選擇一份NFT合約", diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx index e4cea0b41888..dc93d3d768fc 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx @@ -1,11 +1,18 @@ import type { AsyncStateRetry } from 'react-use/lib/useAsyncRetry' -import { Box, Card, CircularProgress, Typography, Paper } from '@mui/material' -import { useStylesExtends, makeStyles } from '@masknet/theme' +import { Box, Card, CircularProgress, Typography, Paper, Link } from '@mui/material' +import { useStylesExtends, makeStyles, MaskColorVar } from '@masknet/theme' import { ImageIcon } from '@masknet/shared' import { NetworkPluginID, useProviderDescriptor } from '@masknet/plugin-infra' -import { ProviderType, resolveProviderName } from '@masknet/web3-shared-evm' +import { + ProviderType, + resolveProviderName, + resolveProviderShortenLink, + resolveProviderHomeLink, +} from '@masknet/web3-shared-evm' import ActionButton from '../../../../extension/options-page/DashboardComponents/ActionButton' import { useI18N } from '../../../../utils' +import { FlashIcon } from '../../../../resources/FlashIcon' +import { Trans } from 'react-i18next' const useStyles = makeStyles()((theme) => ({ content: { @@ -13,6 +20,24 @@ const useStyles = makeStyles()((theme) => ({ borderRadius: 8, backgroundColor: theme.palette.background.default, }, + tipContent: { + display: 'flex', + flexWrap: 'nowrap', + alignItems: 'center', + marginTop: 10, + backgroundColor: MaskColorVar.errorBackground, + padding: theme.spacing(2, 0, 2, 1.5), + borderRadius: 8, + }, + tipContentText: { + color: MaskColorVar.redMain, + fontSize: 12, + marginLeft: 10, + }, + tipLink: { + color: MaskColorVar.redMain, + textDecoration: 'underline', + }, error: { fontSize: 12, paddingTop: theme.spacing(0.5), @@ -42,11 +67,11 @@ export function ConnectionProgress(props: ConnectionProgressProps) { {connected ? ( - {t('plugin_wallet_connected_to')} {resolveProviderName(providerType)} + {t('plugin_wallet_connected_with')} {resolveProviderName(providerType)} ) : ( - {t('plugin_wallet_connect_to')} {resolveProviderName(providerType)} + {t('plugin_wallet_connect_with')} {resolveProviderName(providerType)} )} {loading ? ( @@ -68,6 +93,30 @@ export function ConnectionProgress(props: ConnectionProgressProps) { ) : null} + + + + + ) : ( + + ), + }} + values={{ + providerName: resolveProviderName(providerType), + providerShortenLink: resolveProviderShortenLink(providerType), + }} + /> + + ) } diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx index bdea5d7062fa..97a21a9cdec1 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx @@ -21,7 +21,7 @@ import Services from '../../../../extension/service' const useStyles = makeStyles()((theme) => ({ content: { - padding: theme.spacing(5), + padding: theme.spacing(2.5), }, })) diff --git a/packages/mask/src/resources/FlashIcon.tsx b/packages/mask/src/resources/FlashIcon.tsx new file mode 100644 index 000000000000..5aa2c75a23b4 --- /dev/null +++ b/packages/mask/src/resources/FlashIcon.tsx @@ -0,0 +1,34 @@ +import { MaskColorVar, makeStyles, MaskCSSVariableColor } from '@masknet/theme' + +interface StyleProps { + color: MaskCSSVariableColor +} +const useStyles = makeStyles()((theme, props) => ({ + iconWrapper: { + width: 20, + height: 20, + borderRadius: 999, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + backgroundColor: props.color.alpha(0.2), + }, +})) + +export const FlashSvg = ({ color = MaskColorVar.redMain }) => ( + + + +) + +export function FlashIcon({ color = MaskColorVar.redMain }) { + const { classes } = useStyles({ color }) + return ( +
+ +
+ ) +} diff --git a/packages/theme/src/constants.ts b/packages/theme/src/constants.ts index afc869842d65..0d485b8f1377 100644 --- a/packages/theme/src/constants.ts +++ b/packages/theme/src/constants.ts @@ -187,7 +187,7 @@ function getRGBFragment(x: Record, key: string) { return [r, g, b].join(', ') } -type MaskCSSVariableColor = string & { +export type MaskCSSVariableColor = string & { /** Append alpha channel to the original color */ alpha(alpha: number): string } & ((defaultValue?: string) => string) diff --git a/packages/theme/src/index.ts b/packages/theme/src/index.ts index aa1b87e84ae0..4da24ce03a08 100644 --- a/packages/theme/src/index.ts +++ b/packages/theme/src/index.ts @@ -44,6 +44,7 @@ export * from './hooks' export * from './ShadowRoot' export * from './UIHelper/custom-ui-helper' export { getMaskColor, useMaskColor, MaskColorVar, applyMaskColorVars } from './constants' +export type { MaskCSSVariableColor } from './constants' const query = '(prefers-color-scheme: dark)' export function useSystemPreferencePalette(): PaletteMode { diff --git a/packages/web3-shared/evm/pipes/index.ts b/packages/web3-shared/evm/pipes/index.ts index df0cf4bd4e6a..26ccc53bb0bc 100644 --- a/packages/web3-shared/evm/pipes/index.ts +++ b/packages/web3-shared/evm/pipes/index.ts @@ -26,6 +26,34 @@ export const resolveProviderName = createLookupTableResolver( + { + [ProviderType.MaskWallet]: 'Mask.io', + [ProviderType.MetaMask]: 'Metamask.io', + [ProviderType.WalletConnect]: 'Walletconnect.com', + [ProviderType.CustomNetwork]: 'Website', + [ProviderType.Coin98]: 'Coin98.com', + [ProviderType.WalletLink]: 'Walletlink.org', + [ProviderType.MathWallet]: 'Mathwallet.org', + [ProviderType.Fortmatic]: 'Fortmatic.com', + }, + 'website', +) + +export const resolveProviderHomeLink = createLookupTableResolver( + { + [ProviderType.MaskWallet]: 'https://mask.io', + [ProviderType.MetaMask]: 'https://metamask.io', + [ProviderType.WalletConnect]: 'https://walletconnect.com', + [ProviderType.CustomNetwork]: '', + [ProviderType.Coin98]: 'https://coin98.com', + [ProviderType.WalletLink]: 'https://walletlink.org', + [ProviderType.MathWallet]: 'https://mathwallet.org', + [ProviderType.Fortmatic]: 'https://fortmatic.com', + }, + '', +) + export const resolveProviderDownloadLink = createLookupTableResolver( { [ProviderType.MaskWallet]: 'https://mask.io/download-links', From 0a3ff8d8496685be1d240005ce34b093bf27c602 Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Fri, 14 Jan 2022 17:35:03 +0800 Subject: [PATCH 2/7] chore: enable bsc nft rp --- .../src/plugins/RedPacket/SNSAdaptor/RedPacketCreateNew.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketCreateNew.tsx b/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketCreateNew.tsx index 9ae1a5d02ea4..d79032bd5129 100644 --- a/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketCreateNew.tsx +++ b/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketCreateNew.tsx @@ -83,7 +83,7 @@ export function RedPacketCreateNew(props: RedPacketFormProps & { state: readonly ), children: , sx: { p: 0 }, - disabled: ![ChainId.Mainnet, ChainId.Matic].includes(chainId), + disabled: ![ChainId.Mainnet, ChainId.Matic, ChainId.BSC].includes(chainId), }, ], state, From 40b34b340d89aecbf587f983d4c376831114d78c Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Fri, 14 Jan 2022 18:09:06 +0800 Subject: [PATCH 3/7] chore: supportedChainIds from plugin define --- .../src/plugins/ITO/SNSAdaptor/ClaimAllDialog.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/mask/src/plugins/ITO/SNSAdaptor/ClaimAllDialog.tsx b/packages/mask/src/plugins/ITO/SNSAdaptor/ClaimAllDialog.tsx index e148690d4cc0..afc99fd8a036 100644 --- a/packages/mask/src/plugins/ITO/SNSAdaptor/ClaimAllDialog.tsx +++ b/packages/mask/src/plugins/ITO/SNSAdaptor/ClaimAllDialog.tsx @@ -1,3 +1,4 @@ +import { NetworkPluginID } from '@masknet/plugin-infra' import { useCallback, useEffect, useState, useLayoutEffect, useRef } from 'react' import { flatten, uniq } from 'lodash-unified' import formatDateTime from 'date-fns/format' @@ -27,6 +28,7 @@ import { useClaimCallback } from './hooks/useClaimCallback' import ActionButton from '../../../extension/options-page/DashboardComponents/ActionButton' import { EthereumWalletConnectedBoundary } from '../../../web3/UI/EthereumWalletConnectedBoundary' import { EthereumChainBoundary } from '../../../web3/UI/EthereumChainBoundary' +import { base as ITO_Definition } from '../base' interface StyleProps { shortITOwrapper: boolean @@ -213,14 +215,7 @@ interface ClaimAllDialogProps { open: boolean } -const SUPPORTED_CHAIN_ID_LIST = [ - ChainId.Mainnet, - ChainId.BSC, - ChainId.Matic, - ChainId.Arbitrum, - ChainId.xDai, - ChainId.Fantom, -] +const SUPPORTED_CHAIN_ID_LIST = ITO_Definition.enableRequirement.web3?.[NetworkPluginID.PLUGIN_EVM]?.supportedChainIds! export function ClaimAllDialog(props: ClaimAllDialogProps) { const { t } = useI18N() From 9506e7136bcba46716d52f037b113977b0cce088 Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Mon, 17 Jan 2022 14:14:09 +0800 Subject: [PATCH 4/7] chore: error tip --- packages/mask/shared-ui/locales/en-US.json | 1 + packages/mask/src/components/shared/WalletStatusBox.tsx | 1 - .../ConnectWalletDialog/ConnectionProgress.tsx | 9 ++++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index 44940d8c2f78..3e8cc85170f3 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -261,6 +261,7 @@ "plugin_wallet_guiding_step_2": "2. Choose Wallet", "plugin_wallet_connect_with": "Connect with", "plugin_wallet_connected_with": "Connected with", + "plugin_wallet_metamask_error_already_request": "You've opened the popup, please confirm.", "plugin_wallet_connect_tip": "Please make sure that your {{providerName}} wallet is provided by the offical {{providerShortenLink}}.", "plugin_wallet_collections": "Collections", "plugin_wallet_select_a_token": "Select a Token", diff --git a/packages/mask/src/components/shared/WalletStatusBox.tsx b/packages/mask/src/components/shared/WalletStatusBox.tsx index 509c157cb9ad..28af85ab05c4 100644 --- a/packages/mask/src/components/shared/WalletStatusBox.tsx +++ b/packages/mask/src/components/shared/WalletStatusBox.tsx @@ -73,7 +73,6 @@ const useStyles = makeStyles<{ isDashboard: boolean }>()((theme, { isDashboard } border: `1px solid ${theme.palette.background.default}`, }, twitterProviderBorder: { - border: `1px solid ${theme.palette.background.default}`, width: 14, height: 14, }, diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx index dc93d3d768fc..bbbbfc2b5a4c 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx @@ -82,7 +82,14 @@ export function ConnectionProgress(props: ConnectionProgressProps) { ) : null} {!loading && error ? ( - {error.message || `Failed to connect to ${resolveProviderName(providerType)}.`} + {error.message + ? error.message.includes('Already processing eth_requestAccounts') || + error.message.includes( + "Request of type 'wallet_requestPermissions' already pending for origin", + ) + ? t('plugin_wallet_metamask_error_already_request') + : error.message + : `Failed to connect to ${resolveProviderName(providerType)}.`} ) : null} From 4c68f78d50fb1da4d85467289b75e517d6ce3ae9 Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Mon, 17 Jan 2022 14:17:11 +0800 Subject: [PATCH 5/7] chore: error tip --- .../ConnectWalletDialog/ConnectionProgress.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx index bbbbfc2b5a4c..e33f1a310bb5 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx @@ -82,13 +82,11 @@ export function ConnectionProgress(props: ConnectionProgressProps) { ) : null} {!loading && error ? ( - {error.message - ? error.message.includes('Already processing eth_requestAccounts') || - error.message.includes( - "Request of type 'wallet_requestPermissions' already pending for origin", - ) - ? t('plugin_wallet_metamask_error_already_request') - : error.message + {error.message?.includes('Already processing eth_requestAccounts') || + error.message?.includes( + "Request of type 'wallet_requestPermissions' already pending for origin", + ) + ? t('plugin_wallet_metamask_error_already_request') : `Failed to connect to ${resolveProviderName(providerType)}.`} ) : null} From 3d5666cdb41a2b84ae3261849e636e8dc80c3602 Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Mon, 17 Jan 2022 14:24:10 +0800 Subject: [PATCH 6/7] chore: error text --- packages/mask/shared-ui/locales/en-US.json | 1 + .../SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index 3e8cc85170f3..293eed62d3d5 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -260,6 +260,7 @@ "plugin_wallet_guiding_step_1": "1. Choose Network", "plugin_wallet_guiding_step_2": "2. Choose Wallet", "plugin_wallet_connect_with": "Connect with", + "plugin_wallet_connect_with_retry": "Try again", "plugin_wallet_connected_with": "Connected with", "plugin_wallet_metamask_error_already_request": "You've opened the popup, please confirm.", "plugin_wallet_connect_tip": "Please make sure that your {{providerName}} wallet is provided by the offical {{providerShortenLink}}.", diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx index e33f1a310bb5..8a0e704c9414 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx @@ -93,7 +93,7 @@ export function ConnectionProgress(props: ConnectionProgressProps) { {!connected && error ? ( - {t('retry')} + {t('plugin_wallet_connect_with_retry')} ) : null} From 386b84fdf9828e7c082535e70c59d540b006a00f Mon Sep 17 00:00:00 2001 From: zhouhanseng Date: Mon, 17 Jan 2022 16:26:03 +0800 Subject: [PATCH 7/7] chore: text --- packages/mask/shared-ui/locales/en-US.json | 2 +- .../SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json index 293eed62d3d5..230b25baab7d 100644 --- a/packages/mask/shared-ui/locales/en-US.json +++ b/packages/mask/shared-ui/locales/en-US.json @@ -260,7 +260,7 @@ "plugin_wallet_guiding_step_1": "1. Choose Network", "plugin_wallet_guiding_step_2": "2. Choose Wallet", "plugin_wallet_connect_with": "Connect with", - "plugin_wallet_connect_with_retry": "Try again", + "plugin_wallet_connect_with_retry": "Try Again", "plugin_wallet_connected_with": "Connected with", "plugin_wallet_metamask_error_already_request": "You've opened the popup, please confirm.", "plugin_wallet_connect_tip": "Please make sure that your {{providerName}} wallet is provided by the offical {{providerShortenLink}}.", diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx index 8a0e704c9414..226f051aaf51 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/ConnectionProgress.tsx @@ -87,7 +87,7 @@ export function ConnectionProgress(props: ConnectionProgressProps) { "Request of type 'wallet_requestPermissions' already pending for origin", ) ? t('plugin_wallet_metamask_error_already_request') - : `Failed to connect to ${resolveProviderName(providerType)}.`} + : 'Error connecting.'} ) : null}