From ef6f7c0c6afcc46e7463d18c00fa99c7cafcae65 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 3 Sep 2024 11:09:45 +0100 Subject: [PATCH] fix(cli): add missing await (#3119) --- .changeset/shy-walls-suffer.md | 5 +++++ packages/cli/src/deploy/ensureModules.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/shy-walls-suffer.md diff --git a/.changeset/shy-walls-suffer.md b/.changeset/shy-walls-suffer.md new file mode 100644 index 0000000000..4d44724fd5 --- /dev/null +++ b/.changeset/shy-walls-suffer.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/cli": patch +--- + +Fixed regression in 2.2.1 where deployment of modules already installed would throw an error instead of skipping. diff --git a/packages/cli/src/deploy/ensureModules.ts b/packages/cli/src/deploy/ensureModules.ts index 49ed384147..04b20c2433 100644 --- a/packages/cli/src/deploy/ensureModules.ts +++ b/packages/cli/src/deploy/ensureModules.ts @@ -45,7 +45,7 @@ export async function ensureModules({ const params = mod.installAsRoot ? ({ functionName: "installRootModule", args: [moduleAddress, mod.installData] } as const) : ({ functionName: "installModule", args: [moduleAddress, mod.installData] } as const); - return writeContract(client, { + return await writeContract(client, { chain: client.chain ?? null, address: worldDeploy.address, abi,