From eac6458482d6a2d1ee60705685c8dc9a129a22eb Mon Sep 17 00:00:00 2001 From: shonsirsha Date: Sun, 19 Nov 2023 18:39:13 +0100 Subject: [PATCH] frontend: changed WC supported chains to only ETH & ETH goerli --- .../src/components/icon/assets/arbitrum.svg | 38 ------------------- .../web/src/components/icon/assets/bsc.svg | 20 ---------- .../web/src/components/icon/assets/fantom.svg | 1 - .../src/components/icon/assets/optimism.svg | 21 ---------- .../src/components/icon/assets/polygon.svg | 16 -------- frontends/web/src/components/icon/icon.tsx | 10 ----- .../incoming-pairing/incoming-pairing.tsx | 2 +- frontends/web/src/utils/walletconnect.ts | 22 +---------- 8 files changed, 2 insertions(+), 128 deletions(-) delete mode 100644 frontends/web/src/components/icon/assets/arbitrum.svg delete mode 100644 frontends/web/src/components/icon/assets/bsc.svg delete mode 100644 frontends/web/src/components/icon/assets/fantom.svg delete mode 100644 frontends/web/src/components/icon/assets/optimism.svg delete mode 100644 frontends/web/src/components/icon/assets/polygon.svg diff --git a/frontends/web/src/components/icon/assets/arbitrum.svg b/frontends/web/src/components/icon/assets/arbitrum.svg deleted file mode 100644 index 33bbc8ed5e..0000000000 --- a/frontends/web/src/components/icon/assets/arbitrum.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontends/web/src/components/icon/assets/bsc.svg b/frontends/web/src/components/icon/assets/bsc.svg deleted file mode 100644 index f39dba1be1..0000000000 --- a/frontends/web/src/components/icon/assets/bsc.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - diff --git a/frontends/web/src/components/icon/assets/fantom.svg b/frontends/web/src/components/icon/assets/fantom.svg deleted file mode 100644 index e501d1efe1..0000000000 --- a/frontends/web/src/components/icon/assets/fantom.svg +++ /dev/null @@ -1 +0,0 @@ -fa \ No newline at end of file diff --git a/frontends/web/src/components/icon/assets/optimism.svg b/frontends/web/src/components/icon/assets/optimism.svg deleted file mode 100644 index 098392b7f6..0000000000 --- a/frontends/web/src/components/icon/assets/optimism.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/frontends/web/src/components/icon/assets/polygon.svg b/frontends/web/src/components/icon/assets/polygon.svg deleted file mode 100644 index a5bb6124fc..0000000000 --- a/frontends/web/src/components/icon/assets/polygon.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/frontends/web/src/components/icon/icon.tsx b/frontends/web/src/components/icon/icon.tsx index 067fb82902..3840e1a074 100644 --- a/frontends/web/src/components/icon/icon.tsx +++ b/frontends/web/src/components/icon/icon.tsx @@ -19,7 +19,6 @@ import alert from './assets/icons/alert-triangle.svg'; import BB02StylizedDark from '../../assets/device/bitbox02-stylized-reflection-dark.png'; import BB02StylizedLight from '../../assets/device/bitbox02-stylized-reflection-light.png'; import info from './assets/icons/info.svg'; -import arbitrumSVG from './assets//arbitrum.svg'; import arrowDownSVG from './assets/icons/arrow-down-active.svg'; import arrowCircleLeftSVG from './assets/icons/arrow-circle-left.svg'; import arrowCircleLeftActiveSVG from './assets/icons/arrow-circle-left-active.svg'; @@ -28,7 +27,6 @@ import arrowCircleRightActiveSVG from './assets/icons/arrow-circle-right-active. import bankDarkSVG from './assets/icons/bank.svg'; import bankLightSVG from './assets/icons/bank-light.svg'; import buyInfoSVG from './assets/icons/buy-info.svg'; -import bscSVG from './assets//bsc.svg'; import checkedSmallSVG from './assets/icons/checked-small.svg'; import checkSVG from './assets/icons/check.svg'; import chevronRightDark from './assets/icons/chevron-right-dark.svg'; @@ -39,7 +37,6 @@ import creditCardLightSVG from './assets/icons/credit-card-light.svg'; import editSVG from './assets/icons/edit.svg'; import editLightSVG from './assets/icons/edit-light.svg'; import ethColorSVG from './assets//eth-color.svg'; -import fantomSVG from './assets//fantom.svg'; import redDotSVG from './assets/icons/red-dot.svg'; import copySVG from './assets/icons/copy.svg'; import closeSVG from './assets/icons/close.svg'; @@ -53,8 +50,6 @@ import globeLightSVG from './assets/icons/globe-light.svg'; import guideSVG from './assets/icons/guide.svg'; import menuDarkSVG from './assets/icons/menu-dark.svg'; import menuLightSVG from './assets/icons/menu-light.svg'; -import optimismSVG from './assets//optimism.svg'; -import polygonSVG from './assets//polygon.svg'; import walletConnectDarkSVG from './assets/icons/wallet-connect-dark.svg'; import walletConnectLightSVG from './assets/icons/wallet-connect-light.svg'; import walletConnectDefaultSVG from './assets/icons/wallet-connect-default.svg'; @@ -136,7 +131,6 @@ type ImgProps = JSX.IntrinsicElements['img']; export const Info = (props: ImgProps) => (); export const BitBox02StylizedDark = (props: ImgProps) => (); export const BitBox02StylizedLight = (props: ImgProps) => (); -export const ArbitrumLogo = (props: ImgProps) => (); export const ArrowDown = (props: ImgProps) => (); export const ArrowCirlceLeft = (props: ImgProps) => (); export const ArrowCirlceLeftActive = (props: ImgProps) => (); @@ -144,7 +138,6 @@ export const ArrowCirlceRight = (props: ImgProps) => ( (); export const BankDark = (props: ImgProps) => (); export const Bank = (props: ImgProps) => (); -export const BSCLogo = (props: ImgProps) => (); export const BuyInfo = (props: ImgProps) => (); // check icon on a green circle export const Checked = (props: ImgProps) => (); @@ -164,7 +157,6 @@ export const Edit = (props: ImgProps) => ( (); export const ETHLogo = (props: ImgProps) => (); export const ExternalLink = (props: ImgProps) => (); -export const FantomLogo = (props: ImgProps) => (); export const EyeClosed = (props: ImgProps) => (); export const EyeOpened = (props: ImgProps) => (); export const GlobeDark = (props: ImgProps) => (); @@ -172,8 +164,6 @@ export const GlobeLight = (props: ImgProps) => ( (); export const MenuDark = (props: ImgProps) => (); export const MenuLight = (props: ImgProps) => (); -export const OptimismLogo = (props: ImgProps) => (); -export const PolygonLogo = (props: ImgProps) => (); export const WalletConnectDark = (props: ImgProps) => (); export const WalletConnectLight = (props: ImgProps) => (); export const WalletConnectDefaultLogo = (props: ImgProps) => (); diff --git a/frontends/web/src/routes/account/walletconnect/components/incoming-pairing/incoming-pairing.tsx b/frontends/web/src/routes/account/walletconnect/components/incoming-pairing/incoming-pairing.tsx index 8014ebed76..9a9ddf20c2 100644 --- a/frontends/web/src/routes/account/walletconnect/components/incoming-pairing/incoming-pairing.tsx +++ b/frontends/web/src/routes/account/walletconnect/components/incoming-pairing/incoming-pairing.tsx @@ -96,7 +96,7 @@ export const WCIncomingPairing = ({ if (e.message.includes('Non conforming namespaces')) { alertUser(t('walletConnect.invalidPairingChain', { - chains: '\n•Ethereum \n•Optimism \n•BSC \n•Polygon \n•Fantom \n•Arbitrum One' + chains: '\n•Ethereum \n•Ethereum (Goerli)' })); } else { //unexpected error, display native error message diff --git a/frontends/web/src/utils/walletconnect.ts b/frontends/web/src/utils/walletconnect.ts index 8c73013fec..b0623cb495 100644 --- a/frontends/web/src/utils/walletconnect.ts +++ b/frontends/web/src/utils/walletconnect.ts @@ -15,7 +15,7 @@ */ import { ReactNode, createElement } from 'react'; import { IWeb3Wallet } from '@walletconnect/web3wallet'; -import { ArbitrumLogo, BSCLogo, ETHLogo, FantomLogo, OptimismLogo, PolygonLogo } from '../components/icon'; +import { ETHLogo } from '../components/icon'; type TSupportedChainDetail = { [key: string]: { name: string; icon: ReactNode; } @@ -30,26 +30,6 @@ export const SUPPORTED_CHAINS: TSupportedChainDetail = { name: 'Ethereum goerli', icon: createElement(ETHLogo) }, - 'eip155:10': { - name: 'Optimism', - icon: createElement(OptimismLogo) - }, - 'eip155:56': { - name: 'Binance smart chain', - icon: createElement(BSCLogo) - }, - 'eip155:137': { - name: 'Polygon', - icon: createElement(PolygonLogo) - }, - 'eip155:250': { - name: 'Fantom', - icon: createElement(FantomLogo) - }, - 'eip155:42161': { - name: 'Arbitrum One', - icon: createElement(ArbitrumLogo) - } }; export const EIP155_SIGNING_METHODS = {