Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async-ify NFT ownership verification and image retrieval #11

Open
NoahSaso opened this issue Mar 6, 2024 · 0 comments
Open

Async-ify NFT ownership verification and image retrieval #11

NoahSaso opened this issue Mar 6, 2024 · 0 comments

Comments

@NoahSaso
Copy link
Member

NoahSaso commented Mar 6, 2024

Right now, NFT ownership is validated and the image is fetched on every profile query. This is redundant and slow.

Let's move both of those processes elsewhere, out of the profile query itself.

One solution is to move NFT ownership and NFT image fetching to our Snapper instance, which will cache the requests and handle updating them on the specified interval automatically.

Alternatively, to avoid external dependencies, we can build a system right into pfpk:

  • store image on NFT update
  • create route that verifies NFT ownership and removes it from the profile if no longer owned by the wallet
  • asynchronously fire that request whenever a profile is queried, optimistically returning the NFT but updating it in the background for next time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant