Comments (4)
@kobajs yes, the code is here (it's in Flutter, but I think it can be adopted to Kotlin).
The problem was that I was trying to use WalletConnect V2, but MetaMask doesn't support it yet. Instead, we should use V1.
from walletconnectkotlinv2.
Hello!
I know that there's some effort being made to add an example of mobile linking, but since it's not ready yet, maybe you will be able to help me?
I want to link a wallet app with the sample app. I did the following:
- Installed a wallet app (MetaMask) and a dapp (OpenSea) and verified that OpenSea is linked with MetaMask correctly
- Obtained project id from cloud.walletwonnect.com, cloned the sample app, replaced the id and used the
initDapp
config - Tried to link the app with a wallet as specified in Mobile Linking of the sample app with no luck (tried both
develop
andmaster
branches):
val connectParams = WalletConnect.Params.Connect(
permissions = WalletConnect.Model.SessionPermissions(
WalletConnect.Model.Blockchain(listOf("eip155:69")),
WalletConnect.Model.Jsonrpc(listOf("personal_sign"))
), pairingTopic = null
)
val uri = WalletConnectClient.connect(connectParams)
// Here I try to launch a wallet app using uri as deep link
// The wallet app (MetaMask) is launched, but with no "Permission request" dialog
requireContext().startActivity(
Intent().apply {
action = Intent.ACTION_VIEW
data = Uri.parse(uri)
}
)
// Or here I try to construct the data the similar way it's constructed by OpenSea - still no dialog
requireContext().startActivity(
Intent().apply {
action = Intent.ACTION_VIEW
`package` = "io.metamask"
data = Uri.parse("https://metamask.app.link/wc?uri=${URLEncoder.encode(uri.toString())}")
}
)
As a result, MetaMask app is launched, but with no "Request access" dialog (as opposed to launch by OpenSea where I do get the dialog).
I then compared the uris from the sample app and from OpenSea:
OpenSea:
wc:28c37b8b-2968-4f5c-b1bc-14e1c86e3da7
@1
?bridge=https://j.bridge.walletconnect.org
&key=2c007ba1c3ebabffb48e6618810ead30430c08436f505e11a675cd96482b5d67
Sample app:
wc:85c006807f2b2007fa9d0fead82a954ed0581e9429205803dbede4ecc502c3be
@2
?controller=false
&publicKey=67e01f1a963b1987b1565dbd0805fb3d2baf4371ee3a3e666f1a0a0972a64321
&relay=%7B%22protocol%22%3A%22waku%22%7D
Seems that OpenSea uses version "1" of WC Standard format and the sample app - version "2". I then tried to find the description of the version "2", but with no luck. With little hope I then tried to manually change the uri to be like version "1" format, but obviously it didn't work.
So my question is how to correctly link a dapp (the sample app) with a wallet app?
Also, do you have plans on adding a sample Flutter app?
Thank you in advance!
from walletconnectkotlinv2.
+1
from walletconnectkotlinv2.
@Svechnikov have you found a solution?
from walletconnectkotlinv2.
Related Issues (20)
- Any reason that WalletConnectKotlinV2 needs repackageclasses in proguard? HOT 2
- CannotFindSequenceForTopic: Cannot find sequence for given topic: *some topic here* HOT 13
- Update documentation
- Crash with OkHttp error: `IllegalStateException: cannot make a new request...` HOT 14
- NPE Crash Attempt to read from field 'java.util.LinkedList$Node HOT 2
- Crash when using web3wallet connect
- Remove Calendar usage in favor of java.time
- Incorrect Order of Transaction Requests with Multiple Active Sessions in WalletConnect HOT 6
- NoSuchMethodError when open Web3Modal HOT 4
- IllegalStateException: ChaCha20Poly1305 cannot be reused for encryption during dapp session disconnect. HOT 2
- Issue with Transaction Signature Resumption after app closure HOT 1
- Notifications don't work with enableEncrypted = true HOT 5
- method getListOfActiveSessions() now returns only last connected session HOT 1
- java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/ui/platform/LocalSoftwareKeyboardController
- ClassNotFoundException ExpiredProposal HOT 2
- BouncyCastle bundled with WC contains security vulnerability HOT 1
- SignClient.connect: Metamask does not handle multiple chains in a namespace proposal HOT 2
- Fatal Exception: net.sqlcipher.database.SQLiteException: error code 8: attempt to write a readonly database
- When send accountchanged to sessionevnet in Kotlin version, only string type can be send, but in case of js, accountchanged checks array. HOT 8
- Exception : Publish request timed out: Timed out waiting for 10000 ms HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from walletconnectkotlinv2.