diff --git a/packages/cli/src/deploy/ensureWorldFactory.ts b/packages/cli/src/deploy/ensureWorldFactory.ts index 17586a9da1..0f4bd745ad 100644 --- a/packages/cli/src/deploy/ensureWorldFactory.ts +++ b/packages/cli/src/deploy/ensureWorldFactory.ts @@ -8,27 +8,23 @@ export async function ensureWorldFactory( deployerAddress: Hex, withWorldProxy?: boolean, ): Promise
{ - if (!withWorldProxy) { - const contracts = getWorldFactoryContracts(deployerAddress); - - // WorldFactory constructor doesn't call InitModule, only sets its address, so we can do these in parallel since the address is deterministic - await ensureContractsDeployed({ - client, - deployerAddress, - contracts: Object.values(contracts), - }); - - return contracts.WorldFactory.address; - } else { + if (withWorldProxy) { const contracts = getWorldProxyFactoryContracts(deployerAddress); - // WorldFactory constructor doesn't call InitModule, only sets its address, so we can do these in parallel since the address is deterministic await ensureContractsDeployed({ client, deployerAddress, contracts: Object.values(contracts), }); - return contracts.WorldProxyFactory.address; } + + const contracts = getWorldFactoryContracts(deployerAddress); + // WorldFactory constructor doesn't call InitModule, only sets its address, so we can do these in parallel since the address is deterministic + await ensureContractsDeployed({ + client, + deployerAddress, + contracts: Object.values(contracts), + }); + return contracts.WorldFactory.address; }