@@ -10,17 +10,32 @@ import { getRpcUrlsByChainId } from 'constants/wallet-chains';
1010import { Connector } from './types' ;
1111import { WalletConnectV2Connector } from './walletconnectV2' ;
1212
13- export const injectedConnector = new InjectedConnector ( {
14- supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
15- } ) ;
13+ export const FILTERED_OUT_WALLETS = [ 'Trust Wallet' , 'Coinbase Wallet' , 'WalletConnect' ] ;
1614
1715const rpcMap = getRpcUrlsByChainId ( ) ;
1816rpcMap [ WalletChainIds . TESTNET ] = 'https://goerli.infura.io/v3/54af4f71d6c44e0ea83badb0886458f9' ;
1917
20- const walletConnectV2Connector = new WalletConnectV2Connector ( {
18+ export const injectedConnector = new InjectedConnector ( {
2119 supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
20+ } ) ;
21+
22+ const infinityWalletConnector = new InfinityWalletConnector ( {
23+ supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
24+ } ) ;
25+
26+ //
27+ // Below are the 3 connectors in which onyx chain is not supported,
28+ // above are all of the multi-chain supported injectors
29+ //
30+
31+ const trustWalletConnector = new InjectedConnector ( {
32+ supportedChainIds : [ WalletChainIds . MAINNET ] ,
33+ } ) ;
34+
35+ const walletConnectConnector = new WalletConnectV2Connector ( {
36+ supportedChainIds : [ WalletChainIds . MAINNET ] ,
2237 rpcMap,
23- chains : WALLET_SUPPORTED_CHAIN_IDS as [ number , ... number [ ] ] ,
38+ chains : [ WalletChainIds . MAINNET ] ,
2439 qrcode : true ,
2540} ) ;
2641
@@ -31,19 +46,15 @@ const binanceChainWalletConnector = new BscConnector({
3146const coinbaseWalletConnector = new WalletLinkConnector ( {
3247 url : config . rpcUrl ,
3348 appName : 'Onyx' ,
34- supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
35- } ) ;
36-
37- const infinityWalletConnector = new InfinityWalletConnector ( {
38- supportedChainIds : WALLET_SUPPORTED_CHAIN_IDS ,
49+ supportedChainIds : [ WalletChainIds . MAINNET ] ,
3950} ) ;
4051
4152export const connectorsByName = {
4253 [ Connector . MetaMask ] : injectedConnector ,
4354 [ Connector . BraveWallet ] : injectedConnector ,
44- [ Connector . WalletConnect ] : walletConnectV2Connector ,
55+ [ Connector . WalletConnect ] : walletConnectConnector ,
4556 [ Connector . CoinbaseWallet ] : coinbaseWalletConnector ,
46- [ Connector . TrustWallet ] : injectedConnector ,
57+ [ Connector . TrustWallet ] : trustWalletConnector ,
4758 [ Connector . BinanceChainWallet ] : binanceChainWalletConnector ,
4859 [ Connector . InfinityWallet ] : infinityWalletConnector ,
4960 [ Connector . OperaWallet ] : injectedConnector ,
0 commit comments