Skip to content

Commit

Permalink
Fixed typo in error messages (ethers-io#3822, ethers-io#3824).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 147afa4 commit 3cef83f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src.ts/abi/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand All @@ -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");
}
Expand All @@ -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");
}
Expand All @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src.ts/crypto/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down

0 comments on commit 3cef83f

Please sign in to comment.