WalletConnect / kotlin-walletconnect-lib

library to use WalletConnect with Kotlin or Java
MIT License
156 stars 100 forks source link

Fixed sample app for 0.9.8 #40

Open JavonneM opened 3 years ago

JavonneM commented 3 years ago

Updated the repo so that the sample app can build with ease. This would probably require a version bump with the changes to FullyQualifiedConfig.

Library Changes

Sample app changes

Demonstration https://user-images.githubusercontent.com/4679874/119327954-d67a2980-bc83-11eb-92ab-04beb4120e63.mp4

ligi commented 3 years ago

Thanks - that looks good to me. Need to do some more testing later before merging. At a first test it failed when connecting to the wallet - did you try that?

JavonneM commented 3 years ago

Thanks - that looks good to me. Need to do some more testing later before merging. At a first test it failed when connecting to the wallet - did you try that?

So I'm actually testing against walletconnect.org. The bridge server seems to have some issues

2021-05-24 12:04:01.869 29677-29754/io.walletconnect.example.debug D/#####: Message: {"topic":"45474c95-4423-4997-bb35-61795884c9a8","type":"sub","payload":"","silent":true}
.example.debug W/System.err: com.squareup.moshi.JsonDataException: Expected a string but was BOOLEAN at path $.silent
....
2021-05-24 12:04:01.872 29677-29754/io.walletconnect.example.debug W/System.err:     at io.walletconnect.example.server.BridgeServer.onMessage(BridgeServer.kt:43)

https://bridge.walletconnect.org) websocket does time out sometimes though, tested it today and it seems to be working fine now. Ropsten and https://bridge.walletconnect.org network has constantly been congested for me, I've attached a video demo using walletconnect and Ropsten.

JavonneM commented 3 years ago

Thanks - that looks good to me. Need to do some more testing later before merging. At a first test it failed when connecting to the wallet - did you try that?

So I'm actually testing against walletconnect.org. The bridge server seems to have some issues

2021-05-24 12:04:01.869 29677-29754/io.walletconnect.example.debug D/#####: Message: {"topic":"45474c95-4423-4997-bb35-61795884c9a8","type":"sub","payload":"","silent":true}
.example.debug W/System.err: com.squareup.moshi.JsonDataException: Expected a string but was BOOLEAN at path $.silent
....
2021-05-24 12:04:01.872 29677-29754/io.walletconnect.example.debug W/System.err:     at io.walletconnect.example.server.BridgeServer.onMessage(BridgeServer.kt:43)

https://bridge.walletconnect.org) websocket does time out sometimes though, tested it today and it seems to be working fine now. Ropsten and https://bridge.walletconnect.org network has constantly been congested for me, I've attached a video demo using walletconnect and Ropsten.

Issues relating to the bridge server has been fixed

ww1997hj commented 3 years ago

Hello! I am a beginner of Android. Download the project you provided and report an error when it runs. How to solve this problem?
微信图片_20210622201210

JavonneM commented 3 years ago

Hello! I am a beginner of Android. Download the project you provided and report an error when it runs. How to solve this problem? 微信图片_20210622201210

You need to install an app that can handle the wallet connect interface, the url scheme is wc://. You can use an app like metamask to handle the intent.

ww1997hj commented 3 years ago

Hi, what should I do if I want to integrate Uniswap on my own app? I just opened the Uniswap Dapp from Android.That is, the implementation of the wallet connection interface APP

JavonneM commented 3 years ago

Hi, what should I do if I want to integrate Uniswap on my own app? I just opened the Uniswap Dapp from Android.That is, the implementation of the wallet connection interface APP

I think you are misunderstanding what this library does. If you want to integrate Uniswap (a dapp) into your app your should be using the web3 to send rpc requests to the blockchain and interact with the contract.

WalletConnect is simply a protocol for connecting and signing transactions with a wallet, for example your app would build a transaction, lets say you want to swap a token on uniswap, you'd build the transaction then send it over WalletConnect library to bridge your app to some wallet(ie metamask) for signing and sending the signed transaction to the blockchain.

This library simply creates a bridge from your app to metamask. The rest of the implementation you need to do with something like web3. A link to the web3 js docs

ligi commented 3 years ago

oh sorry for letting this PR slip @JavonneM - crazy times currently - hope to be able to test and maybe merge this one soon

ww1997hj commented 3 years ago

Hello, can I connect to the Uniswap Dapp by integrating this library?If so, how should I do it?Thank you. Could you give me some advice

nghminh163 commented 3 years ago

image You can use this instead of patch to lib :D

mobilekosmos commented 3 years ago

When merge?

JavonneM commented 3 years ago

When merge?

Still awaiting @ligi to test and merge. I think they might be working on a new version of this though.