From fc2ffca243cadae428a7b700a4c8123db6ceb491 Mon Sep 17 00:00:00 2001 From: Tim B <79199034+timbrinded@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:45:36 +0000 Subject: [PATCH] fix createblock (#358) --- .changeset/orange-olives-matter.md | 5 +++++ packages/cli/src/internal/foundations/devModeHelpers.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/orange-olives-matter.md diff --git a/.changeset/orange-olives-matter.md b/.changeset/orange-olives-matter.md new file mode 100644 index 00000000..1c630436 --- /dev/null +++ b/.changeset/orange-olives-matter.md @@ -0,0 +1,5 @@ +--- +"@moonwall/cli": patch +--- + +CreateBlock fix diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index 295a1688..e467d079 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -141,8 +141,8 @@ export async function createDevBlock< section == "ethereum" && method == "Executed" && data[2].toString() == result.hash - )! - .phase!.asApplyExtrinsic!.toString() + ) + ?.phase?.asApplyExtrinsic?.toString() || "-1" ) : blockData.block.extrinsics.findIndex((ext) => ext.hash.toHex() == result.hash); // We retrieve the events associated with the extrinsic