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

User Story: Buy a ticket for an event with offer safety #2349

Open
katelynsills opened this issue Feb 5, 2021 · 0 comments
Open

User Story: Buy a ticket for an event with offer safety #2349

katelynsills opened this issue Feb 5, 2021 · 0 comments
Labels
ERTP package: ERTP Zoe Contract Contracts within Zoe Zoe package: Zoe

Comments

@katelynsills
Copy link
Contributor

katelynsills commented Feb 5, 2021

Story

As a user, I want to be able to buy a ticket to an event and have it be protected by offer safety. I do not want to have to specify things that are not important to me, like a seat number.

Status

A user hoping to purchase a ticket to an event must ask the contract or another user for a list of available tickets, and then perform a search among the tickets available to find the ones they want to buy. When the full list is available, this is very awkward. When the full list isn't available, the situation is very bad: the user cannot be protected by offer safety for their purchase of the tickets, because they don't know enough about the tickets to specify what they want.

Details

See test-sellTickets.js for this particular example.

The contract has a function getAvailableItems:

const availableTickets = await E(
ticketSalesPublicFacet,
).getAvailableItems();

Then the user must search for the tickets they want:

// find the value corresponding to ticket #1
const ticket1Value = availableTickets.value.find(
ticket => ticket.number === 1,
);
// make the corresponding amount
const ticket1Amount = ticketAmountMath.make(harden([ticket1Value]));

Then the user can actually make a proposal and get offer safety for the tickets they want:

const aliceProposal = harden({
give: { Money: terms.pricePerItem },
want: { Items: ticket1Amount },
});

Next Steps

Please see the Amount Patterns Implementation Plan issue

@katelynsills katelynsills self-assigned this Feb 5, 2021
@katelynsills katelynsills added Zoe package: Zoe Zoe Contract Contracts within Zoe labels Feb 5, 2021
@katelynsills katelynsills added ERTP package: ERTP Beta labels Feb 9, 2021
@katelynsills katelynsills added this to the Beta Launch milestone Feb 9, 2021
@rowgraus rowgraus removed this from the Beta Initial Launch milestone Mar 29, 2021
@Tartuffo Tartuffo added the MN-2 label Jan 20, 2022
@Tartuffo Tartuffo removed the MN-2 label Feb 7, 2022
@ivanlei ivanlei removed the Beta label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ERTP package: ERTP Zoe Contract Contracts within Zoe Zoe package: Zoe
Projects
None yet
Development

No branches or pull requests

4 participants