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

Invalid Address Error #532

Closed
lnbc1QWFyb24 opened this issue May 30, 2019 · 4 comments
Closed

Invalid Address Error #532

lnbc1QWFyb24 opened this issue May 30, 2019 · 4 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@lnbc1QWFyb24
Copy link

When using the JsonRpcSigner without providing a addressOrIndex an error is thrown. If no value is passed in, the addressOrIndex is reassigned to 0. Then addressOrIndex is evaluated as to whether it is "truthy" in this if block:

Due to JavaScript coercion, 0 evaluates to a "falsey" value and the _index property is never assigned in this line:

defineReadOnly(this, "_index", addressOrIndex);

@ricmoo
Copy link
Member

ricmoo commented May 31, 2019

Eek! You're correct; this is a bug in the v5 beta branch. I'll fix this right away.

ricmoo added a commit that referenced this issue Jun 1, 2019
@ricmoo
Copy link
Member

ricmoo commented Jun 1, 2019

This should be fixed in the latest version. Please make sure you remove the node_modules folder and redo an npm install, since the beta version does not peg the dependency versions.

Let me know if you have any problems. :)

@ricmoo
Copy link
Member

ricmoo commented Jun 4, 2019

Closing now, but feel free to re-open if you continue having issues. Also, I monitor closed issues.

Thanks! :)

@ricmoo ricmoo closed this as completed Jun 4, 2019
@lnbc1QWFyb24
Copy link
Author

Sorry forgot to reply here! Yes fix looks all good. Thanks mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

2 participants