Skip to content

Commit

Permalink
V15 conversion type unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed Aug 29, 2023
1 parent efd9b47 commit ce2497e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/types/src/metadata/v14/toV15.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export function toV15 (registry: Registry, v14: MetadataV14, _: number): Metadat
return registry.createTypeUnsafe('MetadataV15', [
unchecked
? objectSpread({}, v14, {
extrinsic: registry.createTypeUnsafe('ExtrinsicMetadataV15', [
objectSpread({}, v14.extrinsic, {
addressType: unchecked.type.params[0],
callType: unchecked.type.params[1],
extraType: unchecked.type.params[3],
signatureType: unchecked.type.params[2]
})
])
extrinsic: registry.createTypeUnsafe('ExtrinsicMetadataV15', [{
addressType: unchecked.type.params[0].type.unwrapOr(0),
callType: unchecked.type.params[1].type.unwrapOr(0),
extraType: unchecked.type.params[3].type.unwrapOr(0),
signatureType: unchecked.type.params[2].type.unwrapOr(0),
signedExtensions: v14.extrinsic.signedExtensions,
version: v14.extrinsic.version
}])
})
: v14
]);
Expand Down

0 comments on commit ce2497e

Please sign in to comment.