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

refactor(frontend): split manage tokens services in respective networks #5040

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AntonioVentilii
Copy link
Collaborator

Motivation

To easy manageability and to prepare for more networks, we assign each manage-tokens service to each network folder.

@AntonioVentilii AntonioVentilii requested a review from a team as a code owner March 5, 2025 16:10

Choose a reason for hiding this comment

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

PR Overview

This PR refactors the manage tokens services by splitting network-specific implementations into separate folders for Ethereum and ICP.

  • Splits the previous token management service into network-specific versions.
  • Introduces saveErc20UserTokens for Ethereum while replacing the ERC20 token service in the ICP network with saveIcrcCustomTokens.

Reviewed Changes

File Description
src/frontend/src/eth/services/manage-tokens.services.ts Adds a new function saveErc20UserTokens that wraps around the generic saveTokens service using the ERC20-specific saveUserTokens method.
src/frontend/src/icp/services/manage-tokens.services.ts Removes the ERC20 token saving function and adds a new function saveIcrcCustomTokens to handle ICP custom tokens.

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

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.

1 participant