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

Update sns candid files #856

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Update sns candid files #856

wants to merge 3 commits into from

Conversation

mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Mar 7, 2025

Motivation

The SNS Candid types need to be updated to support SetTopicsForCustomProposals. One SNS has already created a proposal of this type, causing the proposals page for this SNS to break in NNS-dapp. To fix this issue and minimize risks, we are updating only the SNS-related types.

Changes

  1. Checkout ic repo to commit 9769228 (from https://github.com/dfinity/ic-js/pull/855/files#diff-3c03137e7f91cc4a673bcd7bec8c3eb37899014f3ba207b135d1c4809d57b892R1)
  2. Run ./scripts/import-candid ic
  3. Revert not “sns” folders

Tests

Todos

  • Add entry to changelog (if necessary).

Copy link
Contributor

github-actions bot commented Mar 7, 2025

size-limit report 📦

Path Size
@dfinity/ckbtc 8.15 KB (0%)
@dfinity/cketh 3.69 KB (0%)
@dfinity/cmc 1.41 KB (0%)
@dfinity/ledger-icrc 4.29 KB (0%)
@dfinity/ledger-icp 15.41 KB (0%)
@dfinity/nns 37.55 KB (0%)
@dfinity/nns-proto 140.99 KB (0%)
@dfinity/sns 17.74 KB (+0.5% 🔺)
@dfinity/utils 4.73 KB (0%)
@dfinity/zod-schemas 626 B (0%)
@dfinity/ic-management 3.22 KB (0%)

@@ -378,6 +384,7 @@ export const fromCandidAction = (action: ActionCandid): Action => {
return { Motion: action.Motion };
}

// TODO: Find a better way to log this because JSON.stringify doesn't support BigInt.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe something like:

JSON.stringify(action, (key, value) =>
  typeof value === 'bigint' ? value.toString() : value
);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good, let's do it in a separate pr 👍

Copy link
Member

Choose a reason for hiding this comment

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

Just sharing if interesting: we already have utils for this.

See jsonReplacer and jsonReviver of @dfinity/utils.

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.

3 participants