Skip to content

Conversation

@AntonioVentilii
Copy link
Collaborator

@AntonioVentilii AntonioVentilii commented Nov 21, 2025

Motivation

Class IcrcLedgerCanister can actually extend abstract IcrcCanister (see PR #1285).

And in fact, the method to fetch the balance is the exact same that is already developed in IcrcCanister.

Changes

  • Change the class extension of IcrcLedgerCanister from Canister to IcrcCanister.
  • Remove redundant balance method.

Tests

No more tests needed, since the method balance is already tested for IcrcCanister.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

size-limit report 📦

Path Size
@dfinity/ckbtc 8.2 KB (0%)
@dfinity/cketh 3.69 KB (0%)
@dfinity/cmc 1.59 KB (0%)
@dfinity/ledger-icrc 5.12 KB (-0.4% 🔽)
@dfinity/ledger-icp 7.16 KB (0%)
@dfinity/nns 27.45 KB (0%)
@dfinity/nns-proto 141 KB (0%)
@dfinity/sns 16.43 KB (0%)
@dfinity/utils 5.11 KB (0%)
@dfinity/zod-schemas 627 B (0%)
@dfinity/ic-management 4.47 KB (0%)
@icp-sdk/canisters/ckbtc 8.2 KB (0%)
@icp-sdk/canisters/cketh 3.69 KB (0%)
@icp-sdk/canisters/cmc 1.59 KB (0%)
@icp-sdk/canisters/ledger/icrc 5.12 KB (-0.4% 🔽)
@icp-sdk/canisters/ledger/icp 7.16 KB (0%)
@icp-sdk/canisters/nns 27.45 KB (0%)
@icp-sdk/canisters/sns 16.43 KB (0%)
@icp-sdk/canisters/ic-management 4.47 KB (0%)

@AntonioVentilii AntonioVentilii changed the title feat(ledger): Extend class IcrcLedgerCanister with common IcrcCanister refactor(ledger): Extend class IcrcLedgerCanister with common IcrcCanister Nov 21, 2025
@AntonioVentilii AntonioVentilii marked this pull request as ready for review November 21, 2025 14:28
@AntonioVentilii AntonioVentilii requested review from a team as code owners November 21, 2025 14:28
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

@AntonioVentilii AntonioVentilii merged commit 6df4a88 into main Nov 21, 2025
21 checks passed
@AntonioVentilii AntonioVentilii deleted the feat-ledger/Extend-class-IcrcLedgerCanister-with-common-IcrcCanister branch November 21, 2025 15:15
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