-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Web3 Provider eth_sign trezor #5218
Comments
Trezor method Read the developer note at the beginning of this article I'll keep this issue open since you should be seeing an error message (see this) but it looks like that's not happening. I'll take a look early next week. |
I'm not quite sure I'm understanding what you're referencing. From my understanding the trezor implementation of ethereumSignMessage is in line with the definition of Why is |
Right now with Metamask and Trezor you can only use personal_sign. For example: RE: Regarding EIP712, Trezor needs to add support for eth_signTypedData on their end first in order for us to enable it on the Integration. See trezor/trezor-core#122 |
Can you expand on this? Right now it is not possible to digest some data and sign the message with MM Trezor. Personal_sign uses utf8 encoding in which not all byte sequences can be represented, so you cannot simply convert the hex into ut8 and back without loss of data. Please refer here to where trezor now supports hex signing (which is inline with eth_sign) trezor/connect#216. From our perspective it looks like MM should support the following: Trezor + eth_sign - Spec compliant implementation
Trezor + personal_sign
|
@dekz Good to know that Trezor made that change. We can get support for this right after we get the TrezorConnect v5 PR merged (MetaMask/eth-trezor-keyring#11) |
Hey @brunobar79, have you managed to add the hex support? |
Also, does the same issue exist in Ledger too? |
On trezor, this is a very straight forward fix. If the message is hex, then just add a parameter: |
@sidsverma Feel free to submit a PR enabling signMessage in eth-trezor-keyring which should be identical to signPersonalMessage with hex: true and without the ascii part and I’ll take a look. Adding a repro example would be great too. Regarding ledger, I don’t think it’s supported, but you can confirm by taking a look here https://github.com/LedgerHQ/ledgerjs |
Hi @brunobar79, I have created a PR for the same: MetaMask/eth-trezor-keyring#15 I do not understand how I can test this though. I have tested the individual parts of the code that I have added in my project using TrezorConnect, but I have no way to test it via Metamask. Do you have any suggestions for me here? Also, by when do you think this will be live on Metamask so that I can give a timeline to the users in my dapp(Nuo)? |
Also, is there any way to determine if the account is Trezor or Ledger once the user has signed one transaction via Metamask from his Trezor in one dapp? |
#5021 is similar but doesn't seem to make sense. Why would eth_sign not call trezor ethereumSignMessage
Describe the bug
JSON RPC method
eth_sign
is not handled by the trezor feature of metamask. Metamask pops up with a Sign button but nothing is hooked up.To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Send the request to the trezor device
Screenshots
If applicable, add screenshots to help explain your problem.
Browser details (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: