RootSoft / walletconnect-dart-sdk

Open protocol for connecting dApps to mobile wallets with QR code scanning or deep linking.
MIT License
102 stars 61 forks source link

Not able to connect Trust wallet #57

Closed VivekMakwana24 closed 2 years ago

VivekMakwana24 commented 2 years ago

Hello,

I want to connect to Trust wallet, But unfortunately it doesn't connect with it.

I have run the Mobile example app of this demo and tried to scan the QR code from the Trust Wallet, but it gives a prompt msg of "Connecting! please wait" , Nothing happens after that.

mrtnetwork commented 2 years ago

For me, this happens when I try to connect to TrustWallet without a VPN because my country is embargoed, Or I try to make a new connection again without waiting for the connection to be established

mahdibagjani commented 2 years ago

I have the same problem with TrustWallet and SafePal

mahdibagjani commented 2 years ago

@MohsenHaydari found problem. TrustWallet and SafePal ,... (except MetaMask) just connect to mainNet. you have to change chainID from 3 (ropsten) to 1 (mainnet). Then change Web3Client url to a mainNet url for example 'https://rpc.flashbots.net/'. That's it.

//chainID list https://besu.hyperledger.org/en/stable/Concepts/NetworkID-And-ChainID/

//mainNet urls https://chainlist.org/chain/1

//ethereum_transaction_tester.dart

final ethereum = Web3Client('https://rpc.flashbots.net/', Client());
return connector.connect(chainId: 1, onDisplayUri: onDisplayUri);
ronpetit commented 2 years ago

@MohsenHaydari found problem. TrustWallet and SafePal ,... (except MetaMask) just connect to mainNet. you have to change chainID from 3 (ropsten) to 1 (mainnet). Then change Web3Client url to a mainNet url for example 'https://rpc.flashbots.net/'. That's it.

//chainID list https://besu.hyperledger.org/en/stable/Concepts/NetworkID-And-ChainID/

//mainNet urls https://chainlist.org/chain/1

//ethereum_transaction_tester.dart

final ethereum = Web3Client('https://rpc.flashbots.net/', Client());
return connector.connect(chainId: 1, onDisplayUri: onDisplayUri);

Just to make it more clear, trust wallet won't accept any testnet, was trying over Polygon mumbai, and It didn't worked until I changed to polygon mainnet