Skip to content

Commit fcbbb3d

Browse files
committed
fix: parse node url when start a bot
1 parent f40f1cc commit fcbbb3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

yarn-project/aztec/src/cli/cmds/start_bot.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export async function startBot(
2727
}
2828

2929
const fetch = makeTracedFetch([1, 2, 3], true);
30-
const node = createAztecNodeClient(options.nodeUrl, getVersions(), fetch);
30+
const config = extractRelevantOptions<BotConfig>(options, botConfigMappings, 'bot');
31+
if (!config.nodeUrl) {
32+
throw new Error('The bot requires access to a Node');
33+
}
34+
35+
const node = createAztecNodeClient(config.nodeUrl, getVersions(), fetch);
3136

3237
// Start a PXE client that is used by the bot if required
3338
let pxe: PXE | undefined;

0 commit comments

Comments
 (0)