Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eip712 Doesn't work with Ledger signing #529

Open
gmelika opened this issue Dec 13, 2024 · 0 comments
Open

eip712 Doesn't work with Ledger signing #529

gmelika opened this issue Dec 13, 2024 · 0 comments

Comments

@gmelika
Copy link

gmelika commented Dec 13, 2024

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

@gmelika gmelika changed the title eip712 Doesn't work with Ledger + Cosmos chains eip712 Doesn't work with Ledger signing Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant