Skip to content

Commit

Permalink
fix(types): Zoe startInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 29, 2024
1 parent 0902a31 commit 9c25111
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/ERTP/src/amountMath.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ const isGTE = (leftAmount, rightAmount, brand = undefined) => {
* the abstract right to participate in a particular exchange.
*/
const AmountMath = {
// TODO use overloading to handle when Brand has an AssetKind and when it doesn't.
// a AmountForValue utility could help DRY those cases.
/**
* Make an amount from a value by adding the brand.
*
Expand Down
10 changes: 3 additions & 7 deletions packages/zoe/src/zoeService/startInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,12 @@ export const makeStartInstance = (
);

/**
*
* @param {Promise<Installation>} installationP
* @param {IssuerKeywordRecord} uncleanIssuerKeywordRecord
* @param {unknown} customTerms
* @param {unknown} privateArgs
* @param {string} instanceLabel
* @type {import('./utils.js').StartInstance}
*/
const startInstance = async (
installationP,
uncleanIssuerKeywordRecord = harden({}),
// @ts-expect-error FIXME may not match the expected terms of SF
customTerms = harden({}),
privateArgs = undefined,
instanceLabel = '',
Expand Down Expand Up @@ -364,6 +360,7 @@ export const makeStartInstance = (

// creatorInvitation can be undefined, but if it is defined,
// let's make sure it is an invitation.
// @ts-expect-error cast
return E.when(
Promise.all([
creatorInvitationP,
Expand Down Expand Up @@ -392,6 +389,5 @@ export const makeStartInstance = (
},
);
};
// @ts-expect-error cast
return harden(startInstance);
};

0 comments on commit 9c25111

Please sign in to comment.