From 5785221510120f888b60ae0b84d22a8a86b99f27 Mon Sep 17 00:00:00 2001 From: rabi-siddique Date: Thu, 3 Oct 2024 08:51:18 +0500 Subject: [PATCH] chore: use governedContractKits --- .../src/proposals/replaceElectorate.js | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/inter-protocol/src/proposals/replaceElectorate.js b/packages/inter-protocol/src/proposals/replaceElectorate.js index 093aa00e7a7..2ac4cab5c87 100644 --- a/packages/inter-protocol/src/proposals/replaceElectorate.js +++ b/packages/inter-protocol/src/proposals/replaceElectorate.js @@ -159,14 +159,14 @@ export const replaceElectorate = async (permittedPowers, config) => { }, ); + const governedContractKitsMap = + await permittedPowers.consume.governedContractKits; const psmKitMap = await permittedPowers.consume.psmKit; const creatorFacets = [ - E.get(permittedPowers.consume.reserveKit).governorCreatorFacet, - E.get(permittedPowers.consume.auctioneerKit).governorCreatorFacet, - E.get(permittedPowers.consume.vaultFactoryKit).governorCreatorFacet, - E.get(permittedPowers.consume.provisionPoolStartResult) - .governorCreatorFacet, + ...[...governedContractKitsMap.values()].map( + governedContractKit => governedContractKit.governorCreatorFacet, + ), ...[...psmKitMap.values()].map(psmKit => psmKit.psmGovernorCreatorFacet), ]; @@ -212,18 +212,15 @@ export const getManifestForReplaceElectorate = async ( manifest: { [replaceElectorate.name]: { consume: { - reserveKit: true, - auctioneerKit: true, - vaultFactoryKit: true, psmKit: true, - provisionPoolStartResult: true, - - board: true, + governedContractKits: true, chainStorage: true, diagnostics: true, - zoe: true, highPrioritySendersManager: true, namesByAddressAdmin: true, + // Rest of these are designed to be widely shared + board: true, + zoe: true, }, produce: { economicCommitteeKit: true,