Skip to content

Commit

Permalink
Merge branch 'frontend-walletconnect-changesupported-chains'
Browse files Browse the repository at this point in the history
  • Loading branch information
shonsirsha committed Nov 20, 2023
2 parents 39c3230 + eac6458 commit a45e818
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 128 deletions.
38 changes: 0 additions & 38 deletions frontends/web/src/components/icon/assets/arbitrum.svg

This file was deleted.

20 changes: 0 additions & 20 deletions frontends/web/src/components/icon/assets/bsc.svg

This file was deleted.

1 change: 0 additions & 1 deletion frontends/web/src/components/icon/assets/fantom.svg

This file was deleted.

21 changes: 0 additions & 21 deletions frontends/web/src/components/icon/assets/optimism.svg

This file was deleted.

16 changes: 0 additions & 16 deletions frontends/web/src/components/icon/assets/polygon.svg

This file was deleted.

10 changes: 0 additions & 10 deletions frontends/web/src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -136,15 +131,13 @@ type ImgProps = JSX.IntrinsicElements['img'];
export const Info = (props: ImgProps) => (<img src={info} draggable={false} {...props} />);
export const BitBox02StylizedDark = (props: ImgProps) => (<img src={BB02StylizedDark} draggable={false} {...props} />);
export const BitBox02StylizedLight = (props: ImgProps) => (<img src={BB02StylizedLight} draggable={false} {...props} />);
export const ArbitrumLogo = (props: ImgProps) => (<img src={arbitrumSVG} draggable={false} {...props} />);
export const ArrowDown = (props: ImgProps) => (<img src={arrowDownSVG} draggable={false} {...props} />);
export const ArrowCirlceLeft = (props: ImgProps) => (<img src={arrowCircleLeftSVG} draggable={false} {...props} />);
export const ArrowCirlceLeftActive = (props: ImgProps) => (<img src={arrowCircleLeftActiveSVG} draggable={false} {...props} />);
export const ArrowCirlceRight = (props: ImgProps) => (<img src={arrowCircleRightSVG} draggable={false} {...props} />);
export const ArrowCirlceRightActive = (props: ImgProps) => (<img src={arrowCircleRightActiveSVG} draggable={false} {...props} />);
export const BankDark = (props: ImgProps) => (<img src={bankDarkSVG} draggable={false} {...props} />);
export const Bank = (props: ImgProps) => (<img src={bankLightSVG} draggable={false} {...props} />);
export const BSCLogo = (props: ImgProps) => (<img src={bscSVG} draggable={false} {...props} />);
export const BuyInfo = (props: ImgProps) => (<img src={buyInfoSVG} draggable={false} {...props} />);
// check icon on a green circle
export const Checked = (props: ImgProps) => (<img src={checkedSmallSVG} draggable={false} {...props} />);
Expand All @@ -164,16 +157,13 @@ export const Edit = (props: ImgProps) => (<img src={editSVG} draggable={false} {
export const EditLight = (props: ImgProps) => (<img src={editLightSVG} draggable={false} {...props} />);
export const ETHLogo = (props: ImgProps) => (<img src={ethColorSVG} draggable={false} {...props} />);
export const ExternalLink = (props: ImgProps) => (<img src={externalLink} draggable={false} {...props} />);
export const FantomLogo = (props: ImgProps) => (<img src={fantomSVG} draggable={false} {...props} />);
export const EyeClosed = (props: ImgProps) => (<img src={eyeClosedSVG} draggable={false} {...props} />);
export const EyeOpened = (props: ImgProps) => (<img src={eyeOpenedSVG} draggable={false} {...props} />);
export const GlobeDark = (props: ImgProps) => (<img src={globeDarkSVG} draggable={false} {...props} />);
export const GlobeLight = (props: ImgProps) => (<img src={globeLightSVG} draggable={false} {...props} />);
export const GuideActive = (props: ImgProps) => (<img src={guideSVG} draggable={false} {...props} />);
export const MenuDark = (props: ImgProps) => (<img src={menuDarkSVG} draggable={false} {...props} />);
export const MenuLight = (props: ImgProps) => (<img src={menuLightSVG} draggable={false} {...props} />);
export const OptimismLogo = (props: ImgProps) => (<img src={optimismSVG} draggable={false} {...props} />);
export const PolygonLogo = (props: ImgProps) => (<img src={polygonSVG} draggable={false} {...props} />);
export const WalletConnectDark = (props: ImgProps) => (<img src={walletConnectDarkSVG} draggable={false} {...props} />);
export const WalletConnectLight = (props: ImgProps) => (<img src={walletConnectLightSVG} draggable={false} {...props} />);
export const WalletConnectDefaultLogo = (props: ImgProps) => (<img src={walletConnectDefaultSVG} draggable={false} {...props} />);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 1 addition & 21 deletions frontends/web/src/utils/walletconnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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 = {
Expand Down

0 comments on commit a45e818

Please sign in to comment.