@@ -10,17 +10,23 @@ import { getRpcUrlsByChainId } from 'constants/wallet-chains';
1010import { Connector } from './types' ;
1111import { WalletConnectV2Connector } from './walletconnectV2' ;
1212
13+ export const FILTERED_OUT_WALLETS = [ 'Trust Wallet' , 'Coinbase Wallet' , 'WalletConnect' ] ;
14+
1315export const injectedConnector = new InjectedConnector ( {
1416 supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
1517} ) ;
1618
19+ const trustWalletConnector = new InjectedConnector ( {
20+ supportedChainIds : [ WalletChainIds . MAINNET ] ,
21+ } ) ;
22+
1723const rpcMap = getRpcUrlsByChainId ( ) ;
1824rpcMap [ WalletChainIds . TESTNET ] = 'https://goerli.infura.io/v3/54af4f71d6c44e0ea83badb0886458f9' ;
1925
20- const walletConnectV2Connector = new WalletConnectV2Connector ( {
21- supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
26+ const walletConnectConnector = new WalletConnectV2Connector ( {
27+ supportedChainIds : [ WalletChainIds . MAINNET ] ,
2228 rpcMap,
23- chains : WALLET_SUPPORTED_CHAIN_IDS as [ number , ... number [ ] ] ,
29+ chains : [ WalletChainIds . MAINNET ] ,
2430 qrcode : true ,
2531} ) ;
2632
@@ -31,7 +37,7 @@ const binanceChainWalletConnector = new BscConnector({
3137const coinbaseWalletConnector = new WalletLinkConnector ( {
3238 url : config . rpcUrl ,
3339 appName : 'Onyx' ,
34- supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
40+ supportedChainIds : [ WalletChainIds . MAINNET ] ,
3541} ) ;
3642
3743const infinityWalletConnector = new InfinityWalletConnector ( {
@@ -41,9 +47,9 @@ const infinityWalletConnector = new InfinityWalletConnector({
4147export const connectorsByName = {
4248 [ Connector . MetaMask ] : injectedConnector ,
4349 [ Connector . BraveWallet ] : injectedConnector ,
44- [ Connector . WalletConnect ] : walletConnectV2Connector ,
50+ [ Connector . WalletConnect ] : walletConnectConnector ,
4551 [ Connector . CoinbaseWallet ] : coinbaseWalletConnector ,
46- [ Connector . TrustWallet ] : injectedConnector ,
52+ [ Connector . TrustWallet ] : trustWalletConnector ,
4753 [ Connector . BinanceChainWallet ] : binanceChainWalletConnector ,
4854 [ Connector . InfinityWallet ] : infinityWalletConnector ,
4955 [ Connector . OperaWallet ] : injectedConnector ,
0 commit comments