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

Make NFT lists scrollable #1380

Open
mrose17 opened this issue Mar 22, 2024 · 5 comments
Open

Make NFT lists scrollable #1380

mrose17 opened this issue Mar 22, 2024 · 5 comments
Labels

Comments

@mrose17
Copy link
Member

mrose17 commented Mar 22, 2024

We have entered an interesting era of NFTs wherein you can subscribe to services that send you NFTs daily (or more frequently). This effectively makes the "show the latest 50 NFTs" display strategy unhelpful.

Sadly, it is time to retrieve all the NFTs (filtered or not on spam_score) and present them to the user in a scrollable list.

@mrose17 mrose17 added the web3 label Mar 22, 2024
@mrose17
Copy link
Member Author

mrose17 commented Apr 4, 2024

if possible, add cached paging support to the back-end, so that once the front-end makes the first rquest, and it is returned, then we pre-fetch/cache the second page, and try to maintain 3 pages in the cache for the address we are asking about (one back, one current, one forward).

@bcaller
Copy link
Contributor

bcaller commented Apr 4, 2024

I believe this can be done all in the frontend by adding the required paging parameters to URLs like

const getNFTsURL = `${SIMPLEHASH_PROXY_ROOT_URL}/api/v0/nfts/owners_v2?chains=ethereum,solana,polygon&wallet_addresses=${encodeURIComponent(
address,
)}&order_by=spam_score__asc&limit=50`;

(except caching).

@mrose17
Copy link
Member Author

mrose17 commented Apr 4, 2024

great! i suspect it would be good to review the brave-talk-server code to make sure it sanitizes the query params so that only chains,wallet_addresses,order_by,limit and cursor.

@bcaller
Copy link
Contributor

bcaller commented Apr 5, 2024

Hmm no I'm not sure we care to do that for client requests. Proxy code is https://github.com/search?q=repo%3Abrave%2Fanon-proxy%20simplehash&type=code

@mrose17
Copy link
Member Author

mrose17 commented Apr 5, 2024

OK, let's not worry about the query parameters. Let's just make the lists scrollable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants