|
16 | 16 |
|
17 | 17 | - MEW wallet currently fails to install on M1 macs
|
18 | 18 | - All wallet modules (except for `injected-wallets`) require extra dependencies and may require polyfilling the node built in modules for the browser. See the [Build Environments](##build-environments) section for more info
|
| 19 | +- **If using React** you may be interested in checking out the React Hooks package here - https://www.npmjs.com/package/@web3-onboard/react |
19 | 20 |
|
20 | 21 | ## Initialization
|
21 | 22 |
|
@@ -107,24 +108,43 @@ const onboard = Onboard({
|
107 | 108 | id: '0x1',
|
108 | 109 | token: 'ETH',
|
109 | 110 | label: 'Ethereum Mainnet',
|
110 |
| - rpcUrl: ETH_MAINNET_RPC |
| 111 | + rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}` |
| 112 | + }, |
| 113 | + { |
| 114 | + id: '0x3', |
| 115 | + token: 'tROP', |
| 116 | + label: 'Ethereum Ropsten Testnet', |
| 117 | + rpcUrl: `https://ropsten.infura.io/v3/${INFURA_ID}` |
111 | 118 | },
|
112 | 119 | {
|
113 | 120 | id: '0x4',
|
114 | 121 | token: 'rETH',
|
115 | 122 | label: 'Ethereum Rinkeby Testnet',
|
116 |
| - rpcUrl: ETH_RINKEBY_RPC |
| 123 | + rpcUrl: `https://rinkeby.infura.io/v3/${INFURA_ID}` |
| 124 | + }, |
| 125 | + { |
| 126 | + id: '0x38', |
| 127 | + token: 'BNB', |
| 128 | + label: 'Binance Smart Chain', |
| 129 | + rpcUrl: 'https://bsc-dataseed.binance.org/' |
117 | 130 | },
|
118 | 131 | {
|
119 | 132 | id: '0x89',
|
120 | 133 | token: 'MATIC',
|
121 | 134 | label: 'Matic Mainnet',
|
122 |
| - rpcUrl: MATIC_MAINNET_RPC |
| 135 | + rpcUrl: 'https://matic-mainnet.chainstacklabs.com' |
| 136 | + }, |
| 137 | + { |
| 138 | + id: '0xfa', |
| 139 | + token: 'FTM', |
| 140 | + label: 'Fantom Mainnet', |
| 141 | + rpcUrl: 'https://rpc.ftm.tools/' |
123 | 142 | }
|
124 | 143 | ],
|
125 | 144 | appMetadata: {
|
126 | 145 | name: 'Token Swap',
|
127 | 146 | icon: myIcon, // svg string icon
|
| 147 | + logo: myLogo, // svg string logo |
128 | 148 | description: 'Swap tokens for other tokens',
|
129 | 149 | recommendedInjectedWallets: [
|
130 | 150 | { name: 'MetaMask', url: 'https://metamask.io' },
|
|
0 commit comments