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

pkSignature method of Builders throw wrong errors when PK not found #13

Open
PaulBernier opened this issue Oct 25, 2019 · 0 comments
Open
Labels
bug Something isn't working

Comments

@PaulBernier
Copy link
Contributor

PaulBernier commented Oct 25, 2019

Those conditions are always true:
https://github.com/Factom-Asset-Tokens/fat-js/blob/development/0/TransactionBuilder.js#L281
https://github.com/Factom-Asset-Tokens/fat-js/blob/development/1/TransactionBuilder.js#L307
because findIndex returns -1 when the element is not found: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
Because of that the method with throw Cannot set property 'publicKey' of undefined which is hard to interpret for a user of the library.

@PaulBernier PaulBernier added the bug Something isn't working label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant