diff --git a/javascript/packages/orchestrator/src/chainSpec.ts b/javascript/packages/orchestrator/src/chainSpec.ts index 41ddb10c8..cbe440b9c 100644 --- a/javascript/packages/orchestrator/src/chainSpec.ts +++ b/javascript/packages/orchestrator/src/chainSpec.ts @@ -632,7 +632,8 @@ export function getRuntimeConfig(chainSpec: any) { // runtime_genesis_config is no longer in ChainSpec after rococo runtime rework (refer to: https://github.com/paritytech/polkadot-sdk/pull/1256) // ChainSpec may contain a RuntimeGenesisConfigPatch return ( - chainSpec.genesis.runtimeGenesisConfigPatch || + chainSpec.genesis.runtimeGenesis?.config || + chainSpec.genesis.runtimeGenesis?.patch || chainSpec.genesis.runtime?.runtime_genesis_config || chainSpec.genesis.runtime ); diff --git a/javascript/packages/orchestrator/src/paras.ts b/javascript/packages/orchestrator/src/paras.ts index b17d05184..3e2fc4006 100644 --- a/javascript/packages/orchestrator/src/paras.ts +++ b/javascript/packages/orchestrator/src/paras.ts @@ -107,9 +107,14 @@ export async function generateParachainFiles( if (plainData.genesis.runtime?.parachainInfo?.parachainId) plainData.genesis.runtime.parachainInfo.parachainId = parachain.id; else if ( - plainData.genesis.runtimeGenesisConfigPatch?.parachainInfo?.parachainId + plainData.genesis.runtimeGenesis?.patch?.parachainInfo?.parachainId ) - plainData.genesis.runtimeGenesisConfigPatch.parachainInfo.parachainId = + plainData.genesis.runtimeGenesis.patch.parachainInfo.parachainId = + parachain.id; + else if ( + plainData.genesis.runtimeGenesis?.config?.parachainInfo?.parachainId + ) + plainData.genesis.runtimeGenesis.config.parachainInfo.parachainId = parachain.id; writeChainSpec(chainSpecFullPathPlain, plainData);