Skip to content

Add health indicator for each asset #191

Description

@sh-rn

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).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions