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

feat(frontend): different warning for non-working index canister #3758

Conversation

AntonioVentilii
Copy link
Collaborator

Motivation

For ICRC tokens that have the index canister but it is not working, we want to show a different message.

Changes

  • Add new icon and new warning message.
  • Change IcNoIndexPlaceHolder to accept a prop that defines if the index is either missing or not-working.
  • Adapt IcTransactions component.

Tests

I simulated ckSepoliaUSDC with a wrong index canister,

Screenshot 2024-11-26 at 13 07 53

AntonioVentilii added a commit that referenced this pull request Nov 26, 2024
# Motivation

It may happen that an ICRC token has an Index Canister but it is not
working. For example, it is out of cycles.

In those cases, we don't want to show an error anymore, but leverage the
same wallet service used for tokens without Index Canister.

That means, that in those cases, we will just fetch the balance, and
show an explanatory warning for not having the transacitons.

# Changes

- Change function `onLoadTransactionsError` to accept a fallback
function.
- If the error is raised during the ICRC transaction fetching, the
fallback restarts the worker, but providing only the lLedger Canister,
and not the Index Canister. This will allow the service to treat it in
the same way of a token without index canister (i.e. fetching balance
only).

# Note

The changes in the UI will be done with:

- PR #3758 

# Tests

I simulated a wrong index canister in the local replica for
ckSepoliaUSDC. In the video we can see how I switch between the correct
Index canister and the wrong one, back and forth.



https://github.com/user-attachments/assets/f007e592-bd26-4dcb-88b4-b6cbb7b19d33
@AntonioVentilii AntonioVentilii marked this pull request as ready for review November 26, 2024 15:00
@AntonioVentilii AntonioVentilii requested a review from a team as a code owner November 26, 2024 15:00
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 798262f into main Nov 27, 2024
18 checks passed
@AntonioVentilii AntonioVentilii deleted the feat(frontend)/different-feedback-for-non-working-index-canister branch November 27, 2024 13:02
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