subscribeStorage parameter should be optional (#2208)

This commit is contained in:
Xiliang Chen
2020-04-26 13:32:43 +02:00
committed by GitHub
parent 40d035eca7
commit 932122cd21
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export default function generateRpcTypes (dest = 'packages/api/src/augment/rpc.t
} else if (methodName === 'queryStorageAt') {
return createDocComments(6, [def.description]) + indent(6)(`queryStorageAt: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (${StorageKeyTye})[], at?: Hash | Uint8Array | string) => Observable<T>>;`);
} else if (methodName === 'subscribeStorage') {
return createDocComments(6, [def.description]) + indent(6)(`subscribeStorage: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (${StorageKeyTye})[]) => Observable<T>>;`);
return createDocComments(6, [def.description]) + indent(6)(`subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (${StorageKeyTye})[]) => Observable<T>>;`);
}
}
@@ -328,7 +328,8 @@ export default {
params: [
{
name: 'keys',
type: 'Vec<StorageKey>'
type: 'Vec<StorageKey>',
isOptional: true
}
],
pubsub: [