Skip to content

Conversation

@laumair
Copy link

@laumair laumair commented Mar 20, 2021

Description of change

This PR group notifications for internal transfers i.e., no duplicate notifications when a transaction gets confirmed.

Links to any relevant issues

N/A

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Manually tested macOS

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

);

confirmedInternalMessageIds.update((ids) => {
delete ids[message.id]
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to create a new object here? since the update shouldn't mutate the object AFAIK

Copy link
Author

Choose a reason for hiding this comment

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

No it is fine. It updates all refs and also preserves reactivity.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also think we could get away with this with a simple JS object instead of a svelte store, but this looks good.

@laumair laumair marked this pull request as ready for review March 21, 2021 13:29
@laumair laumair requested a review from cvarley100 as a code owner March 21, 2021 13:29
@cvarley100 cvarley100 merged commit 8314c2f into develop Mar 22, 2021
@cvarley100 cvarley100 deleted the feat/grouped-notifications branch March 22, 2021 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants