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
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).
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:
getBlockHash(height) method from therpc-controller.jsormodules_rpc-controller.jsfile to check the blockchain height for each asset periodically. This method returns the hash of a block at a given height.balance.jscomponent)QA
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).