Skip to content

Commit

Permalink
fix(orchestrator): Allow to run chains without balances pallet (#1220) (
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola authored Aug 7, 2023
1 parent b6bd5b1 commit 62838d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions javascript/packages/orchestrator/src/chainSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ export async function addBalances(specPath: string, nodes: Node[]) {
try {
const chainSpec = readAndParseChainSpec(specPath);
const runtimeConfig = getRuntimeConfig(chainSpec);
if (!runtimeConfig.balances) {
console.error(
`\n 🚧 ${decorators.yellow(
"NO 'balances' key in runtimeConfig, skipping...",
)} 🚧 \n`,
);
return;
}

// Create a balance map
const balanceMap = runtimeConfig.balances.balances.reduce(
(
Expand Down

0 comments on commit 62838d7

Please sign in to comment.