add network and currency
unknown
javascript
5 years ago
373 B
11
Indexable
//add network and currency
window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x38',
chainName: 'Binance Smart Chain',
nativeCurrency: {
name: 'Binance Coin',
symbol: 'BNB',
decimals: 18
},
rpcUrls: ['https://bsc-dataseed.binance.org/'],
blockExplorerUrls: ['https://bscscan.com']
}]
}) .catch((error) => { console.log(error) })Editor is loading...