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

multipoolAutoswap needs to throw on seat.fail with an error argument #2336

Closed
katelynsills opened this issue Feb 4, 2021 · 0 comments · Fixed by #2337
Closed

multipoolAutoswap needs to throw on seat.fail with an error argument #2336

katelynsills opened this issue Feb 4, 2021 · 0 comments · Fixed by #2337
Assignees

Comments

@katelynsills
Copy link
Contributor

The contract code in multipoolAutoswap is incorrect:

https://github.com/Agoric/agoric-sdk/blob/9eebbe32309efc691570477f26f43cc49f49707c/packages/zoe/src/contracts/multipoolAutoswap/swap.js#L166:169

It should make an Error and include it as the argument to seat.fail and it should probably throw on that line as well. See

for an example.

There may be a larger Zoe issue as well, but this isn't following the expectations that we have for Zoe contracts, which makes it worse than usual. We may need to compare Error messages to see why something has errored, but we certainly shouldn't be comparing offerResult strings to find an error - getOfferResult should throw. This problem in particular is a problem with how this contract was written.

Originally posted by @katelynsills in https://github.com/Agoric/dapp-token-economy/pull/112#discussion_r570624446

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

Successfully merging a pull request may close this issue.

2 participants