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

ZCFMint.mintGains and ZCFMint.burnLosses should have better error messages #1708

Closed
katelynsills opened this issue Sep 5, 2020 · 0 comments · Fixed by #1796
Closed

ZCFMint.mintGains and ZCFMint.burnLosses should have better error messages #1708

katelynsills opened this issue Sep 5, 2020 · 0 comments · Fixed by #1796
Labels
Zoe package: Zoe

Comments

@katelynsills
Copy link
Contributor

The error messages if no arguments are provided is currently:

test(`zcf.makeZCFMint - mintGains`, async t => {
  const { zcf } = await setupZCFTest();
  const zcfMint = await zcf.makeZCFMint('A', MathKind.SET);
  // TODO: create seat if one is not provided
  // https://github.com/Agoric/agoric-sdk/issues/1696
  // @ts-ignore
  t.throws(() => zcfMint.mintGains(), {
    message: 'On demand seat creation not yet implemented',
  });
});

test(`zcf.makeZCFMint - burnLosses`, async t => {
  const { zcf } = await setupZCFTest();
  const zcfMint = await zcf.makeZCFMint('A', MathKind.SET);
  // @ts-ignore
  t.throws(() => zcfMint.burnLosses(), {
    message: "Cannot read property 'getCurrentAllocation' of undefined",
  });
});

We should improve these error messages.

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