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

awaiting blockchainScripthash_getBalanceBatch hangs when an empty array is passed #3

Closed
Darkster1 opened this issue Apr 22, 2022 · 3 comments

Comments

@Darkster1
Copy link

When for some reason an empty array (with(out) scripthashes) is passed to getBalanceBatch it keeps 'waiting' until the script gets interrupted, no error is thrown it's just waiting.
I'm trying to prevent that anyways but sometimes the code makes it through to the await getBalanceBatch call.

@sisou
Copy link
Member

sisou commented Apr 23, 2022

Hi! Are you sure you are in the right repo? We don't have a getBalanceBatch method, only getBalance for a single address:

public async getBalance(address: string): Promise<Balance> {

@Darkster1
Copy link
Author

I might be mistaken but I have electrum-client and electrum-client-js installed but the require loads "electrum-client" maybe there's another with the same name then, if yours doesn't have such functions (getBalanceBatch and scripthashDetailsBatch) I guess I made a mistake, sorry will recheck the module.

@sisou
Copy link
Member

sisou commented Apr 24, 2022

electrum-client package is this: https://www.npmjs.com/package/electrum-client

This here is @nimiq/electrum-client, but it's not even on npm :D

@sisou sisou closed this as completed Apr 24, 2022
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

2 participants