Fix: Spelling errors in the code repository
This commit is contained in:
parent
1528374b83
commit
240428daf9
@ -2093,7 +2093,7 @@ export function entropyToMnemonic(entropy: Uint8Array): string {
|
||||
return words.join(" ");
|
||||
}
|
||||
|
||||
const invalidNumberOfWorks = "Invalid number of words";
|
||||
const invalidNumberOfWords = "Invalid number of words";
|
||||
const wordNotInWordlist = "Found word that is not in the wordlist";
|
||||
const invalidEntropy = "Invalid entropy";
|
||||
const invalidChecksum = "Invalid mnemonic checksum";
|
||||
@ -2105,7 +2105,7 @@ function normalize(str: string): string {
|
||||
export function mnemonicToEntropy(mnemonic: string): Uint8Array {
|
||||
const words = normalize(mnemonic).split(" ");
|
||||
if (!allowedWordLengths.includes(words.length)) {
|
||||
throw new Error(invalidNumberOfWorks);
|
||||
throw new Error(invalidNumberOfWords);
|
||||
}
|
||||
|
||||
// convert word indices to 11 bit binary strings
|
||||
|
||||
@ -71,7 +71,7 @@ export class Webserver {
|
||||
if (entry.getTime() + cooldownTimeMs > Date.now()) {
|
||||
throw new HttpError(
|
||||
405,
|
||||
`Too many request for the same address. Blocked to prevent draining. Please wait ${constants.cooldownTime} seconds and try it again!`,
|
||||
`Too many requests for the same address. Blocked to prevent draining. Please wait ${constants.cooldownTime} seconds and try it again!`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@ import { HdPath, stringToPath } from "@cosmjs/crypto";
|
||||
export type PathBuilder = (account_index: number) => HdPath;
|
||||
|
||||
/**
|
||||
* Insert a BIP32 path that contains a valiable `a` for the numeric account index.
|
||||
* This variable will be replaces when the path builder is used.
|
||||
* Insert a BIP32 path that contains a variable `a` for the numeric account index.
|
||||
* This variable will be replaced when the path builder is used.
|
||||
*
|
||||
* @param pattern, e.g. m/44'/148'/a' for Stellar paths
|
||||
*/
|
||||
|
||||
@ -48,7 +48,7 @@ export class Uint32 implements Integer, WithByteConverters {
|
||||
|
||||
const beBytes = endianess === "be" ? bytes : Array.from(bytes).reverse();
|
||||
|
||||
// Use mulitiplication instead of shifting since bitwise operators are defined
|
||||
// Use multiplication instead of shifting since bitwise operators are defined
|
||||
// on SIGNED int32 in JavaScript and we don't want to risk surprises
|
||||
return new Uint32(beBytes[0] * 2 ** 24 + beBytes[1] * 2 ** 16 + beBytes[2] * 2 ** 8 + beBytes[3]);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user