From c677e1bb7d17089fcf884f92cc11506fb0501f0e Mon Sep 17 00:00:00 2001 From: Padreug Date: Mon, 1 Jun 2026 19:54:28 +0200 Subject: [PATCH] feat(provision): capitalize the stall owner name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, a username of "greg" produced the stall "greg's Store". Now it produces "Greg's Store". The change is conservative: `username[:1].upper() + username[1:]` preserves the existing case of characters past the first (so "JohnDoe" stays "JohnDoe", not Python's `.capitalize()` outcome "Johndoe"). Lives in `provision_merchant` so both callers — nostrmarket's lazy `_auto_create_merchant` and the lnbits-side eager hook (`_create_default_merchant` per aiolabs/lnbits#9) — benefit from a single source of truth without each caller having to remember the formatting convention. Doesn't touch `merchant.config.display_name` (still defaults to None); only the stall name string is affected. --- services.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services.py b/services.py index f573285..5da63ef 100644 --- a/services.py +++ b/services.py @@ -275,10 +275,11 @@ async def provision_merchant( ) await create_zone(merchant.id, online_zone) - name = display_name or "My" + raw_owner_name = display_name or "My" + owner_name = raw_owner_name[:1].upper() + raw_owner_name[1:] default_stall = Stall( wallet=wallet_id, - name=f"{name}'s Store", + name=f"{owner_name}'s Store", currency="sat", shipping_zones=[online_zone], )