Adjust Weight alias for WeightV0 injection (#5462)

* Adjust Weight alias for WeightV0 injection

* 9.13.3
This commit is contained in:
Jaco
2023-02-01 08:20:06 +02:00
committed by GitHub
parent ed426108f2
commit b9cbb9e2e8
23 changed files with 192 additions and 181 deletions
+5 -11
View File
@@ -87,17 +87,11 @@ export class Vec<T extends Codec> extends AbstractArray<T> {
this.#Type = definition || setDefinition(typeToConstructor<T>(registry, Type));
try {
this.initialU8aLength = (
isU8a(decodeFrom)
? decodeU8aVec(registry, this, decodeFrom, startAt, this.#Type)
: decodeVec(registry, this, decodeFrom, startAt, this.#Type)
)[0];
} catch (e) {
console.error(decodeFrom, length, startAt);
throw e;
}
this.initialU8aLength = (
isU8a(decodeFrom)
? decodeU8aVec(registry, this, decodeFrom, startAt, this.#Type)
: decodeVec(registry, this, decodeFrom, startAt, this.#Type)
)[0];
}
public static with<O extends Codec> (Type: CodecClass<O> | string): CodecClass<Vec<O>> {