8000 feat(icrc): add method list subaccounts by yhabib · Pull Request #906 · dfinity/ic-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(icrc): add method list subaccounts #906

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

Merged
merged 9 commits into from
May 9, 2025
Merged

Conversation

yhabib
Copy link
Contributor
@yhabib yhabib commented May 8, 2025

Motivation

We aim to introduce a new method, listSubaccounts, in the IcrcIndexNgCanister class.

Changes

  • Added the listSubaccounts method to the IcrcIndexNgCanister class.

Tests

  • Created tests for the new method.

Todos

  • Add entry to changelog (if necessary).

Copy link
Contributor
github-actions bot commented May 8, 2025

size-limit report 📦

Path Size
@dfinity/ckbtc 8.16 KB (0%)
@dfinity/cketh 3.69 KB (0%)
@dfinity/cmc 1.39 KB (0%)
@dfinity/ledger-icrc 4.36 KB (+0.77% 🔺)
@dfinity/ledger-icp 15.43 KB (0%)
@dfinity/nns 37.58 KB (0%)
@dfinity/nns-proto 140.99 KB (0%)
@dfinity/sns 18.01 KB (0%)
@dfinity/utils 5.04 KB (0%)
@dfinity/zod-schemas 626 B (0%)
@dfinity/ic-management 3.29 KB (0%)

@yhabib yhabib force-pushed the nns1-3793/list-subaccounts branch from a1cde0e to 6385db0 Compare May 8, 2025 12:10
@yhabib yhabib changed the title WIP2: list subaccounts feat(icrc): add method list subaccounts May 8, 2025
@yhabib yhabib marked this pull request as ready for review May 8, 2025 12:19
@yhabib yhabib requested review from a team as code owners May 8, 2025 12:19
Copy link
Member
@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor questions/suggestions

@yhabib yhabib requested a review from peterpeterparker May 9, 2025 05:11
Copy link
Member
@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

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

LGTM, thx

@yhabib yhabib merged commit 26ff9d2 into main May 9, 2025
16 checks passed
@yhabib yhabib deleted the nns1-3793/list-subaccounts branch May 9, 2025 05:30
github-merge-queue bot pushed a commit to dfinity/nns-dapp that referenced this pull request May 12, 2025
# Motivation

We want to utilize the new function exposed by ic-js to [list
subaccounts](dfinity/ic-js#906), enabling users
to easily retrieve the list of all subaccounts for an ICRC canister.

Note: This PR introduces a new canister object based on the
NextGeneration Index canister. The existing one will be deprecated
eventually, so a follow-up PR will migrate the existing methods to the
new canister.

[NNS1-3793](https://dfinity.atlassian.net/browse/NNS1-3793)

# Changes

- Add a new canister object for the Next Generation IndexCanister.  
- Add an API function to call `list_subaccounts`.

# Tests

- Add unit tests for the API function.

# Todos

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

[NNS1-3793]:
https://dfinity.atlassian.net/browse/NNS1-3793?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
mstrasinskis added a commit to dfinity/nns-dapp that referenced this pull request May 12, 2025
commit e9a607b
Author: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com>
Date:   Mon May 12 10:41:03 2025 +0200

    feat(delegation-state-column): compareByVoteDelegation util (#6806)

    # Motivation

    To improve the overview of a user’s vote delegation state, it’s planned
    to display the delegation status icon directly in the neuron table by
    adding a new column: “Vote Delegation” (see screenshot).

    This PR adds a new util for sorting by vote delegation status.

    [Draft MVP PR](https://github.com/dfinity/nns-dapp/pull/6802/files)

    [Demo](https://qsgjb-riaaa-aaaaa-aaaga-cai.mstr-ingress.devenv.dfinity.network/)

    # Changes

    - Add compareByVoteDelegation util.

    # Tests

    - Added.

    # Todos

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

commit c428ef6
Author: Yusef Habib <yusef.fernandez@dfinity.org>
Date:   Mon May 12 10:32:04 2025 +0200

    refactor(wallet): migrate SNS wallet to runes (#6807)

    # Motivation

    We aim to introduce changes to the `SnsWallet` component. This PR
    refactors the component using runes to simplify the addition of new
    features.

    [NNS1-3793](https://dfinity.atlassian.net/browse/NNS1-3793)

    # Changes

    - Refactor `SnsWallet` to use runes.

    # Tests

    - All tests should pass as before since no logical changes were made.

    # Todos

    -  [ ] Add an entry to the changelog (if necessary).
    Not necessary.

    [NNS1-3793]:
    https://dfinity.atlassian.net/browse/NNS1-3793?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

commit 800b135
Author: Yusef Habib <yusef.fernandez@dfinity.org>
Date:   Mon May 12 08:12:15 2025 +0200

    feat(portfolio): add alternative navigation controls to stacked cards (#6816)

    # Motivation

    The `StackedCards` component displays controls below the cards, allowing
    users to:
    1. Identify their current card in the total.
    2. Navigate between the cards.

    However, in scenarios with too many cards (projects), the dots may
    overflow. This PR introduces an alternative set of controls using
    buttons (previous and next) for card navigation.

    https://github.com/user-attachments/assets/cb4c518c-2f31-4d86-a4bf-73f74e1d6852

    [NNS1-3641](https://dfinity.atlassian.net/browse/NNS1-3641)

    # Changes

    - Add alternative controls when there are too many cards.

    # Tests

    - Add a unit test for the new behavior.
    - Update existing tests to ensure that only one type of control is being
    rendered.
    - Tested in
    [devenv](https://qsgjb-riaaa-aaaaa-aaaga-cai.yhabib-ingress.devenv.dfinity.network/)

    # Todos

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

    [NNS1-3641]:
    https://dfinity.atlassian.net/browse/NNS1-3641?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

commit 83cdf18
Author: Yusef Habib <yusef.fernandez@dfinity.org>
Date:   Mon May 12 07:51:14 2025 +0200

    feat(api): add new method listSubaccounts (#6815)

    # Motivation

    We want to utilize the new function exposed by ic-js to [list
    subaccounts](dfinity/ic-js#906), enabling users
    to easily retrieve the list of all subaccounts for an ICRC canister.

    Note: This PR introduces a new canister object based on the
    NextGeneration Index canister. The existing one will be deprecated
    eventually, so a follow-up PR will migrate the existing methods to the
    new canister.

    [NNS1-3793](https://dfinity.atlassian.net/browse/NNS1-3793)

    # Changes

    - Add a new canister object for the Next Generation IndexCanister.
    - Add an API function to call `list_subaccounts`.

    # Tests

    - Add unit tests for the API function.

    # Todos

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

    [NNS1-3793]:
    https://dfinity.atlassian.net/browse/NNS1-3793?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

commit 03c1866
Author: Yusef Habib <yusef.fernandez@dfinity.org>
Date:   Mon May 12 07:51:07 2025 +0200

    refactor(portfolio): migrate page component to runes (#6812)

    # Motivation

    We aim to display proposals for new SNS projects on the Portfolio page
    that were approved before the swap begins. This PR prepares the
    Portfolio page to introduce the pre-swap cards by migrating to runes.

    [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639)

    # Changes

    -  Refactored the page to use runes.

    # Tests

    -  Tests should pass as before since there were no logical changes.

    # Todos

    -  [ ] Add an entry to the changelog (if necessary)
    Not necessary.

    [NNS1-3639]:
    https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

commit cf918b6
Author: pr-automation-bot-public[bot] <189003650+pr-automation-bot-public[bot]@users.noreply.github.com>
Date:   Sun May 11 11:22:58 2025 +0200

    bot: Update IC Cargo Dependencies to release-2025-05-08_03-21-base (#6817)

    # Motivation
    A newer release of the internet computer is available.
    We want to keep our Cargo dependencies up to date.

    # Changes
    * Ran `scripts/update-ic-cargo-deps` to update the Cargo.toml
    dependencies to the latest IC release.

    # Tests
    * See CI

    Co-authored-by: gix-bot <gix-bot@users.noreply.github.com>

commit 81d3e7a
Author: Yusef Habib <yusef.fernandez@dfinity.org>
Date:   Fri May 9 15:36:36 2025 +0200

    feat(portfolio): implement pre-swap SNS proposal card (#6811)

    # Motivation

    We want to display proposals for new SNS projects on the Portfolio page
    that were approved before the swap begins. This first PR introduces a
    new type of card for these cases.

    Note: There are some deviations from the design: there is no project
    link, as it is not always available, and we will reuse the same
    remaining time format as the other cards.

    Design:

    ![Screenshot 2025-05-09 at 08 25
    42](https://github.com/user-attachments/assets/baae3600-868e-4f6c-ba1b-2d98b471e665)

    Implementation:

    ![Screenshot 2025-05-09 at 08 26
    44](https://github.com/user-attachments/assets/dc43789e-e1ee-42b7-8ebc-7e5d3f66f1af)

    [NNS1-3639](https://dfinity.atlassian.net/browse/NNS1-3639)

    # Changes

    - New `AdoptedProposalCard` component.

    # Tests

    - Unit tests for the new component.

    # Todos

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

    [NNS1-3639]:
    https://dfinity.atlassian.net/browse/NNS1-3639?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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
0