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

Show net results of exited offers #4360

Open
samsiegart opened this issue Jan 23, 2022 · 10 comments
Open

Show net results of exited offers #4360

samsiegart opened this issue Jan 23, 2022 · 10 comments
Assignees
Labels
enhancement New feature or request UI wallet

Comments

@samsiegart
Copy link
Contributor

samsiegart commented Jan 23, 2022

What is the Problem Being Solved?

If an offer is "exited" by the user, the assets may or may not have already been exchanged by the contract. Additionally, completed offers may not have actually taken all of the give, or may have given more than the want. It would be helpful for the users to see the net results of each offer after they are exited.

Current Screenshot:
image

Description of the Design

Idea 1: Show a section at the bottom that displays the amount of each asset actually transferred by the contract.
Idea 2: Show the amount transferred next to the give/want amounts after the offer is exited.

Alternative consideration: Show a "refunded"/"exited" state for some offers instead of a completed state in all cases.

Initial discussion:

@michaelfig: "This is a good idea, maybe a "refunded" state. Zoe currently doesn't do anything to distinguish this result, so it would take some work on the Zoe service to be able to report it. We could instead hack together something in the wallet backend to heuristically determine that it was a refund (not my preference)."

@erights "'Cancelled' seems a terrible word if the proposed trade could have already happened... 'I cancelled my offer, but my offered assets are still gone'"

Details TODO

Security Considerations

Test Plan

@samsiegart samsiegart added enhancement New feature or request wallet UI labels Jan 23, 2022
@samsiegart samsiegart self-assigned this Jan 23, 2022
@michaelfig
Copy link
Member

I presume that this issue also includes labelling a button "exit offer" instead of "cancel"?

@erights
Copy link
Member

erights commented Jan 23, 2022

I like option 2. Something like a transition from

 
Give Bid
3.00 Run
 
Want Assets
1 cardStore.Card

to

   
Gave Bid Partial Refund
3.00 Run 2.50 Run
   
Wanted Assets Assets Received
1 cardStore.Card 1 cardStore.Card

@michaelfig
Copy link
Member

I like option 2. Something like a transition from

We probably need some more design work around how receiving the following is represented:

  1. wanted assets
  2. wanted assets + additional assets
  3. full refund
  4. full refund + additional assets

@Tartuffo
Copy link
Contributor

Sam to re-write this, especially to highlight any possible MN-1 issues this might address.

@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 4, 2022

@samsiegart and @rowgraus Please mock this up. Lowish prio for MN-1.

@erights
Copy link
Member

erights commented Mar 9, 2022

See #3056

@michaelfig
Copy link
Member

michaelfig commented Mar 17, 2022

Tentative design:

gains vs. losses are AmountRecords updated in the offer throughout the lifetime of the offer, gleaned from what has been initially escrowed by Zoe vs. what we were able to get back, associate returned payment objects with the offer record ID.

For now, we will just display "accepted" (got at least what we wanted) versus "refused" (the contract did not give us what we wanted).

In the backend, only have a complete state, at which point the changing gains+losses (AmountRecords) are attached to the offer record, and remove the accept state (which is a construct of the UI based on the gains+losses).

@erights
Copy link
Member

erights commented Mar 18, 2022

What happens if you get at least what you wanted and at least a full refund?

@michaelfig
Copy link
Member

What happens if you get at least what you wanted and at least a full refund?

Then the offer state is "accepted" with 0 losses.

@michaelfig
Copy link
Member

What happens if you get at least what you wanted and at least a full refund?

But this does suggest a useful dichotomy that I was reaching for. A complete offer is either "accepted" or "refused".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI wallet
Projects
None yet
Development

No branches or pull requests

4 participants