Suggestions from codebase analysis#395
Open
themikemoniker wants to merge 1 commit intoolympus-btc:mainfrom
Open
Suggestions from codebase analysis#395themikemoniker wants to merge 1 commit intoolympus-btc:mainfrom
themikemoniker wants to merge 1 commit intoolympus-btc:mainfrom
Conversation
Placeholder commit for NWC feature discussion PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
bump up my post |
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.
Suggestions from Codebase Analysis
Based on a deep-dive of the v0.5.1-alpha codebase.
1. NWC (Nostr Wallet Connect) as Alternative Payment Backend
Add NIP-47 support so merchants can connect any NWC-compatible wallet alongside Phoenixd.
2. Security Hardening
GET /usersandGET /users/{id}have no authentication — anyone can enumerate all users, names, roles, emails, phonesGET /confighas no authentication — exposes business name, address, phone, email, tax IDanyHost()— enables CSRF from any origin with cookie-based authGET /wallet/seedreturns raw seed phrase — even with wallet JWT, this is risky. Consider showing only during initial setup, then encrypting at restPinHasher.kt:39logs"Pins: " + newHash + " = " + storedHashduring verification--secretused for JWT signing, keystore derivation, AND PIN hashing salt — compromising one compromises all3. Payment Reliability
4. Existing Bugs / Rough Edges
InitialSetup.kttransaction rollback — if the username already exists (UNIQUE constraint), the entire transaction rolls back including the config insert. The app ends up with users butinitialized = false, causing redirect loops to/onboardingconnection.autoCommit = falseset twice in InitialSetup.kt (lines 82 and 97) — second call is redundantorder_dishesonly references thedishestable, so store-mode products can't be added to orders via the existing order flow5. Missing for Real Merchant Use
System.exit(1)on DB connection failure — crashes entire JVM instead of graceful error🤖 Generated with Claude Code