Handle plain multi queries diguised as map-form (#4011)

This commit is contained in:
Jaco
2021-10-01 11:29:12 +03:00
committed by GitHub
parent 651afaeb9a
commit 668ad3dfe5
2 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ export function unwrapStorageType (registry: Registry, type: StorageEntryTypeLat
}
/** @internal */
function decodeStorageKey (registry: Registry, value?: string | Uint8Array | StorageKey | StorageEntry | [StorageEntry, unknown[]?]): Decoded {
function decodeStorageKey (value?: string | Uint8Array | StorageKey | StorageEntry | [StorageEntry, unknown[]?]): Decoded {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
if (value instanceof StorageKey) {
return {
@@ -174,7 +174,7 @@ export class StorageKey<A extends AnyTuple = AnyTuple> extends Bytes implements
private _section?: string;
constructor (registry: Registry, value?: string | Uint8Array | StorageKey | StorageEntry | [StorageEntry, unknown[]?], override: Partial<StorageKeyExtra> = {}) {
const { key, method, section } = decodeStorageKey(registry, value);
const { key, method, section } = decodeStorageKey(value);
super(registry, key);