Skip to content

Commit

Permalink
Merge pull request #293 from Tonomy-Foundation/feature/281-passphrase…
Browse files Browse the repository at this point in the history
…-words

Feature/281 passphrase words Fixed random number genrate function
  • Loading branch information
sadiabbasi authored Sep 7, 2023
2 parents 894e6c8 + 1c9524f commit 1f57fe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sdk/util/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function randomNumber(min: number, max: number): number {

const randomBytesArray = randomBytes(calculateByte);

const randomValue = (byteArrayToNumber(randomBytesArray) % range) + min;
const randomValue = (byteArrayToNumber(randomBytesArray) % (range + 1)) + min;

return randomValue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/util/passphrase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function generateRandomKeywords(): string[] {
*/
export function generateAutoSuggestions(inputString: string): string[] {
if (inputString.trim() === '') {
return []; // Return an empty array for empty input
return []; // Return an empty array for empty input string
}

inputString = inputString.toLowerCase();
Expand Down

0 comments on commit 1f57fe4

Please sign in to comment.