-
Notifications
You must be signed in to change notification settings - Fork 206
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
Misleading status message when AMM offer is rejected #4809
Comments
Need to properly surface the outcome of the offer. |
another awkward consequence of not throwing is a notifier update with no change in state: https://github.com/Agoric/agoric-sdk/pull/5420/files#r879991457 |
Yes, let's discuss. @dtribble and I discussed a method that could easily be added to UserSeat that would help. But I am not sure I understand the problem and why the wallet could not easily do the equivalent of that method for itself. I am not that oriented in the wallet, so I may be missing something obvious. It seems the problem is that the wallet is paying looking at the offerResult when it should be looking at the payout. The question it seems to want to ask is "Is this offer's proposal's |
The misleading "Swap successfully completed." is shown in the dapp (amm.agoric.net), not the wallet. Are you suggesting that every dApp developer should inspect the payouts rather than the offer result to get... um... the result of the offer? Wouldn't it be much more straightforward for the AMM contract to throw in this case? I use the AMM API quite a bit, and remembering that "Swap successfully completed." actually means "swap may or may not have successfully completed; you better look more closely" is a royal pain. At least we should change the message to "Swap order processed. Check payouts for results." |
As discussed in Eng Sync today, we need to have the correct feedback to the user, to be implemented between the UI and the AMM contract (not a fundamental change to Zoe). |
regarding my suggestion to have the AMM contract throw, @erights pointed out a risk of relying on the contract for this info: it could lie by reporting one thing in the offer result and another in the payouts. So the client has to check the payouts, one way or another. |
I got bit by this again, this time with the PSM, when I tried to trade 30 IST for USDC but the PSM only had 20 USDC in its piggy bank. |
@erights points out:
|
This has been addressed for the purpose of the PSM / wallet release. |
Describe the bug
If the AMM offer is processed it returns "Swap successfully completed." even if the offer was rejected. For example, due to making an offer that's not on the AMM curve.
Expected behavior
Some response that informs the user of the new state.
Additional context
The REPL is part of the UI, though not GUI.
See also #3056
The text was updated successfully, but these errors were encountered: