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: notification preferences, post-switch registration + sequential signatures #2551

Merged
merged 4 commits into from
Sep 27, 2023

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Sep 26, 2023

What it solves

Resolves

  1. Release 1.19.0 #2546 (comment)
  2. "Global registration" not enabling "Confirmation requests" checkbox in notification preferences
  3. Signing for added Safes across different chains doesn't work on Ledger/Trezor

How this PR fixes it

1. Enable all via banner

The wallet is now directly used to create a Web3Provider within getRegisterDevicePayload. (The chain assertion that happens when clicking "Enable all" causes useWeb3 to return undefined for a short period of time.)

2. Confirmation request preference

Ownership of the Safes being registered is no longer references useIsSafeOwner. The registrant is inherently registered and the checkbox should therefore be checked. (If they are not an owner or delegate they won't receive notifications, however.)

3. Hardware wallet registration

Multiple signatures are now requested sequentially instead of using Promise.all.

How to test it

1. Enable all via banner

  1. Ensure Safes are added.
  2. Ensure owner wallet of aforementioned Safes is connected, and on the wrong network.
  3. Navigate to an added Safe and click "Enable all".
  4. Observe chain switch request, then respective signature requests.

2. Confirmation request preference

  1. Ensure Safes are added.
  2. Navigate to "global" notifications settings.
  3. Enable notifications for n Safes.
  4. Navigate to the respective Safe notification settings.
  5. Observe the "Confirmation requests" notification type preference checked.

3. Hardware wallet registration

  1. Ensure Safes are added on >1 chain.
  2. Navigate to "global" notifications settings.
  3. Enable notifications for all Safes via a Ledger/Trezor.
  4. Observe successful registration.

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_prefs_global_register--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

@iamacook iamacook changed the title fix: notification preferences + post-switch registration fix: notification preferences, post-switch registration + sequential signatures Sep 26, 2023
@usame-algan
Copy link
Member

When enabling notifications on multiple chains, MM now also pops up multiple times after each signature instead of only popping up once and saying "Reject x signatures" at the bottom but this is expected.

@francovenica
Copy link
Contributor

Looks good to me

The enable all now also triggers the request to sign the enabling of the notifications. I've checked that after those signings, in the global preferences show all safes checked

Enabling the notifications in the global preferences is also enabling the "Confirmation request" checkboxes

I've checked that I can sign for more than 1 network with trezor and ledger. I get to request to sign 2 different messages (since I tested in 2 networks) and after that I've checked that all the safes in the global preferences are marked

@katspaugh katspaugh merged commit b420813 into release/1.19.0 Sep 27, 2023
7 checks passed
@katspaugh katspaugh deleted the fix-prefs-global-register branch September 27, 2023 07:10
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 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.

4 participants