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

[tickets] Show different message when less tickets bought #3252

Merged
merged 3 commits into from
Feb 22, 2021

Conversation

alexlyp
Copy link
Member

@alexlyp alexlyp commented Feb 21, 2021

Due to utxos requirements for ticket purchasing, sometimes when a user requests more tickets than they are able to construct it only purchases as many as it's able to. This message alerts the user to this situation.

dispatch({ purchaseTicketsResponse, type: PURCHASETICKETS_SUCCESS });
const numBought = purchaseTicketsResponse.getTicketHashesList().length;
if (numBought < numTickets) {
dispatch({ purchaseTicketsResponse, numAttempted: numTickets, type: PURCHASETICKETS_SUCCESS });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can dispatch PURCHASETICKETS_SUCCESS_LESS directly.

};
if (values.numAttempted && values.numTickets < values.numAttempted) {
message = messages[
"PURCHASETICKETS_SUCCESS_LESS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need with above comment

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 this pull request may close these issues.

3 participants