fix(ui): Group IPEX refresh notifications are duplicated in Redux if we are in another profile#1574
Open
Sotatek-DukeVu wants to merge 1 commit intodevelopfrom
Conversation
…tification's wallet
jimcase
approved these changes
Feb 5, 2026
Contributor
|
Tested on real devices: Android15 and iOS26 |
iFergal
reviewed
Feb 5, 2026
| ).toEqual(undefined); | ||
| }); | ||
|
|
||
| it("should delete notification when it's not current profile's notification", () => { |
Collaborator
There was a problem hiding this comment.
"should delete notification, despite being on a different profile at the time"
| Object.values(state.profiles).forEach((profile) => { | ||
| profile.notifications = profile.notifications.filter( | ||
| (n) => n.id !== action.payload | ||
| ); |
Collaborator
There was a problem hiding this comment.
While this works, it seems a bit wasteful because:
a) it keeps filtering other profiles even after the notification is filtered out.
b) it's still way more likely that the default profile will contain it, given natural user flows.
I propose this:
const defaultProfile = state.profiles[state.defaultProfile];
if (defaultProfile) {
const idx = defaultProfile.notifications.findIndex(
(notification) => notification.id !== action.payload
);
if (idx !== -1) {
defaultProfile.notifications.splice(idx, 1);
return;
}
}
for (const profile of Object.values(state.profiles)) {
if (profile === defaultProfile) continue;
const idx = profile.notifications.findIndex(
(notification) => notification.id !== action.payload
);
if (idx !== -1) {
profile.notifications.splice(idx, 1);
break;
}
}
Collaborator
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


…tification's wallet
Description
Fix group IPEX refresh notifications are duplicated in Redux if we are in another profile
Checklist before requesting a review
Issue ticket number and link
Testing & Validation
Design Review
Screen.Recording.2026-02-04.at.15.05.28.mov