Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Fix: EIP712 signing #4060

Merged
merged 4 commits into from
Sep 1, 2022
Merged

Fix: EIP712 signing #4060

merged 4 commits into from
Sep 1, 2022

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented Aug 31, 2022

What it solves

This PR fixes bugs found in the EIP712 signing found by the 1inch team. They're the following:

  • Unnecessary wrapping of the EIP712 typed data with Safe's EIP712 message structure
  • Unnecessary JSON wraps/unwraps of the EIP712 data

How to test it

  1. Run feat: Add Permissions and EIP-712 tests gnosis/safe-test-app#2
  2. Use a test message, it should be a valid JSON. Example:
{"domain":{"verifyingContract":"0x0000000000000000000000000000000000000777","chainId":1},"message":{"message":"0x"},"types":{"SafeMessage":[{"type":"bytes","name":"message"}]}}
  1. Paste it into the textarea
  2. Click a button to sign it
  3. Confirm that the message matches your test message
  4. Sign and execute the signing
  5. Check if the message is signed by clicking the button in the test app

Related SDK PR safe-global/safe-apps-sdk#361

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@mmv08 mmv08 requested a review from yagopv August 31, 2022 14:10
@github-actions
Copy link

github-actions bot commented Aug 31, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Aug 31, 2022

Pull Request Test Coverage Report for Build 2970561889

  • 6 of 9 (66.67%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 42.105%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/safe/components/Apps/hooks/useSignMessageModal.ts 1 2 50.0%
src/routes/safe/components/Apps/components/AppFrame.tsx 0 2 0.0%
Totals Coverage Status
Change from base Build 2963651285: -0.004%
Covered Lines: 4776
Relevant Lines: 10360

💛 - Coveralls

@github-actions
Copy link

Deployment links

Mainnet     🟣 Polygon     🟠 Rinkeby

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@JagoFigueroa
Copy link

Todo bueno señores, gracias!

@mmv08 mmv08 merged commit f8d7258 into dev Sep 1, 2022
@mmv08 mmv08 deleted the fix/eip712-signing branch September 1, 2022 11:44
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants