From ff8d3102ac7f36b52f5c5ffa2ea02ebaeaf8ff68 Mon Sep 17 00:00:00 2001 From: Erik Marks Date: Thu, 15 Feb 2024 22:20:36 -0800 Subject: [PATCH] fix(daemon): Ensure guest store and worker nonces are unique When formula numbers were made unique, it appears we missed doing so for the guest pet store and worker. This is no longer the case. --- packages/daemon/src/daemon.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/daemon/src/daemon.js b/packages/daemon/src/daemon.js index b35578ead7..15d0b5c214 100644 --- a/packages/daemon/src/daemon.js +++ b/packages/daemon/src/daemon.js @@ -372,8 +372,10 @@ const makeEndoBootstrap = async ( context, ); } else if (formula.type === 'guest') { - const storeFormulaIdentifier = `pet-store:${formulaNumber}`; - const workerFormulaIdentifier = `worker:${formulaNumber}`; + const storeFormulaNumber = derive(formulaNumber, 'pet-store'); + const storeFormulaIdentifier = `pet-store:${storeFormulaNumber}`; + const workerFormulaNumber = derive(formulaNumber, 'worker'); + const workerFormulaIdentifier = `worker:${workerFormulaNumber}`; // Behold, recursion: // eslint-disable-next-line no-use-before-define return makeIdentifiedGuestController(