Closed boulinb closed 1 year ago
hey @boulinb if it works correctly in Rainbow, then the problem is on the wallet side.
Can you upload the sessionParams
you are using?
hey @ignaciosantise
Here's the sessionParams code for the implementation above
const DEFAULT_CHAIN = ['eip155:1', 'eip155:56', 'eip155:137'];
const REQUIRED_METHODS = ['eth_sendTransaction', 'personal_sign'];
const REQUIRED_EVENTS = ['chainChanged', 'accountsChanged'];
const sessionParams = {
namespaces: {
eip155: {
methods: REQUIRED_METHODS,
chains: DEFAULT_CHAIN,
events: REQUIRED_EVENTS,
rpcMap: {},
},
}
};
@boulinb can you check if it works with the latest version of Trust Wallet? I've just connected successfully
@ignaciosantise I've checked latest version of trust wallet. I could not initiate transaction ! is there a fix for this like new method ?
Hey,
I'm updating the issue: I've found where the problem was coming from and I understand why it works well for you @ignaciosantise
When I imported my Trustwallet account for testing, I imported it as an ETH account, which is why it can't recognise other chains (see video below).
Do you think it will be possible to handle the error directly from the library in the future?
Hey @boulinb nice catch! I've just checked if i can do something in the SDK side but unfortunately i don't get any error/log/info when this happens :/
Most wallets show an error message saying that some networks are incompatible, maybe you can reach Trust with this suggestion.
Im closing this issue, as you've found the root cause 💪
Hi ! 😃
Here are the problems I have with the TrustWallet implementation:
When the user connects to Rainbow, the initialization of the 3 requested chains (ETH, BNB, MATIC) are perfectly managed.
When the user connects to TrustWallet, the initialization of the 3 chains requested (ETH, BNB, MATIC) is problematic. The only blockchain requested by the connection is ETH, when the user accepts the connection an error message appears "Unsupported or empty chains for namespace". Knowing that the multi-chain connection with TrustWallet worked before, I did not change the code!
Here is a working implementation for you to test: https://github.com/boulinb/web3modal-react-native-issue
Thanks to you for your work on the package!
Benjamin