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

Add health indicator for each asset #191

Open
4 tasks
shrnkld opened this issue Jun 9, 2023 · 0 comments
Open
4 tasks

Add health indicator for each asset #191

shrnkld opened this issue Jun 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@shrnkld
Copy link
Contributor

shrnkld commented Jun 9, 2023

Scenario:

XLite currently displays various assets without any indication of their "health" status. We want to improve this by adding a check for each asset and displaying an indicator based on the result of this check.

Suggested solution:

  • Use the getBlockHash(height) method from the rpc-controller.js or modules_rpc-controller.js file to check the blockchain height for each asset periodically. This method returns the hash of a block at a given height.
  • Make this check every 30 seconds for each asset.
  • If an asset is online (a non-null hash is returned), no additional indicator is necessary.
  • If an asset is offline (an empty hash or null is returned), display an indicator next to the asset.
  • This indicator should include a message stating "This asset is currently offline!", and a warning icon (design and assets to follow)
  • The health check and the indicator should be added to the asset rendering section of the code (possibly in the balance.js component)
  • add a method to handle any errors or exceptions in the health check.

QA

  • A health check should be performed for each asset every 30 seconds.
  • If an asset is offline, an indicator with an appropriate message and icon is displayed next to the asset.
  • If an asset is online, no additional indicator is displayed.
  • The application should handle any exceptions or errors in the health check and prevent any crash or major disruption.

NB: we should ensure that the frequency of the health checks do not negatively impact the application's performance. If necessary, we will adjust the check interval or implement a method to stagger the checks for different assets (eg only checking when a user views an asset).

@shrnkld shrnkld converted this from a draft issue Jun 9, 2023
@shrnkld shrnkld added the enhancement New feature or request label Jun 9, 2023
@shrnkld shrnkld self-assigned this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

1 participant