Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Constructor of NDKNip46Backend class throws "Invalid signer" when hex string is provided for privateKeyOrSigner argument #236

Open
sabhas opened this issue Jun 6, 2024 · 0 comments

Comments

@sabhas
Copy link

sabhas commented Jun 6, 2024

The condition here in the constructor of the NDKNip46Backend class always evaluates to false because a hex string is not an instance of the String class. Consequently, passing a hex string for the privateKeyOrSigner argument results in an "Invalid signer" error.

Modify the condition to properly check if privateKeyOrSigner is a hex string by using a more appropriate method, such as checking the type with typeof or using a regular expression to validate hex string format.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant