diff --git a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js index 9d31c752607..70d001ea148 100644 --- a/packages/vats/src/proposals/upgrade-provisionPool-proposal.js +++ b/packages/vats/src/proposals/upgrade-provisionPool-proposal.js @@ -29,7 +29,7 @@ export const upgradeProvisionPool = async ( provisionPoolStartResultP, instancePrivateArgsP, ]); - const { adminFacet, instance } = provisionPoolStartResult; + const { adminFacet, instance, publicFacet } = provisionPoolStartResult; const [originalPrivateArgs, poserInvitation] = await Promise.all([ // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -38,9 +38,23 @@ export const upgradeProvisionPool = async ( E(electorateCreatorFacet).getPoserInvitation(), ]); + const readCurrentDirectorParams = async () => { + await null; + + /* params object should be fetched from the getElectorateSubscription + * publicFacet method on a next incarnation */ + const params = await E(publicFacet).getGovernedParams(); + return harden({ + PerAccountInitialAmount: params.PerAccountInitialAmount.value, + }); + }; + const directorParamOverrides = await readCurrentDirectorParams(); + console.log('directorParamOverrides: ', { directorParamOverrides }); + const newPrivateArgs = harden({ ...originalPrivateArgs, initialPoserInvitation: poserInvitation, + directorParamOverrides, }); const upgradeResult = await E(adminFacet).upgradeContract(