Skip to content

Commit

Permalink
feat: only add one auctioneer instance to charter
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Oct 25, 2024
1 parent 8c0299e commit a109395
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions packages/inter-protocol/src/proposals/replaceElectorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,28 +358,30 @@ 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,
label,
);
}
}

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',
);
};

/**
Expand Down

0 comments on commit a109395

Please sign in to comment.