the-sa-club/sa-score-pitstop

Fix loading of ship metadata every 20 secs

Opened this issue · 0 comments

At the moment pitstop frontend requests NFT metadata for every individual ship with a separate request. And it does so every 20 secs.

image

These actions can be optimized into 1 request only.

Just make a request to this api:

https://api.staratlas.club/nfts?category=ship

It will give you metadata for all the ships in 1 request.

Also the metadata for the ships doesn't change every 20 secs, a new ship doesn't appear more often than once a week, so i guess there is no need to re-request this info every 20 seconds, once an hour is more than enough imho.

Because metadata on the ship appears in the json api DAYS before you can buy the ship on the market and hence stake it. So even once an hour is an overkill.