From 38351983836fdf9d3db70312ee39ae9e6a0da7b6 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 28 Oct 2022 16:08:26 -0700 Subject: [PATCH 1/2] fix(vat-provisioning): bad updater call --- packages/vats/src/vat-provisioning.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vats/src/vat-provisioning.js b/packages/vats/src/vat-provisioning.js index e332ae8f9a5..f89fa9a8506 100644 --- a/packages/vats/src/vat-provisioning.js +++ b/packages/vats/src/vat-provisioning.js @@ -51,8 +51,7 @@ export function buildRootObject() { // Update the notifier when the chainBundle resolves. const { notifier, updater } = makeNotifierKit(); chainBundle.then(clientHome => { - // @ts-expect-error https://github.com/Agoric/agoric-sdk/pull/6520/ - updater(harden({ clientHome, clientAddress: address })); + updater.updateState(harden({ clientHome, clientAddress: address })); }); return Far('emulatedClientFacet', { getChainBundle: () => chainBundle, From 7b354dfa9beda8b2b23c5c06f2fa54943ccc7366 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Mon, 31 Oct 2022 13:48:25 -0700 Subject: [PATCH 2/2] refactor: wrapInstall bundle validation --- packages/inter-protocol/src/proposals/utils.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/inter-protocol/src/proposals/utils.js b/packages/inter-protocol/src/proposals/utils.js index a163ea4c33a..d0403319d43 100644 --- a/packages/inter-protocol/src/proposals/utils.js +++ b/packages/inter-protocol/src/proposals/utils.js @@ -109,10 +109,12 @@ export const makeInstallCache = async ( }; const wrapInstall = install => async (mPath, bPath, opts) => { - // @ts-expect-error https://github.com/Agoric/agoric-sdk/pull/6520/ - const { endoZipBase64Sha512: sha512 } = await loadBundle(bPath).then( - m => m.default, + const bundle = await loadBundle(bPath).then(m => m.default); + assert( + 'endoZipBase64Sha512' in bundle, + 'bundle must be EndoZipBase64Bundle', ); + const { endoZipBase64Sha512: sha512 } = bundle; const detail = await provideWhen(working, sha512, () => install(mPath, bPath, opts).then(installation => ({ installation,