Fix StagingXcmV5Junctions generation (#6145)

* Fix StagingXcmV5

* lint
This commit is contained in:
Valentin Fernandez
2025-05-13 12:28:12 -03:00
committed by GitHub
parent 48bb6dd339
commit bb8320ab2f
2 changed files with 14 additions and 10 deletions
+6 -2
View File
@@ -59,8 +59,12 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
// type as the parent we can take the lookupName from the sub.
// This is specific to `StagingXcmV4Junction`.
// see: https://github.com/polkadot-js/api/pull/5812
if (sub && !Array.isArray(sub) && type.includes(`${sub.type};`) && (sub.lookupName === 'StagingXcmV4Junction' || sub.lookupName === 'StagingXcmV5Junction')) {
extractedLookupName = sub.lookupName;
if (sub && !Array.isArray(sub) && type.includes(`${sub.type};`)) {
if (sub.lookupName === 'StagingXcmV4Junction') {
extractedLookupName = sub.lookupName;
} else if (sub.lookupName === 'StagingXcmV5Junction') {
extractedLookupName = `Vec<${sub.lookupName}>`;
}
}
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct