-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix not loaded balances on failed imported (#5555)
# Motivation When testing under real network conditions (not locally), there’s a high chance that when a call fails, some unrelated balances in the tokens table will display a loading state, even though all of them were successfully loaded. The reason for this behaviour is that, on a failed call (e.g. failed imported token) in the `loadAccounts` function, the whole accounts store gets reset. To reproduce, there should be at least one failed imported token in the table. Presumably, this was implemented this way because initially, [only a single ICRC1 token](https://github.com/dfinity/nns-dapp/pull/1918/files#diff-4be3667b0d4ed46a702674d48f6e1e4c2b18ef0bf68e2e89170d78ea1bf22758R48) was supported by the NNS dapp. To avoid this, we now reset the store only for the failed account. # Changes - Added `resetUniverse` to `icrcAccountsStore`. - Use `resetUniverse` instead of `reset` on failed account call. # Tests - Updated. # Todos - [ ] Add entry to changelog (if necessary). Not necessary.
- Loading branch information
1 parent
6f0e85f
commit 0521511
Showing
4 changed files
with
95 additions
and
1 deletion.
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
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