Skip to content

Commit

Permalink
fix(orchestrator): add 'hrmp' key if missing in the chain-spec (#1618)
Browse files Browse the repository at this point in the history
* fix(orchestrator): add 'hrmp' key if missing in the chain-spec

* lint
  • Loading branch information
pepoviola authored Dec 24, 2023
1 parent 8878b10 commit cb8b076
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions javascript/packages/orchestrator/src/chainSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,14 @@ export async function addHrmpChannelsToGenesis(
// For retro-compatibility with substrate pre Polkadot 0.9.5
else if (runtimeConfig.parachainsHrmp) {
hrmp = runtimeConfig.parachainsHrmp;
} else {
// No hrmp key in the current chain-spec
// let's create the struct and assign
runtimeConfig["hrmp"] = {
preopenHrmpChannels: [],
};

hrmp = runtimeConfig.hrmp;
}

if (hrmp && hrmp.preopenHrmpChannels) {
Expand Down

0 comments on commit cb8b076

Please sign in to comment.