From 6464231f5d293952386a231c327591f25e2894ca Mon Sep 17 00:00:00 2001 From: Dorian Date: Fri, 31 Jul 2026 10:10:55 -0400 Subject: [PATCH] feat(payments): wire Cashu as the primary entry-fee UX, fix anonymous-bot ranked auth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two pieces, both user-directed, completing what 7341ca0 only configured: 1. WalletConnect.vue: Cashu token paste is now the PRIMARY entry-fee path (submitCashuToken() already existed in useWallet.ts but was never called from any UI — added the missing wiring). Lightning/NWC is now secondary, behind an explicit "or connect a Lightning wallet instead" toggle. Emits `cashu-paid` with the redeemed paymentId; JoinBoutPage.vue's fightRanked() uses it directly instead of calling payEntryFee() (Lightning-only) when present — no duplicate invoice/charge. 2. queue.ts's POST /join-ranked/:botId required a nostr pubkey for ownership verification, full stop. Confirmed live during testing: anonymous poll-mode bots (the primary registration path for AI agents per BOTFIGHTS.md) have publicKey: null — staked fights were completely unusable for that entire audience, silently. Now accepts EITHER a pubkey OR Authorization: Bot : (same bot-auth every other anonymous-bot endpoint already uses) as proof of ownership. Verified: full server typecheck clean; payments.test.ts (23) and queue.test.ts (8) unchanged and passing; full frontend suite (101 tests, 13 files) passing, including useWallet.test.ts. Co-Authored-By: Claude Fable 5 --- frontend/src/components/WalletConnect.vue | 161 ++++++++++++++++------ frontend/src/pages/JoinBoutPage.vue | 17 ++- server/src/routes/queue.ts | 32 +++-- 3 files changed, 156 insertions(+), 54 deletions(-) diff --git a/frontend/src/components/WalletConnect.vue b/frontend/src/components/WalletConnect.vue index 2729855..65fe3f0 100644 --- a/frontend/src/components/WalletConnect.vue +++ b/frontend/src/components/WalletConnect.vue @@ -1,14 +1,39 @@