-
Notifications
You must be signed in to change notification settings - Fork 120
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
instanceof Uint8Array returning false #175
Comments
I do not understand, |
Oops accidentally hit close. fanatid - yes correct for some reason the instanceof operator is failing for Uint8Array - sees as object for some reason. |
The workaround/fix works for me. I get the signature imported ok. |
I am having this error,
I tested for a Buffer in the console, and it works,
|
Using secp256k1 npm module within nwjs-sdk-v0.51.2-linux-x64
Result
Error: Expected signature to be an Uint8Array", source: [...]/node_modules/secp256k1/lib/index.js (18)
Origin of the Error
Root Cause
The instanceof operator returns false. The typeof operator returns object, so javascript is seeing value as an object not as a Uint8Array.
Workaround/Fix
The text was updated successfully, but these errors were encountered: