spacemeshos / smapp-lite

The light wallet application for Spacemesh network
3 stars 2 forks source link

Avoid spam requests when fetching network status or account data #89

Closed brusherru closed 1 month ago

brusherru commented 1 month ago

This fixes adds:

  1. Retry interval to fetch Node Status is 1 minute, but the interval of fetching Node Status is still 5 minutes.
  2. Account data won't be fetched until Node Status is not retrieved. It prevents spamming to the unresponsive API endpoint.
  3. Even if Node Status is retrieved and layerDurationSec is 0 there will be a minimum fetch interval, which is equal to 10 seconds right now. We may set up the higher number, but it may make sense to allow using less value for a Standalone node (but it is not a case of the standard User).
github-actions[bot] commented 1 month ago

You can preview the changes at : https://8c87d373.smapp-lite-prod.pages.dev

github-actions[bot] commented 1 month ago

You can preview the changes at : https://444292b0.smapp-lite-prod.pages.dev