From 33c5460a651953757e77fcacb969883842e0f6ed Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Fri, 25 Oct 2024 14:16:10 -0700 Subject: [PATCH] feat: only add one auctioneer instance to charter --- .../src/proposals/replaceElectorate.js | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/packages/inter-protocol/src/proposals/replaceElectorate.js b/packages/inter-protocol/src/proposals/replaceElectorate.js index de30496b6d4d..cb862be5a67b 100644 --- a/packages/inter-protocol/src/proposals/replaceElectorate.js +++ b/packages/inter-protocol/src/proposals/replaceElectorate.js @@ -358,21 +358,9 @@ const addGovernorsToEconCharter = async ( label, } of governedContractKitMap.values()) { // The auctioneer was updated in this same release, getting values directly - if (label === 'auctioneer') { - const [auctionUpgradeNewInstance, auctionUpgradeNewGovCreator] = - await Promise.all([ - auctionUpgradeNewInstanceP, - auctionUpgradeNewGovCreatorP, - ]); - // reset after use. auctionUpgradeNewInstance is reset by upgrade-vault.js - auctionUpgradeNewGovCreatorProduce.reset(); - - await E(ecCreatorFacet).addInstance( - auctionUpgradeNewInstance, - auctionUpgradeNewGovCreator, - label, - ); - } else { + // (there might be more than one auctioneer instance, but the others don't + // need to be registered.) + if (label !== 'auctioneer') { await E(ecCreatorFacet).addInstance( instance, governorCreatorFacet, @@ -380,6 +368,20 @@ const addGovernorsToEconCharter = async ( ); } } + + const [auctionUpgradeNewInstance, auctionUpgradeNewGovCreator] = + await Promise.all([ + auctionUpgradeNewInstanceP, + auctionUpgradeNewGovCreatorP, + ]); + // reset after use. auctionUpgradeNewInstance is reset by upgrade-vault.js + auctionUpgradeNewGovCreatorProduce.reset(); + + await E(ecCreatorFacet).addInstance( + auctionUpgradeNewInstance, + auctionUpgradeNewGovCreator, + 'auctioneer', + ); }; /**