su-squares / tenthousandsu.com

Live website for tenthousandsu.com
3 stars 3 forks source link

Personalize page: show how many free are left #16

Closed fulldecent closed 3 years ago

fulldecent commented 3 years ago

Would it be possible to include information about how many free personalize's are left on a square? (does this persist when changing ownership?)

fulldecent commented 3 years ago

This is actually not so simple yet.

If you own 100 Squares then loading the personalize page requires 100 HTTP requests, one each. This is because ERC-721 tokenOfOwnerByIndex must be called one time each. Sorry!

So if we are also to get the personalization state for each image, this will require an additional call to suSquares(N) to get it.

That means 200 requests to Infura. So I'm not sure if we want to do that yet.

fulldecent commented 3 years ago

Fixed at 9830d661173a9cb02541bea3e932a2379c893c13