diff --git a/packages/zoe/src/zoe.js b/packages/zoe/src/zoe.js index 2ee7d8b239b..78ad6b28ee6 100644 --- a/packages/zoe/src/zoe.js +++ b/packages/zoe/src/zoe.js @@ -74,8 +74,8 @@ import { makeTables } from './state'; * * @property {(installationHandle: InstallationHandle, * issuerKeywordRecord: IssuerKeywordRecord, - * terms: object?) - * => Invite} makeInstance + * terms?: object) + * => Promise} makeInstance * Zoe is long-lived. We can use Zoe to create smart contract * instances by specifying a particular contract installation to * use, as well as the `issuerKeywordRecord` and `terms` of the contract. The @@ -669,6 +669,10 @@ const makeZoe = (additionalEndowments = {}) => { issuerKeywordRecord = harden({}), terms = harden({}), ) => { + assert( + installationTable.has(installationHandle), + details`${installationHandle} was not a valid installationHandle`, + ); const { installation } = installationTable.get(installationHandle); const instanceHandle = harden({}); const contractFacet = makeContractFacet(instanceHandle);