Skip to content

eip712 Doesn't work with Ledger signing #529

@gmelika

Description

@gmelika

This issue seems to be limited to only keplr For Keplr to work with INJ + Ledger it converts the cosmos messages to EIP712. This is done by calling getEip712TypedData. This function fails on any message where funds:[]. So any MsgInstantiateContract or even simple CW20 transfers will fail with the error Array with length 0 found (coming from here)

The issue primarily is that fromPartial adds in an empty funds: [] if nothing is passed in. which causes the exception above. Using Keplr with Ledger to transfer a CW20 token on INJ is impossible at the moment.

We tried to work around this by adding some funds in the array and removing it after calling getEip712TypedData which allows keplr to get the signature from the Ledger device, however the transaction is ultimately rejected with a generic unauthorized message.

Let me know what you think is the best approach to either work around this or fix it and I'm happy to open a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions