Skip to content

Conversation

@AntonioVentilii
Copy link
Collaborator

@AntonioVentilii AntonioVentilii commented Jan 6, 2026

Motivation

We have a new variant DIP721 among the custom tokens, so we need to add it properly to the correct types.

Consequently, we need to adapt the mapping.

@AntonioVentilii AntonioVentilii marked this pull request as ready for review January 7, 2026 09:05
@AntonioVentilii AntonioVentilii requested a review from a team as a code owner January 7, 2026 09:05
Copilot AI review requested due to automatic review settings January 7, 2026 09:05
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 support for the DIP721 variant to custom tokens in the frontend, including type definitions, utility mapping functions, service layer integration, and corresponding tests.

  • Added Dip721SaveCustomToken type and Dip721 network key variant
  • Implemented mapping function toDip721CustomToken to convert DIP721 tokens to backend format
  • Extended hideTokenByKey to handle DIP721 tokens in the service layer

Reviewed changes

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

Show a summary per file
File Description
src/frontend/src/lib/types/custom-token.ts Adds Dip721SaveCustomToken type and includes Dip721 variant in SaveCustomTokenWithKey union type
src/frontend/src/lib/utils/custom-token.utils.ts Imports DIP721 type alias from backend declarations and implements toDip721CustomToken mapping function with network key handler
src/frontend/src/lib/services/save-custom-tokens.services.ts Adds DIP721 store import, extends hideTokenByKey to handle DIP721, and includes TODO for missing loadCustomDip721Tokens
src/frontend/src/icp/stores/dip721-custom-tokens.store.ts Creates new certified custom tokens store for DIP721 tokens
src/frontend/src/tests/lib/utils/custom-token.utils.spec.ts Adds test case verifying correct type mapping for DIP721 network key
src/frontend/src/tests/lib/services/save-custom-tokens.services.spec.ts Adds DIP721 mock token to test suite and verifies store reset behavior for disabled DIP721 tokens

💡 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 7, 2026
Merged via the queue into main with commit 9090454 Jan 7, 2026
78 checks passed
@AntonioVentilii AntonioVentilii deleted the feat-frontend/Create-new-variant-type-DIP721-for-Custom-tokens branch January 7, 2026 10:39
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