Skip to content

Commit

Permalink
fix: using auctioneerKit to get auctioneer data
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad committed Oct 24, 2024
1 parent ee39ed9 commit f406d25
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/inter-protocol/src/proposals/replaceElectorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ const startNewEconCharter = async ({
* been successfully added to the economic charter
*/
const addGovernorsToEconCharter = async (
{ consume: { psmKit, governedContractKits } },
{ consume: { psmKit, governedContractKits, auctioneerKit } },
{ options: { econCharterKit } },
) => {
const { creatorFacet: ecCreatorFacet } = E.get(econCharterKit);
Expand All @@ -334,13 +334,27 @@ const addGovernorsToEconCharter = async (
}

const governedContractKitMap = await governedContractKits;

const auctioneerKitObject = await auctioneerKit;
for (const {
instance,
governorCreatorFacet,
label,
} of governedContractKitMap.values()) {
await E(ecCreatorFacet).addInstance(instance, governorCreatorFacet, label);
// `governedContractKitMap` has an old version of the auctioneer kit
// so using `auctioneerKit` instead
if (label === 'auctioneer') {
await E(ecCreatorFacet).addInstance(
auctioneerKitObject.instance,
auctioneerKitObject.governorCreatorFacet,
label,
);
} else {
await E(ecCreatorFacet).addInstance(
instance,
governorCreatorFacet,
label,
);
}
}
};

Expand Down Expand Up @@ -448,6 +462,7 @@ export const getManifestForReplaceAllElectorates = async (
psmKit: true,
governedContractKits: true,
chainStorage: true,
auctioneerKit: true,
highPrioritySendersManager: true,
namesByAddressAdmin: true,
// Rest of these are designed to be widely shared
Expand Down

0 comments on commit f406d25

Please sign in to comment.