kotlin-walletconnect-lib icon indicating copy to clipboard operation
kotlin-walletconnect-lib copied to clipboard

Fixed sample app for 0.9.8

Open JavonneM opened this issue 4 years ago • 12 comments
trafficstars

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

  • Added toWCUri() on FullyQualifiedConfig

Sample app changes

  • Fixed the sample app
  • Fixed bridge server failing to parse bools
  • Navigation only occurs when the websocket is connected (Previously the websocket was timing out using https://bridge.walletconnect.org bridge)
  • After sending the transaction navigation occurs again to the wallet for the example app
  • Also added network config for sslip.io cleartext communication

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

JavonneM avatar May 21 '21 09:05 JavonneM

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?

ligi avatar May 21 '21 13:05 ligi

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 avatar May 24 '21 09:05 JavonneM

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

JavonneM avatar May 24 '21 11:05 JavonneM

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

ww1997hj avatar Jun 22 '21 12:06 ww1997hj

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.

JavonneM avatar Jun 22 '21 12:06 JavonneM

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

ww1997hj avatar Jun 28 '21 08:06 ww1997hj

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

JavonneM avatar Jun 28 '21 09:06 JavonneM

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

ligi avatar Jun 28 '21 13:06 ligi

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

ww1997hj avatar Jul 02 '21 02:07 ww1997hj

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

nghminh163 avatar Sep 07 '21 14:09 nghminh163

When merge?

mobilekosmos avatar Sep 23 '21 04:09 mobilekosmos

When merge?

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

JavonneM avatar Oct 05 '21 07:10 JavonneM