Comments (4)
hm, we'll check this out, but it does seem strange. Are you implementing wallet or a dapp? Can you share more details about the issue?
from walletconnectswift.
Thank you
I am implementing it as a dapp, in practice it will be part of a library/SDK that will have a WalletConnect dependency.
Basically the issue is that some wallets like MetaMask do accept data in personal_sign that are not prefixed with 0x, and in case of MetaMask by taking a glance at their source code, seems like even messages that are not converted to hex are accepted as valid inputs too, because they have an error correction step for message data. When the input is not hex formatted or not prefixed, they take the input and convert it to a properly formatted hex data.
You can check how they implemented their message data correcting code here
(If you'd like to take a look at the full flow of their personal_sign implementation, here is how it goes step by step till it reaches the error correcting part 1, 2, 3, 4 )
Other wallets for example Valora will enforce a strict formatting for the input and won't try correcting messages that are not following the message data format, it will just fail during the signing process.
Here is the personal_sign implementation and the related isHexString check
from walletconnectswift.
Thanks for sharing! I'll take a look.
On a side note, when we were implementing the access to wallets, after testing 130 wallets from the wallet connect iOS registry, I found that only a handful of them actually work, i.e. receive connection and are able to make a transaction.
from walletconnectswift.
This is basically our goal as well. Query the registry, link/launch wallets, connect and sign our data with them.
There are some wallets and networks which are higher on the priority list for us for now but it would be preferable to have a solution that does not depend from wallet specific codes, that's why WalletConnect seemed to be the optimal solution.
Why do you think the number of working, compatible wallets on iOS was so low? Is it because they neglect iOS compatibility (many wallets are cross platform apps), or just generally not following WalletConnect specs?
What was your approach dealing with these incompatible wallets? Did you just exclude them from being supported by your app/library (if this was in scope of what you worked on)?
Testing all those 130 wallets sounds fun
from walletconnectswift.
Related Issues (20)
- Server Delegate didDisconnect called but session is still in server.openSessions() list
- Update to latest version of CryptoSwift (1.5.1) HOT 4
- âšī¸ This library maintenance status HOT 16
- Missing or invalid socket data HOT 8
- Kotlin/Android version HOT 3
- Getting below error during integration of this SDK. I am already using socket for handling real time events in the app. HOT 1
- Recent update to using Apple's URLSession-based websockets requires macOS 10.15
- Nothing happens after confirmation transaction
- Logs can't be disabled, not even in release mode HOT 2
- The library callback didFailToConnect even if the session if approved
- Connection failure iosApp HOT 13
- Missing or invalid socket data HOT 1
- Is this repository still being maintained? HOT 2
- How to stay logged in metamask?
- Noisy Console Logs HOT 1
- V1 deprecation HOT 2
- Not got the Signature request in metamask HOT 2
- Rainbow opens, but connection is not made HOT 1
- Yea
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 walletconnectswift.