ndk icon indicating copy to clipboard operation
ndk copied to clipboard

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

Open sabhas opened this issue 8 months ago • 0 comments

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.

sabhas avatar Jun 06 '24 08:06 sabhas