MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.7k stars 4.79k forks source link

[Enhancement]: Invalid QR code for Sign Typed Data in HW transaction #23961

Open benjisclowder opened 3 months ago

benjisclowder commented 3 months ago

Describe the bug

Scanning the QR code from the confirmation screen after initiating a Sign Typed Data transaction in the Test dApp via Hardware Wallet (Keystone) is unsuccessful. Message received on hardware wallet screen: "Invalid QR code. QR code data not recognized. Please try again".

Expected behavior

QR code can be scanned and transaction confirmed.

Screenshots/Recordings

![WhatsApp Image 2024-04-11 at 13 53 42](https://github.co

https://github.com/MetaMask/metamask-extension/assets/120041701/48b87b6a-a264-42f7-aab4-caa98aca946a

m/MetaMask/metamask-extension/assets/120041701/bf04805d-bd55-4de2-90f5-21a17b60c70d)

Steps to reproduce

  1. Import a hardware wallet account into MetaMask
  2. Connect to the test dApp: https://metamask.github.io/test-dapp/
  3. Scroll to Sign Typed Data transaction and proceed to initiate transaction
  4. A QR code is displayed, to be scanned via hardware wallet device
  5. Proceed to scan QR code
  6. Notice a message is displayed on the hardware wallet device: "Invalid QR code. QR code data not recognized. Please try again" and transaction confirmation is not possible

Error messages or log output

"Invalid QR code. QR code data not recognized. Please try again".

Version

11.13.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

Keystone

Additional context

No response

Severity

No response

angelcheung22 commented 3 months ago

@benjisclowder looks a duplication with https://app.zenhub.com/workspaces/cet-metamask-hardware-wallets-6566ee6aedc46007d5a260bb/issues/gh/metamask/metamask-extension/22256 , maybe we can close this one due to duplication.

benjisclowder commented 3 months ago

@benjisclowder looks a duplication with https://app.zenhub.com/workspaces/cet-metamask-hardware-wallets-6566ee6aedc46007d5a260bb/issues/gh/metamask/metamask-extension/22256 , maybe we can close this one due to duplication.

Hi @angelcheung22 , I don't have access to the cet board and that might be why I couldn't find any related issue before logging this (I don't have access to the link you have sent) so if you think it's a duplicate and it's already logged there, I will close this one. Thank you for flagging this.

angelcheung22 commented 3 months ago

@benjisclowder hey yes, the ticket is here under extension repo too. https://github.com/MetaMask/metamask-extension/issues/22256

benjisclowder commented 3 months ago

@benjisclowder hey yes, the ticket is here under extension repo too. #22256

Okay I see that is for Sign permit type of transaction while my issue was encountered at the Sign Typed Data transaction. But the underlaying cause seems to be the same, as well as behavior. Good call

sleepytanya commented 3 months ago

Bug (unable to scan QR via hardware wallet) is present on 11.14.0 with the same message "Invalid QR code. QR code data not recognized. Please try again".

Screenshot 2024-04-12 at 11 56 17 AM
angelcheung22 commented 3 months ago

Pending feedback from Keystone team

soralit commented 3 months ago

Hi @benjisclowder , I'm Sora from Keystone team. For we did a totally technical restructure on the new hardware model Keystone 3 Pro, it used a different implementation of EIP-712 which did not support TypedDataV1 messages. TypedDataV3 and V4 messages are well supported now.
I'm sorry for this inconsistent, and our team is managing to add support for V1 messages. Will keep you updated in this issue if we have any progress.

angelcheung22 commented 2 months ago

@soralit could you share if there are any updates with this one? Thanks

vivek-consensys commented 2 months ago

Updated the labels and title as this issue is more of an Enhancement, as we are waiting for the Keystone team to update on the firmware update to support TypedDataV1 messages.