Closed DzhideX closed 1 year ago
- I also thought about returning
totalSupply
fromapi.calculateCirculatingSupply
as we already fetch that there as a way to optimize the fetching process but thought it'd sacrifice the modularity/readability(?) so decided against it. I'll defer judgment here and I am fine with either way.
Yes I would have gone for this approach also, but your implementation required no refactoring so it was quick and easy to review. So I'm happy with this.
Tested and works as expected.
This PR aims to implement the total supply endpoint on the status server.
Notes:
apicache
npm package and the implementation would have been much simpler but I decided to go with the current (cron) approach to make sure the two values don't go out of sync with one another. There's also the fact that the initial fetch would always be fairly slow.totalSupply
fromapi.calculateCirculatingSupply
as we already fetch that there as a way to optimize the fetching process but thought it'd sacrifice the modularity/readability(?) so decided against it. I'll defer judgment here and I am fine with either way.