Repository navigation
fix(verify): confirm before revoking a ticket, naming the ticket and that it's permanent - #346
Merged
presidojay1 merged 2 commits intoOct 16, 2026
Conversation
Revoke ran the on-chain revocation as soon as the button was clicked. The button now opens the shared ConfirmDialog, which names the ticket (event, tier, seat, holder) and says revocation is permanent; the revoke only runs from 'Revoke ticket'. Cancel, Escape or a backdrop click leave the ticket untouched. Closes StellarTickets#246
|
@Derinsolababy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
❌ Deploy Preview for stellartickets failed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the Verify page (
src/app/verify/page.tsx), the Revoke button calledhandleRevoke()directly. One click built the revoke transaction, asked the wallet to sign and submitted it, with no confirmation. #92 ("confirm before revoking a ticket") was closed, but no confirmation step ever existed in the code.Revocation is permanent and on-chain: the ticket stops being valid for entry, check-in and resale. On a door-staff screen where Check in and Revoke sit side by side, one mis-tap on the wrong button, or on the wrong scanned ticket, destroys someone's valid ticket.
What changed
Commit 1:
fix(verify)ConfirmDialogadded in feat(events): confirm on-chain publish in a ConfirmDialog that names the locked resale cap and royalty #343 (accessiblealertdialog, focus starts on Cancel, Tab trapped, Escape/backdrop cancel, focus returned to the Revoke button on close). No new modal code.handleRevoke(). That closes the dialog, then runs the existing revoke → sign →confirm-revokeflow unchanged. While it's in flight the dialog's buttons showRevoking…/ disabled, and Escape is ignored.src/lib/revoke-confirm.ts:describeRevokeTarget()builds the ticket line from the verify result (eventName,tier,seat,ownerName), skipping blank fields instead of leaving dangling·separators.Commit 2:
test(verify), newsrc/lib/revoke-confirm.test.tsThe dialog's own behaviour (only confirm calls
onConfirm; Cancel/Escape cancel; Escape ignored while loading; focus on Cancel; Tab trap) is already covered bysrc/components/confirm-dialog.test.tsx, which passes on this branch.Testing
npx eslinton the changed files: clean.npx tsc --noEmit: no errors in the changed files. The only errors are the 4TS18046errors insrc/lib/api-timeout.test.ts, which this PR doesn't touch.Closes #246
Closes #247
Closes #248
Closes #249