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: enable notifications per chain #2584

Merged
merged 4 commits into from
Oct 4, 2023
Merged

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Oct 4, 2023

What it solves

Multiple signing windows and unsupported added Safes breaking registration.

How this PR fixes it

Enabling "all" notifications via the banner is now per chain. Only one signing window will appear and Safes on that chain will be registered for notifications.

On the global notifications settings page, the notifiable Safes are filtered according to the chains of the config service.

How to test it

Enabling per chain

  1. Ensure there are added Safes on differing networks and that no notification banner has been previously dismissed.
  2. Open a network with added Safes and enable the notifications via the banner.
  3. Observe only one signing window appear.
  4. Switch to another network with added Safes and repeat.

Enabling globally

  1. Add an unsupported chain with Safes to the SAFE_v2__addedSafes key in the localStorage.
  2. Navigate to the global notification settings.
  3. Select all Safes or the supported Safes.
  4. Click "Save" and observe a successful registration.

Screenshots

image

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 requested a review from schmanu October 4, 2023 11:23
@iamacook iamacook self-assigned this Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Branch preview

✅ Deploy successful!

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

@github-actions
Copy link

github-actions bot commented Oct 4, 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 marked this pull request as ready for review October 4, 2023 13:59
Copy link
Member

@schmanu schmanu left a comment

Choose a reason for hiding this comment

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

Vamos!

@francovenica
Copy link
Contributor

Ok, looks good:

I added a safe in goerli and ETH without enabling notifications
I added a second safe in goerli and "enabled all", making sure it only ask for 1 signature. It enables notifications for the 2 safes in that network (goerli in this case)
I did the same with ETH, same result as expected

I added an old rinkeby safe in the local storage key.
I enabled notifications for all safes from the global settings and I had no issues
Added more safes to differen networks, use the Enable all and made sure only the safes from that network get enabled

Just as a note, here is a comparison before/after on how it looked before having safes from old unsupported networks in the global settings:
image
image

@iamacook iamacook merged commit 4bc563c into dev Oct 4, 2023
7 checks passed
@iamacook iamacook deleted the enable-notifications-per-chain branch October 4, 2023 16:05
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 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.

None yet

4 participants