Skip to content

Conversation

@AntonioVentilii
Copy link
Collaborator

Motivation

As per the other canisters, we open the methods to fetch the balance of NFTs for a DIP721 collection.

@AntonioVentilii AntonioVentilii marked this pull request as ready for review January 6, 2026 15:33
@AntonioVentilii AntonioVentilii requested a review from a team as a code owner January 6, 2026 15:33
Copilot AI review requested due to automatic review settings January 6, 2026 15:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new API method to fetch the balance of DIP721 NFTs, aligning with similar functionality for other token standards in the codebase.

Key Changes:

  • Implements a balance function in the DIP721 API that returns the count of NFTs owned by a principal
  • Adds comprehensive test coverage for the new balance endpoint including edge cases for nullish identities

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/frontend/src/icp/api/dip721.api.ts Implements the balance API method and helper function to create DIP721 canister instances
src/frontend/src/tests/icp/api/dip721.api.spec.ts Adds unit tests for the balance function including success and nullish identity scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AntonioVentilii AntonioVentilii added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit 2a80b87 Jan 6, 2026
78 checks passed
@AntonioVentilii AntonioVentilii deleted the feat-frontend/API-method-to-fetch-balance-of-DIP721-NFTs branch January 6, 2026 16:05
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