-
-
Notifications
You must be signed in to change notification settings - Fork 260
Conversation
Hey @alisinabh 👋 |
We are proposing approach which would require some work to be done on metamask side after this is finished. See my comment #986 (comment) |
3d38bb9
to
4243f4d
Compare
Hi @TheArhaam
After the support in connect is added, Then it can be adapted in MetaMask/eth-trezor-keyring for the metamask support. |
Hello, thanks for contribution again. Could you please rebase on current develop and resolve conflicts? After that we would proceed with review. |
908d0d4
to
5b6d10b
Compare
5b6d10b
to
dfe9e6b
Compare
@mroz22 Rebase is done. The workflow for both T1 and TT should be OK. Tests however would need some interventions as we would need to add the extra data in the fixtures (or calculate them somehow in the test environment). Also the common repo has not been updated. |
Is there any chance this will be released in the next few days? Unable to perform some important signing with my T1 and don't have the ability (or desire) to migrate to another hardware wallet right now. |
src/js/plugins/ethereum/typedData.js
Outdated
|
||
const version = metamask_v4_compat | ||
? sigUtil.SignTypedDataVersion.V4 | ||
: sigUtil.SignTypedDataVersion.V3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong -- metamask_v4_compat=False
is in fact metamask V5 (doesn't exist yet, i believe)
instead we should always use V4
and always set metamask_v4_compat = True
if this is being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe metamask_v4_compat
comes from the developers and they might send false
here (I don't know why they would but they could).
Ledger already raises an exception if that is set to false. We can also do the same thing. Do you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 33d8b90
I have a $1500 LOOKS airdrop expiring in 8 days depending on this, would a $200 bounty speed up the process (half joking lol) |
I will contribute to this bounty. not joking. I'll put 0.1 eth on it if it is complete in time that I can claim the airdrop. |
@alisinabh Could we speed-up this task with a bounty? I'll happily contribute to the apportionment too. Can we use some kind of platform for the task? |
Thank you for your offers. I would also like this to be finished (regardless of any bounties). You would also need to wait for the next release of trezor connect and then metamask which would probably take more than 8 days. BUT if you own a model T device you already have the EIP-712 support on your device and the PR regarding your device has already been merged in #983. What you can do is integrate that into metamask and build it yourself so you can claim your $LOOKS @davidberiro @0xWildhare @PabloCastellano . However if you lack the technical knowledge or are too lazy to do that yourself 😅 I also can help you build it so you don't loose any of this precious airdrops. |
f527b6d
to
33d8b90
Compare
I would also love support for T1 to be in place already, thankfully I had a Ledger laying around that I was able to use to claim the airdrop. It's unfortunate that if you have a T1 today, it's almost unusable in Ethereum. 😅 All that being said, I really appreciate @alisinabh's work on this one, I have already donated 0.1 ETH for his work in the firmware repo and I would urge others to donate regardless of whether you will be able to claim your LOOKS airdrop! |
For those concerned about the $LOOKS airdrop specifically, they have posted on Discord in their official announcement channel that they are aware of this issue with ERC-712 and that they will make sure that affected users are still able to claim their airdrop. See also: https://twitter.com/zoddlooksrare/status/1481262245456007170?s=21 |
Guys, we are now actively working to merge this PR. I am just finishing a branch with updates needed to be able to run tests for model 1 - it should land develop tomorrow. In my local branch tests are already passing, so it shouldn't take much longer. |
@alisinabh, thank you for your great work! Is the issue (with Trezor T) expected to be fixed soon with the new releases of Trezor Connect and Metamask? |
Hi @Moebius1977, this is probably the wrong place to discuss this, since this PR is exclusively about Trezor One, not Trezor T. I've got a It's pretty unlikely for support to officially land in Metamask before 8 days is up though, but if Edit: feel free to build the developer version here for Trezor T support. I've confirmed it works (note it's not official, so your mileage may vary) https://github.com/aloisklink/metamask-extension/commits/trezor-model-t-eip-712 |
hello, @alisinabh I will also take care of adding this to CI. You could in the meantime try to resolve flow errors in your branch. |
I played with it a litttle and opened #1015. It should be passing CI now but there is still some mess that needs proper cleanup. |
closing in favor of #1015 which is already merged. thanks for contribution! |
@alisinabh I owe you a bounty of .1 ETH. Please drop an address to claim! (or if you believe this should go to someone else, please tag them so that they can drop the address. |
Hi @0xWildhare First of all you are not required to do that. Of course I'm not going to stop you if you like to do that. Also @aloisklink did help in this so if you want to send anything please split it. 🙂
Thank you |
I said I would do it, so I did it! Thank you for your efforts! |
Based on #983
This PR adds support for T1 blind signing to Trezor-Connect. It uses
@metamask/eth-sig-util
package to calculate the hashes for domain and message then sends them to T1 usingEthereumSignTypedHash
message. Since T1 will returnEthereumTypedDataSignature
no other change is needed.This way we handle T1 and TT differences as an internal logic of
connect
and will be invisible to the user/developers.One of the tests is failing. It is titled as
struct_list_non_v4
. I think we should somehow disable this for T1 (or completely remove it) as in a non V4 this is not supported. Theeth-sig-util
will throw the errorIt might be an invalid example IMO.
Also should I move the new dependency
@metamask/eth-sig-util
toextendedDependencies
@matejcik?Tasks
domain_hash
andmessage_hash
to the test fixtures.Decide aboutstruct_list_non_v4
failing test.scripts/protobuf-build.sh
.ethereumSignTypedData
to CI tests.