Open nop33 opened 1 year ago
That would be much better than the in-browser wallet IMO, as you can keep the browser state independent from the app state.
You're mentioning a second issue that I know I was experiencing but didn't report - that after signing, you stay in the wallet. (it really should popup wallet to sign, then go back to browser after)
Adding a feedback on this issue as I think it's relevant for prioritization: "this ONE issue though means I keep using kiwi browser (with extention wallet loaded) for dapps instead of the mobile wallet as it works smoother".
The main issue is that when you sign something from chrome/mobile, nothing happens.. you have to know to switch manually to wallet and confirm the signing request that's there - and once you do, manually switch back..
It should popup the wallet on signing request and go back to the dapp/chrome tab when done signing
Thanks for the feedback both of you. We'll prioritise the task accordingly!
Regarding (3) on Android.
The WalletConnect docs say:
To receive signing request in your Wallet, you'll need to initialize Kotlin SDK with the Redirect object where you pass a deep link that redirects to your wallet when it comes to receiving signing request from Dapp.
val redirect = "kotlin-wallet-wc://request" //should be unique for your wallet
Instead of the Kotlin SDK we are using the @walletconnect/sign-client
package. When initializing the SignClient
we can pass a redirect
object that can have 2 props: native
and/or universal
. This is what Rainbow and Metamask use respectively:
// Rainbow
redirect: {
native: 'rainbow://wc',
universal: 'https://rnbwapp.com/wc'
}
// Metamask
redirect: {
native: 'metamask://',
universal: 'https://metamask.app.link/'
}
As expected, the custom schemes are also part of the respective AndroidManifest.xml
files:
They also register wc
as a custom scheme, like we do.
I tried registering the alephium
scheme, but I haven't managed to make it work yet. I can verify that the alephium
scheme is correctly registered because the app comes to focus when I run
bunx uri-scheme open alephium:// --android
It also works if I run
adb shell am start -W -a android.intent.action.VIEW -d "alephium://" org.alephium.wallet
In the Kotlin example mentioned in the WalletConnect docs, I see that the redirect prop they use is:
kotlin-web3wallet:/request
The interesting thing about this is:
/
kotlin-web3wallet
is not registered as a scheme in the AndroidManifest file, but it is mentioned in:
Wonderful research!
I'd go with the simplest option: "Simply display a success message that says "Success, you can go back to your browser" and not try to automatically switch to the mobile browser".
This has many advantages:
This flow is used in many payments apps btw, like twint in CH.
WDYT? We can talk more about that tmr.
I agree. That will take care of tasks (2) and (4) for both Android and iOS.
We still need to figure out (1) for iOS and and (3) for both Android and iOS.
This article makes me think that the redirect
might need to be set on the dApp side as well... https://medium.com/@felipe.aga/how-to-use-walletconnect-with-react-native-ffe76d88566
To solve the point (1) for iOS, I've been working on registering our mobile wallet app to the WalletConnect Explorer, but I am stuck at this step. "Alephium" is not listed in the supported chains:
Maybe we need to register our chain?
If you don't see your chain listed in this list, then you will need to create an issue in GitHub to to get the process started. You can do so by clicking here. Once your chain is added to this list, wallets & dapps will be able to indicate support for your chain via WalletConnect's Cloud.
https://docs.walletconnect.com/advanced/multichain/overviewhttps://docs.walletconnect.com/cloud/chains/overview
@mvaivre I moved this to the following release. However, there doesn't seem to be a high demand for the remaining subtasks (iOS-related). Besides, as the commend above mentions, we need to first register our app with WC Cloud. I propose we de-prioritize this task until it's really needed by our community (basically remove it from our milestones for now and focus on other tasks).
ping @mvaivre
We need to re-prioritize this issue due to popular demand.
Subtasks
Android
wc
as thescheme
of our mobile app (see Expo docs) so that our app shows in the Android app selector when clicking on the "Connect" button in the dApp's WalletConnect modal. We also useduseURL
ofexpo-linking
(see Expo docs) to parse the WalletConnect URI and pair.goBack
func of the@react-navigation/native
package, but this has the side-effect that if you connect to a desktop browser dApp, the mobile wallet will go to the background after connecting (there's no separate behavior between mobile and desktop browser connections)iOS
Description
When the request is signed or rejected, the browser app is brought back to focus.EDIT: On iOS 17 this is not the case anymore.Related issues
Related to alephium/alephium-frontend#95
Related resources