right now I use this code: https://github.com/Web3Modal/web3modal-vanilla-js-example
but it connects only eth address from trust wallet
I tried to change provider options to this:
const providerOptions = {
walletconnect: {
package: WalletConnectProvider,
options: {
rpc: {
56: "https://bsc-dataseed.binance.org/"}
}
},
But didn't work
In my trust wallet I have btc address, eth address, bnb address and I want to know all this addresses and balances. But right now I can only get eth address
I tried to do this:
const chainId = 56//await web3.eth.getChainId();
// Get list of accounts of the connected wallet
const accounts = await web3.eth.getAccounts();
But this gives me only eth accounts. So what do I do?
In my case, it worked on Trust wallet, and did not work on metamask mobile app:
I'm not sure the bellow code is required:
You can find out how to configure by reading the source code directly: // Select BSC work on Trust wallet but dont work on metamask https://github.com/Web3Modal/web3modal/blob/72596699b97d231dfaa5ef04110b61b8dc77d57d/src/providers/connectors/walletconnect.ts#L30 https://github.com/Web3Modal/web3modal/blob/72596699b97d231dfaa5ef04110b61b8dc77d57d/src/helpers/utils.ts#L198