Open VliceZ opened 3 years ago
@VliceZ Hi, did you manage to make it work?
@miohtama i have no idea,just shows a dialog for users to choose,like ETH、BSC。
What exactly is the problem with this lib? The lib should show no dialog.
What I mean is that I don’t know the chainId returned, so I let the user choose which chain the specific wallet is.
@VliceZ @ligi The sample app is not working and when I fix it and click to connect button, it navigates me to the wallet app I chose and returns me this strings: It just oppens the app not asks for permission. How can I fix it?
@miohtama The bridge parameter in in simple app is not working, try to change it to "https://bridge.walletconnect.org" ,the complete code like this in Application :
fun resetSession() {
nullOnThrow { session }?.clearCallbacks()
val icons: ArrayList
@VliceZ Hi, thank you so much for posting this code snippet :) I am now able to send permission request but it crashes when user accepts connection. Error: E/AndroidRuntime: FATAL EXCEPTION: OkHttp https://bridge.walletconnect.org/... Process: com.application.kotlinwalletconnectdeneme, PID: 20277 java.lang.IllegalStateException: Module with the Main dispatcher had failed to initialize
Can you take a look at this please? Thank you so much :)
@montaigne2100 I think the error is from this line "icons.add("https://images/xx.png")",the icons url just a example , you need add a real icon Url.
@VliceZ Yeah I did that but problem was about coroutines library's version. I upgraded it and its fixed. Thank you so so much :) You saved my days
So the problem is solved by using a valid icon URL? Maybe we should throw an exception as the library then
@miohtama The bridge parameter in in simple app is not working, try to change it to "https://bridge.walletconnect.org" ,the complete code like this in Application : fun resetSession() { nullOnThrow { session }?.clearCallbacks() val icons: ArrayList = arrayListOf() icons.add("https://images/xx.png") val key = ByteArray(32).also { Random().nextBytes(it) }.toNoPrefixHexString() config = Session.Config(UUID.randomUUID().toString(), "https://bridge.walletconnect.org", key) session = WCSession(config, MoshiPayloadAdapter(moshi), storage, OkHttpTransport.Builder(client, moshi), Session.PeerMeta(name = "Dfox",icons = icons) ) session?.offer() }
Im having error after doing this java.net.connection failed to connect bridge.walletconnect.org
I don’t know why is it coming before some time my code was working fine and now this exception throws every time i send request to metamask or trustwallet.
Can u help me out with this problem i have already raised a issue u can see my issue in issue tab with all the codes
How to get chaninId @ligi @VliceZ @kashifahmad662 @montaigne2100 I need to get the channel ID to check if the network matches or not
How can i get it right?