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

[Bug]: Ledger Devices signature miss match after Version 12.11.0 #30473

Open
bangjelkoski opened this issue Feb 20, 2025 · 3 comments
Open

[Bug]: Ledger Devices signature miss match after Version 12.11.0 #30473

bangjelkoski opened this issue Feb 20, 2025 · 3 comments
Assignees
Labels
external-contributor regression-prod-12.11.0 Regression bug that was found in production in release 12.11.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-hardware-wallets type-bug Something isn't working

Comments

@bangjelkoski
Copy link

Describe the bug

After the recent update, EIP712, which gets signed on Ledger through Metamask, has a signature mismatch issue.

Expected behavior

Before this upgrade, no issues were encountered with signing EIP712 through Metamask with Ledger devices. Using Ledger directly also has no issues.

Screenshots/Recordings

No response

Steps to reproduce

  1. Go to https://helixapp.com
  2. Try to sign any transaction when Metamask has a Ledger device selected,

Here is a JSON that you can also use to try in unit tests:

{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"},{"name":"salt","type":"string"}],"Tx":[{"name":"context","type":"string"},{"name":"msgs","type":"string"}]},"primaryType":"Tx","domain":{"name":"Injective Web3","version":"1.0.0","chainId":"0x1","verifyingContract":"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC","salt":"0"},"message":{"context":"{\"account_number\":28013,\"chain_id\":\"injective-1\",\"fee\":{\"amount\":[{\"denom\":\"inj\",\"amount\":\"105102000000000\"}],\"gas\":210204,\"payer\":\"inj1065f86fh88ptyrg8h5048zu0vyx7ex8ymwgr6h\"},\"memo\":\"\",\"sequence\":1096,\"timeout_height\":106702014}","msgs":"[{\"@type\":\"/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder\",\"sender\":\"inj1xpc7l2k9l7mqyctdqjpt37wwfc7gqj7nt3vhy4\",\"order\":{\"market_id\":\"0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce\",\"order_info\":{\"subaccount_id\":\"0x3071efaac5ffb602616d0482b8f9ce4e3c804bd3000000000000000000000000\",\"fee_recipient\":\"inj1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8dkncm8\",\"price\":\"92500000000.000000000000000000\",\"quantity\":\"0.001000000000000000\",\"cid\":\"\"},\"order_type\":\"BUY\",\"margin\":\"92500000.000000000000000000\",\"trigger_price\":\"0.000000000000000000\"}}]"}}

Error messages or log output

Error thrown in the console


{
    "code": -32603,
    "message": "Keyring Controller signTypedMessage: Error: Ledger: The signature doesnt match the right address",
    "data": {
        "cause": {
            "stack": "Error: Keyring Controller signTypedMessage: Error: Ledger: The signature doesnt match the right address\n  at me.signTypedMessage (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-1.js:1:480764)\n  at async L.d (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-2.js:5:10943)\n  at async L.m (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-2.js:5:10522)\n  at async L.c (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-2.js:5:8635)\n  at async s (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background-0.js:1:31933)\n  at async chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-0.js:1:522117\n  at async chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-1.js:1:96936",
            "message": "Keyring Controller signTypedMessage: Error: Ledger: The signature doesnt match the right address"
        }
    }
}

Detection stage

In production (default)

Version

12.11.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@bangjelkoski bangjelkoski added the type-bug Something isn't working label Feb 20, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Feb 20, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Feb 20, 2025
@metamaskbot metamaskbot added external-contributor regression-prod-12.11.0 Regression bug that was found in production in release 12.11.0 labels Feb 20, 2025
@sleepytanya sleepytanya added team-confirmations Push issues to confirmations team Sev2-normal Normal severity; minor loss of service or inconvenience. labels Feb 21, 2025
@vinistevam vinistevam added team-hardware-wallets and removed team-confirmations Push issues to confirmations team labels Feb 24, 2025
@vivek-consensys
Copy link

When swapping USDT to INJ, I am receiving another error on console.
bugsnag.js:2401 MetamaskException: Please connect directly with Ledger instead through to sign this transaction | {"type":"wallet-error","code":-1,"errorClass":"MetamaskException","message":"Please connect directly with Ledger instead through to sign this transaction","contextModule":"sign-transaction","originalMessage":"Please connect directly with Ledger instead through Metamask to sign this transaction","stack":["Error: Please connect directly with Ledger instead through Metamask to sign this transaction","at Qce.signEip712TypedData (https://helixapp.com/_nuxt/D7Y9Ii6W.js:60:196339)","at async W2e.broadcastWeb3WithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:18848)","at async W2e.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:15546)","at async Proxy.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/B9etIFFg.js:8:4427643)","at async Proxy.X (https://helixapp.com/_nuxt/ZWJBKkSg.js:1:1892)"]} at Qce.signEip712TypedData (https://helixapp.com/_nuxt/D7Y9Ii6W.js:60:196339) at async W2e.broadcastWeb3WithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:18848) at async W2e.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:15546) at async Proxy.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/B9etIFFg.js:8:4427643) at async Proxy.X (https://helixapp.com/_nuxt/ZWJBKkSg.js:1:1892)

Private Zenhub Video

@bangjelkoski
Copy link
Author

bangjelkoski commented Feb 25, 2025

When swapping USDT to INJ, I am receiving another error on console. bugsnag.js:2401 MetamaskException: Please connect directly with Ledger instead through to sign this transaction | {"type":"wallet-error","code":-1,"errorClass":"MetamaskException","message":"Please connect directly with Ledger instead through to sign this transaction","contextModule":"sign-transaction","originalMessage":"Please connect directly with Ledger instead through Metamask to sign this transaction","stack":["Error: Please connect directly with Ledger instead through Metamask to sign this transaction","at Qce.signEip712TypedData (https://helixapp.com/_nuxt/D7Y9Ii6W.js:60:196339)","at async W2e.broadcastWeb3WithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:18848)","at async W2e.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:15546)","at async Proxy.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/B9etIFFg.js:8:4427643)","at async Proxy.X (https://helixapp.com/_nuxt/ZWJBKkSg.js:1:1892)"]} at Qce.signEip712TypedData (https://helixapp.com/_nuxt/D7Y9Ii6W.js:60:196339) at async W2e.broadcastWeb3WithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:18848) at async W2e.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/D7Y9Ii6W.js:3:15546) at async Proxy.broadcastWithFeeDelegation (https://helixapp.com/_nuxt/B9etIFFg.js:8:4427643) at async Proxy.X (https://helixapp.com/_nuxt/ZWJBKkSg.js:1:1892)

Private Zenhub Video

Yes, we had to do this because signing using Ledger through Metamask doesn't work after the upgrade. If you want, I can also redeploy the product with logging for the original error.

@bangjelkoski
Copy link
Author

Any updates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor regression-prod-12.11.0 Regression bug that was found in production in release 12.11.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-hardware-wallets type-bug Something isn't working
Projects
Status: To be fixed
Status: To be triaged
Development

No branches or pull requests

6 participants