Skip to content
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

fix: adjust Ledger signatures for notifications #2550

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

iamacook
Copy link
Member

What it solves

Resolves Ledger notification registration not working

How this PR fixes it

Ledger produces vrs signatures with a canonical v value of {0,1}, while Ethereum's ecrecover call only accepts a non-standard v value of {27,28}. More on that here.

The v of Ledger signatures is now adjusted by 27 accordingly.

How to test it

  • Register for notifications with a non-Ledger wallet and observe registration working.
  • Register for notifications with a Ledger and observe registration working.

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@iamacook iamacook self-assigned this Sep 26, 2023
@github-actions
Copy link

github-actions bot commented Sep 26, 2023

Branch preview

✅ Deploy successful!

https://fix_ledger_notification_signature--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Sep 26, 2023

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 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

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 👍

@francovenica
Copy link
Contributor

Looks good.

I can sign the notification enabling with ledger
I get the notifications after the correspondant actions (receiving tokens, excuting tx...)
I tried with regular MM wallet and it works fine too.

@iamacook iamacook merged commit ebd9221 into release/1.19.0 Sep 26, 2023
7 checks passed
@iamacook iamacook deleted the fix-ledger-notification-signature branch September 26, 2023 14:36
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants