6.0.5 (#3977)
This commit is contained in:
@@ -24,7 +24,12 @@ function entrySignature (lookup: PortableRegistry, allDefs: Record<string, Modul
|
||||
if (storageEntry.type.isPlain) {
|
||||
const typeDef = lookup.getTypeDef(storageEntry.type.asPlain);
|
||||
|
||||
setImports(allDefs, imports, [typeDef.lookupName || typeDef.type]);
|
||||
setImports(allDefs, imports, [
|
||||
typeDef.lookupName || typeDef.type,
|
||||
storageEntry.modifier.isOptional
|
||||
? 'Option'
|
||||
: null
|
||||
]);
|
||||
|
||||
return [storageEntry.modifier.isOptional, '', '', formatType(registry, allDefs, outputType, imports)];
|
||||
} else if (storageEntry.type.isMap) {
|
||||
@@ -38,6 +43,9 @@ function entrySignature (lookup: PortableRegistry, allDefs: Record<string, Modul
|
||||
|
||||
setImports(allDefs, imports, [
|
||||
...similarTypes.reduce<string[]>((all, t) => all.concat(t), []),
|
||||
storageEntry.modifier.isOptional
|
||||
? 'Option'
|
||||
: null,
|
||||
defValue.lookupName
|
||||
? undefined
|
||||
: defValue.type
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '6.0.4' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '6.0.5' };
|
||||
|
||||
Reference in New Issue
Block a user