Repository navigation
fix(marketplace): show the seller as first name + last initial instead of their full name - #344
Merged
presidojay1 merged 2 commits intoOct 16, 2026
Conversation
…name
Every resale listing rendered 'sold by {seller.name}', exposing each
seller's full name to any signed-in user. Add publicSellerName():
'Ada Lovelace' becomes 'Ada L.', middle names are dropped, a single name is
shown as-is, and a blank or missing name falls back to 'Verified
holder'. The marketplace now renders only that form.
Closes StellarTickets#272
|
@posimideveloper 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
src/app/marketplace/page.tsxrenders each resale listing as:so every seller's full name is shown to any signed-in user browsing the marketplace. Strangers can see who is reselling which ticket for which event and venue. That's personal data the transaction doesn't need, and combined with the event and venue it's enough to identify and track someone.
What changed
Commit 1:
fix(marketplace)New
src/lib/display-name.ts:publicSellerName(fullName), using the issue's first option (first name + last initial), with its second option as the fallback:Ada LovelaceAda L.Mary Ann SmithMary S.(middle names dropped)ada lovelaceada L.(whitespace normalised, initial upper-cased)Zoë ØrstedZoë Ø.(Unicode-safe initial viaArray.from)CherCher(a single name is only a first name)""/ whitespace /null/undefinedVerified holdersrc/app/marketplace/page.tsx:sold by {publicSellerName(listing.seller?.name)}. This was the only placeseller.nameis rendered (checked with grep acrosssrc/), so only the chosen form now appears. The optional chain also stops a listing with a missingsellerobject from crashing the page.Commit 2:
test(marketplace), newsrc/lib/display-name.test.tsCovers every row of the table above, plus an explicit assertion that the output never contains the full last name.
Testing
npx eslinton both changed source 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.Follow-up (backend, out of scope for this repo)
This fixes what the page displays, which is the issue's "done when". The
/marketplaceAPI response still includesseller.namein full, so it's visible in devtools' network tab. To keep the full name from leaving the server at all, the backend (StellarTickets/backend) should return the same first-name + initial form, or just a display label, in the listing payload.Closes #272
Closes #270
Closes #271
Closes #273