-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Motivation Currently, on the tokens page, there is a flag-based mechanism to prevent reloading of token data ([here](https://github.com/dfinity/nns-dapp/blob/001f6f4f3a79889045fd262f75052d4992824c47/frontend/src/routes/(app)/(nns)/tokens/%2Bpage.svelte#L69) and [here](https://github.com/dfinity/nns-dapp/blob/001f6f4f3a79889045fd262f75052d4992824c47/frontend/src/routes/(app)/(nns)/tokens/%2Bpage.svelte#L83)). This is applied to the Sns and ckBTC tokens but not to the ICRC tokens, as the ICRC token list was previously static. Now, when the dapp fails to load a token, the failed token is removed from the ICRC token list, which triggers a reload of all ICRC token data. To prevent this, we apply the same flag mechanism to avoid unnecessary reloading. # Changes - Memorize the loaded ICRC token IDs and reload only new ones. # Tests - Tested that there is no data reload after an imported token fails and verified that the test fails without the fix. # Todos - [ ] Add entry to changelog (if necessary). Not necessary.
- Loading branch information
1 parent
d1cb9be
commit 76f74fe
Showing
2 changed files
with
76 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters