+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix conversion of metadata prior to <= V11 to V14
|
||||
- Fix conversion of metadata prior to V12 to latest
|
||||
- Allow for correct handling of `Option<Null>` types
|
||||
- Adjust for bundlers where `import.meta.url` is undefined
|
||||
|
||||
|
||||
@@ -11,13 +11,9 @@ export function toV12 (registry: Registry, { extrinsic, modules }: MetadataV11):
|
||||
return registry.createTypeUnsafe('MetadataV12', [{
|
||||
extrinsic,
|
||||
modules: modules.map((mod): ModuleMetadataV12 =>
|
||||
// ensure that we unwrap all options (conversion is problematic otherwise)
|
||||
registry.createTypeUnsafe('ModuleMetadataV12', [{
|
||||
...mod,
|
||||
calls: mod.calls.unwrapOr(null),
|
||||
events: mod.events.unwrapOr(null),
|
||||
index: 255,
|
||||
storage: mod.storage.unwrapOr(null)
|
||||
index: 255
|
||||
}])
|
||||
)
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user