Implement signTypedData across all different wallets/signers #5311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
While putting together the DevDay3 demo for fee-less onboarding I realised that the
signTypedData
function of theLocalWallet
is using that wrong approach when we created a valid EIP712 hash and then wrapped that in an Ethereum personal message hash. I hacked the fix for the demo but I wanted to come back and revisit this and implement the right hashing pattern across the wallet/signer combos that we support.I know @AlexBHarley you were looking at parts of this recently, I'm not sure if we want to approach this differently but I took a stab at this draft implementation to start the conversation.
Tested
Haven't added specs yet because I wasn't sure if we're going with a different approach but wanted to start the conv with this PR
Backwards compatibility
💀 The signTypedData backwards compatibility on LocalWallet is broken. We need to figure out what the implications of that are - I couldn't find a usage of this.