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: Adds an override for the name and token.symbol values for abandoned SNS #5915

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

yhabib
Copy link
Contributor

@yhabib yhabib commented Dec 4, 2024

Motivation

As discussed here and here, we have a situation with the SNS CYCLES-TRANSFER-STATION. They have decided to change all their metadata, resulting in the name and token being displayed as ---.

This first PR introduces a method to override the values we receive from the SNS-Aggregator, allowing the rest of the application to use them.

Changes

  • Checks a dictionary of "broken" SNSs for matches and overrides name and token.symbol for any that are found.

Tests

  • Unit test for the aggregator store derived data to verify that when rootCanisterId is present in the dictionary, the values for name and token.symbol are replaced.

Todos

  • Add entry to changelog (if necessary).

@yhabib yhabib marked this pull request as ready for review December 4, 2024 11:56
@yhabib yhabib requested a review from a team as a code owner December 4, 2024 11:56
@yhabib yhabib force-pushed the yhabib/fix/rogue-sns branch from 548ccab to f656199 Compare December 4, 2024 13:40
@yhabib yhabib changed the title Fix: Adds an override for the name and token.symbol values for SNS that go rogue Fix: Adds an override for the name and token.symbol values for abandoned SNS Dec 4, 2024
@yhabib yhabib force-pushed the yhabib/fix/rogue-sns branch from d87cbe7 to cc43ff1 Compare December 4, 2024 13:58
@yhabib yhabib requested a review from dskloetd December 4, 2024 14:04
@yhabib yhabib added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit e4d3667 Dec 4, 2024
30 checks passed
@yhabib yhabib deleted the yhabib/fix/rogue-sns branch December 4, 2024 14:36
github-merge-queue bot pushed a commit that referenced this pull request Dec 4, 2024
# Motivation

As discussed
[here](https://dfinity.slack.com/archives/C03H6QEPW5D/p1733263773416409)
and
[here](https://dfinity.slack.com/archives/C039M7YS6F6/p1733302975333649),
we have a situation with the SNS `CYCLES-TRANSFER-STATION`. They have
decided to change all their metadata, resulting in the name and token
being displayed as `---`.

This second PR moves abandoned SNSs to the bottom of both the
`nsAggregatorStore` and any alphabetical sort.

# Changes

- Adds the hidden character `"\u200B"` to the beginning of the name of
an abandoned SNS, so alphabetical sorting pushes them to the end.
- Sorts `nsAggregatorStore` by the temporal parameter `isAbandoned`.

# Tests

- Unit test for the aggregator store derived data to verify that sort
functionality works as expected.

# Todos

- [x] Add entry to changelog (if necessary).

Prev. PR: #5915
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.

2 participants