Skip to content

Commit

Permalink
fix: drop 'holder' from continuing invitation
Browse files Browse the repository at this point in the history
the rights are granted by the invitationMakers
  • Loading branch information
turadg committed Jul 12, 2024
1 parent 3c81747 commit 12d04c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/orchestration/src/examples/basic-flows.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { provideOrchestration } from '../utils/start-helper.js';
* @import {Baggage} from '@agoric/vat-data';
* @import {Orchestrator} from '@agoric/orchestration';
* @import {OrchestrationPowers} from '../utils/start-helper.js';
* @import {ResolvedContinuingOfferResult} from '../utils/zoe-tools.js';
*/

/**
Expand Down Expand Up @@ -44,7 +45,7 @@ export const start = async (zcf, privateArgs, baggage) => {
privateArgs.marshaller,
);

/** @type {OfferHandler} */
/** @type {OfferHandler<Promise<ResolvedContinuingOfferResult>>} */
const makeOrchAccount = orchestrate(
'makeOrchAccount',
undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ export const prepareCosmosOrchestrationAccountKit = (
// expect this complete in the same run
publicSubscribers: await when(holder.getPublicTopics()),
invitationMakers,
holder,
});
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ const orchestrationAccountScenario = test.macro({
const publicFacet = await E(zoe).getPublicFacet(instance);
const inv = E(publicFacet).makeOrchAccountInvitation();
const userSeat = E(zoe).offer(inv, {}, undefined, { chainName });
// @ts-expect-error TODO: type expected offer result
const { holder, invitationMakers, publicSubscribers } =
const { invitationMakers, publicSubscribers } =
await E(userSeat).getOfferResult();

t.regex(getInterfaceOf(holder)!, /Orchestration (.*) holder/);
t.regex(getInterfaceOf(invitationMakers)!, /invitationMakers/);

const { description, storagePath, subscriber } = publicSubscribers.account;
t.regex(description, /Account holder/);
t.regex(description!, /Account holder/);

const expectedStoragePath = `mockChainStorageRoot.basic-flows.${config.addressPrefix}`;
t.is(storagePath, expectedStoragePath);
Expand Down

0 comments on commit 12d04c6

Please sign in to comment.