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: only delete all preferences per chain #2556

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Sep 27, 2023

What it solves

Resolves #2546 (comment)

How this PR fixes it

deleteAllPreferences is has been replaced with deleteAllChainPreferences, which clears preferences according to a provided chainId according to the device unregistration (also per chainId).

A loading indicator has also been added to the global preferences "Save" button.

How to test it

During the following registrations, a loading indicator should appear in the "Save" button:

  1. Ensure multiple Safes are registered across differing chains.
  2. Navigate to the global notification preferences.
  3. Unregister a Safe.
  4. Observe only the preferences from that Safe removed.

  1. Ensure multiple Safes are registered across differing chains.
  2. Navigate to the global notification preferences.
  3. Unregister all Safes on one network.
  4. Observe the Safes on other chain(s) retain their preferences.

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 27, 2023
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Branch preview

✅ Deploy successful!

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

Comment on lines +48 to +49
_705 = '705: Failed to read from IndexedDB',
_706 = '706: Failed to write to IndexedDB',
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that these were labelled incorrectly.

@github-actions
Copy link

github-actions bot commented Sep 27, 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 base branch from dev to release/1.19.0 September 27, 2023 08:50
@francovenica
Copy link
Contributor

Looks good.

Checked that only the checkboxes you check or unchecked are saved
Checked that last fix regarding the signature counter, now it counts properly how many signatures per network you need.

@iamacook iamacook merged commit d1a0a56 into release/1.19.0 Sep 27, 2023
7 checks passed
@iamacook iamacook deleted the delete-prefs-per-chain branch September 27, 2023 15:32
@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.

3 participants