Giter Club home page Giter Club logo

Comments (4)

DmitryBespalov avatar DmitryBespalov commented on July 17, 2024

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.

robin-on-git avatar robin-on-git commented on July 17, 2024

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.

DmitryBespalov avatar DmitryBespalov commented on July 17, 2024

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.

robin-on-git avatar robin-on-git commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.