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

Basic Imported Tokens Modal #5264

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Conversation

mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Jul 31, 2024

Motivation

We need to implement a modal for importing custom tokens. This modal will consist of two steps:

  1. Step 1: The user can enter a ledger canister ID and, optionally, an index canister ID.
  2. Step 2: After clicking the “Next” button, a review step will display the entered IDs and the token’s meta information. If the dapp fails to load the meta information, the user will remain on the first step and an error toast will be shown.

Note: This PR does not include index canister validation or saving the imported token in the NNS-dapp canister.

Import button (existed) Step 1 Step 2
Screenshot 2024-07-31 at 15 56 34 Screenshot 2024-07-31 at 15 56 51 Screenshot 2024-07-31 at 15 57 01

Changes

  • New components:
    • ImportTokenModal
      • step 1: ImportTokenForm
      • step 2: ImportTokenReview
  • fetchIcrcTokenMetaData service.
  • Open ImportTokenModal on "Import Token" button click.

Tests

  • Manually agains localhost.
  • Added unit tests for new components.

Todos

  • Add entry to changelog (if necessary).
    Not yet.

@mstrasinskis mstrasinskis changed the title Imported tokens modal Basic Imported Tokens Modal Jul 31, 2024
@mstrasinskis mstrasinskis marked this pull request as ready for review July 31, 2024 14:03
@mstrasinskis mstrasinskis requested a review from a team as a code owner July 31, 2024 14:03
@mstrasinskis mstrasinskis marked this pull request as draft August 5, 2024 07:37
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