Fixed typo in error messages (#3822, #3824).

This commit is contained in:
Richard Moore 2023-02-28 21:18:27 -05:00
parent 76fab923da
commit f1a810dcb5
2 changed files with 5 additions and 5 deletions

View File

@ -689,7 +689,7 @@ export class ParamType {
*/
walk(value: any, process: ParamTypeWalkFunc): any {
if (this.isArray()) {
if (!Array.isArray(value)) { throw new Error("invlaid array value"); }
if (!Array.isArray(value)) { throw new Error("invalid array value"); }
if (this.arrayLength !== -1 && value.length !== this.arrayLength) {
throw new Error("array is wrong length");
}
@ -698,7 +698,7 @@ export class ParamType {
}
if (this.isTuple()) {
if (!Array.isArray(value)) { throw new Error("invlaid tuple value"); }
if (!Array.isArray(value)) { throw new Error("invalid tuple value"); }
if (value.length !== this.components.length) {
throw new Error("array is wrong length");
}
@ -712,7 +712,7 @@ export class ParamType {
#walkAsync(promises: Array<Promise<void>>, value: any, process: ParamTypeWalkAsyncFunc, setValue: (value: any) => void): void {
if (this.isArray()) {
if (!Array.isArray(value)) { throw new Error("invlaid array value"); }
if (!Array.isArray(value)) { throw new Error("invalid array value"); }
if (this.arrayLength !== -1 && value.length !== this.arrayLength) {
throw new Error("array is wrong length");
}
@ -738,7 +738,7 @@ export class ParamType {
} else {
if (value == null || typeof(value) !== "object") {
throw new Error("invlaid tuple value");
throw new Error("invalid tuple value");
}
result = components.map((param) => {

View File

@ -299,7 +299,7 @@ export class Signature {
return new Signature(_guard, r, hexlify(s), v);
}
assertError(false, "invlaid raw signature length");
assertError(false, "invalid raw signature length");
}
if (sig instanceof Signature) { return sig.clone(); }