-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error state to icpSwapUsdPricesStore (#5953)
# Motivation We loaded token prices from ICP Swap. If this results in an error, we want to show `-/-` as USD values and show an error state with tooltip. There can be 2 reasons why there is an error: 1. Fetching the ICP Swap data fails. 2. Parsing the ICP Swap data fails. In this PR we add an extra possible `"error"` value to the derived store `icpSwapUsdPricesStore` and use it if parsing the ICP Swap data fails. # Changes 1. Set `icpSwapUsdPricesStore` to `"error"` if there is an error when parsing ICP Swap tickers or if there is an unreasonable value. # Tests Unit tests added. # Todos - [ ] Add entry to changelog (if necessary). not yet
- Loading branch information
Showing
5 changed files
with
139 additions
and
51 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
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