From 3cef83fdf64e861df9bf4e399b2f6e8176897323 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 28 Feb 2023 21:18:27 -0500 Subject: [PATCH] Fixed typo in error messages (#3822, #3824). --- src.ts/abi/fragments.ts | 8 ++++---- src.ts/crypto/signature.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src.ts/abi/fragments.ts b/src.ts/abi/fragments.ts index 0c8aa45abe..c68de00283 100644 --- a/src.ts/abi/fragments.ts +++ b/src.ts/abi/fragments.ts @@ -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>, 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) => { diff --git a/src.ts/crypto/signature.ts b/src.ts/crypto/signature.ts index a189c70294..4e73d992a2 100644 --- a/src.ts/crypto/signature.ts +++ b/src.ts/crypto/signature.ts @@ -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(); }