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

Error occurs when calling last page of token holders api #123

Open
dearwish opened this issue Dec 6, 2021 · 0 comments
Open

Error occurs when calling last page of token holders api #123

dearwish opened this issue Dec 6, 2021 · 0 comments

Comments

@dearwish
Copy link

dearwish commented Dec 6, 2021

There is an error that is caused by a missing null check at onError function

I am calling the web3Data.token.getHolders like this:

      const tokenHolders = await web3Data.token.getHolders(address, {
        page: this.#pageNumber,
        size: this.#pageSize
      });

And then I receive an error:

Stack trace: TypeError: Cannot read property 'data' of undefined
    at onError (C:\work\deep_load_data\node_modules\web3data-js\src\utils.js:72:30)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async AmberdataTokenHoldersIterator.getItems (C:\work\deep_load_data\integrations\amberdata\amberdata.iterator.js:28:28)       
    at async TokenHoldersIterator.getItems (C:\work\deep_load_data\loaders\token-holders\token-holders.iterator.js:24:21)
    at async syncTokenHolders (C:\work\deep_load_data\loaders\token-holders\syncTokenHolders.js:38:27)
    at async syncSingleAddressTokenHolders (C:\work\deep_load_data\loaders\token-holders\syncTokenHolders.js:176:13)
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