The countdown for the network upgrade banner needed improvement. Im adding it as a seperate component here
It is following the same logic as the countdown on avalanche.cash, and using the avalanche.cash API
The basic idea is it fetches the api on load
- if it fails it doesnt load the banner
- if we get a response it sets the timestamp for the countdown, and get the blocksUntilUpgrade
- once the timestamp is reached there is another method to start polling the API every 60s to get the blocksUntilUpgrade
- Once this value is < 0 the network upgrade is considerd finished, the final text is shown and the polling stops