Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zcf.makeInvitation accepts an undefined offerHandler but getting the offerResult errors #1703

Closed
katelynsills opened this issue Sep 4, 2020 · 0 comments · Fixed by #1759
Closed
Assignees
Labels
Zoe package: Zoe

Comments

@katelynsills
Copy link
Contributor

What is the Problem Being Solved?

test(`zcf.makeInvitation - no offerHandler`, async t => {
  const { zcf, zoe } = await setupZCFTest();
  const invitationP = zcf.makeInvitation(undefined, 'myInvitation');
  const invitationIssuer = await E(zoe).getInvitationIssuer();
  const isLive = await E(invitationIssuer).isLive(invitationP);
  t.truthy(isLive);
  const seat = E(zoe).offer(invitationP);
  // const offerResult = await E(seat).getOfferResult();
  // t.is(offerResult, undefined);
  await t.throwsAsync(() => E(seat).getOfferResult());
});

Description of the Design

We should have a default no-op offerHandler that returns void.

Security Considerations

None

Test Plan
ZCF Tests (how this was found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Zoe package: Zoe
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant