parent
76fab923da
commit
f1a810dcb5
@ -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) => {
|
||||
|
@ -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(); }
|
||||
|
Loading…
Reference in New Issue
Block a user