Merged
Conversation
198b433 to
9764e17
Compare
05eabd0 to
da02fc9
Compare
Coverage
|
| * @param {Signature} message - The message to verify. | ||
| * @returns {boolean} true if valid, false otherwise. | ||
| */ | ||
| verify(signature: Signature, message: Message): boolean { |
Contributor
There was a problem hiding this comment.
The JSDoc of this function has swapped types for the parameters.
Change to:
/**
* Verifies a signature using the wallet's public key.
* @param {Signature} signature - The signature to verify.
* @param {Message} message - The message to verify.
* @returns {boolean} true if valid, false otherwise.
*/| * @returns {Promise<void>} | ||
| * @throws {Error} If required parameters are missing or invalid. | ||
| */ | ||
| export const importFromFile = async (filePath: string, password: Buffer | Uint8Array = b4a.alloc(0)): Promise<IWallet | IHDWallet> => { |
Contributor
There was a problem hiding this comment.
The return type for this function looks wrong in the JSDoc
src/wallet.ts
Outdated
| const sanitizeMnemonic = (mnemonic: string) => { | ||
| const sanitized = tracCryptoApi.mnemonic.sanitize(mnemonic) | ||
| if (sanitized === null) { | ||
| throw new Error('Invalid secret key format. Please provide a valid hex string'); |
Contributor
There was a problem hiding this comment.
This error message looks wrong. We say we have an invalid secret key format instead of invalid mnemonic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.