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

AMM contract needs to give Wallet UI feedback for rejected offers #3056

Closed
rowgraus opened this issue May 7, 2021 · 5 comments · Fixed by #5905
Closed

AMM contract needs to give Wallet UI feedback for rejected offers #3056

rowgraus opened this issue May 7, 2021 · 5 comments · Fixed by #5905
Assignees
Labels
Milestone

Comments

@rowgraus
Copy link

rowgraus commented May 7, 2021

Background:
Current behavior: a user performs a trade on the AMM. The resulting offer rejects due to failed offer safety - perhaps the AMM price moved too much in between. The failure shows in logs but to the user the trade simply never resolves. No indication is given of the failure.

The wallet needs to provide some indication of transaction success/failure to the user. Perhaps a history of offers?

@rowgraus rowgraus added the wallet label May 7, 2021
@rowgraus rowgraus added this to the Beta Phase 4: Governance milestone May 7, 2021
@Tartuffo Tartuffo added the MN-1 label Jan 21, 2022
@Tartuffo Tartuffo removed the MN-1 label Feb 7, 2022
@Tartuffo Tartuffo removed this from the Beta Phase 4: Governance milestone Feb 8, 2022
@erights
Copy link
Member

erights commented Mar 9, 2022

See #4360

@Tartuffo
Copy link
Contributor

Possibly the work needs to be done in AMM and/or Zoe before the Wallet can know it failed. Rejected vs. Satisfied offer.

@Tartuffo Tartuffo added Zoe package: Zoe AMM labels Jul 20, 2022
@Tartuffo Tartuffo assigned Chris-Hibbert and unassigned michaelfig Jul 20, 2022
@Tartuffo
Copy link
Contributor

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).

@Tartuffo Tartuffo changed the title Wallet provides feedback for rejected offers AMM contract needs to give Wallet UI feedback for rejected offers Aug 5, 2022
@erights
Copy link
Member

erights commented Aug 5, 2022

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").

The punch line is correct "not a fundamental change to Zoe", but the description can be misundertood ("between the UI and the AMM contract"). The problem is that the contract can lie about whether the offer's want is satisfied, so the UI should not rely on the offerResult from the contract to indicate this. The contents of offerResult are only according to the contract, and its meaning is specific to the individual contract. A dapp UI (including the AMM UI) can use offerResult to display info that is legitimately according to the contract. But whether a want is satisfied or not should be determined from the payouts.

We have talked about Zoe making this more convenient, such as by adding a method to UserSeat. The "not a fundamental change to Zoe" is that the wallet UI doesn't actually need Zoe to provide it more than it currently does, since the wallet UI has the proposal and the payouts.

@Chris-Hibbert
Copy link
Contributor

We can add a function (E(userSeat).wasWantSatisfied()) to Zoe that would return a promise that will resolve when the seat has exited.

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

Successfully merging a pull request may close this issue.

5 participants