Skip to content

Commit

Permalink
fix: missing zoe arg in setDestinations()
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Apr 19, 2023
1 parent e658480 commit 9505588
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/inter-protocol/src/feeDistributor.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
},

/**
* @param {Record<Keyword, FeeDestination>} newDestinations
* @param {Record<Keyword, ERef<FeeDestination>>} newDestinations
*/
setDestinations: async newDestinations => {
destinations = newDestinations;
Expand Down
18 changes: 13 additions & 5 deletions packages/inter-protocol/src/proposals/econ-behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,28 @@ export const startRewardDistributor = async ({
return undefined;
});

/**
* @type {Awaited<
* ReturnType<typeof import('../feeDistributor.js').makeFeeDistributor>>
* & { adminFacet: AdminFacet, instance: Instance }
* }
*/
const instanceKit = await E(zoe).startInstance(
feeDistributor,
{ Fee: centralIssuer },
feeDistributorTerms,
undefined,
'feeDistributor',
);
/** @type {ERef<import('../feeDistributor.js').FeeDestination>} */
await E(instanceKit.creatorFacet).setDestinations({
RewardDistributor:
rewardDistributorDepositFacet &&
E(instanceKit.creatorFacet).makeDepositFacetDestination(
rewardDistributorDepositFacet,
),
...(rewardDistributorDepositFacet && {
RewardDistributor: E(
instanceKit.creatorFacet,
).makeDepositFacetDestination(rewardDistributorDepositFacet),
}),
Reserve: E(instanceKit.creatorFacet).makeOfferDestination(
zoe,
'Collateral',
E.get(reserveKit).publicFacet,
'makeAddCollateralInvitation',
Expand Down

0 comments on commit 9505588

Please sign in to comment.