sol-rayz icon indicating copy to clipboard operation
sol-rayz copied to clipboard

limit is missing from useWalletNfts hook

Open 0xdeepmehta opened this issue 2 years ago • 2 comments

There is no filed as limit in this hook type

export declare type Options = {
    /**
     * Wallet public address
     */
    publicAddress: StringPublicKey;
    /**
     * Optionally provide your own connection object.
     * Otherwise createConnectionConfig() will be used
     */
    connection?: Connection;
    /**
     * Remove possible rust's empty string symbols `\x00` from the values,
     * which is very common issue.
     * Default is true
     */
    sanitize?: boolean;
    /**
     * TODO: Add description within README and link here
     * Default is false - slow method
     * true - is fast method
     */
    strictNftStandard?: boolean;
    /**
     * Convert all PublicKey objects to string versions.
     * Default is true
     */
    stringifyPubKeys?: boolean;
    /**
     * Sort tokens by Update Authority (read by Collection)
     * Default is true
     */
    sort?: boolean;
};

Problem: As there is no limit constraint in it. It's currently fetching all of the nft from the wallet. For example, I have a wallet which has a ~10K nfts, sadly it is fetching all of them at once, making the browser stuck & hanged.

Screenshot 2022-05-12 at 1 29 55 PM

Q: How can I use the limit here @jamland?

0xdeepmehta avatar May 12 '22 08:05 0xdeepmehta

It would be indeed good to use some limit and an offset

kobyle69 avatar May 15 '22 08:05 kobyle69

hmmm will check what cand we do

VeritasV avatar Jun 18 '22 21:06 VeritasV

Stale issue message

github-actions[bot] avatar Aug 18 '22 04:08 github-actions[bot]