Skip to content

Conversation

@dmnyc
Copy link
Contributor

@dmnyc dmnyc commented Jan 5, 2026

Summary

This PR includes several major features and improvements:

Profile & Settings Redesign

  • Redesigned profile page with improved layout and banner display
  • Redesigned settings page with better organization
  • Fixed navigation reactivity issues

Wallet Enhancements

  • Bitcoin Connect Integration: Added as external wallet option, refactored ZapModal to support BC payments
  • Fiat Currency Conversion: Display balances in user's preferred fiat currency
  • Spark Fixes: Limited transaction history to 30 days on initial load for performance
  • NWC Safari Fix: Fixed WebSocket connection issues on Safari iOS

NIP-46 Remote Signer Support (WIP)

  • Created unified encryption service for signer-agnostic encryption
  • Simplified nostrconnect:// URL format for better signer compatibility
  • Disabled encrypted backup/restore for NIP-46 users (encryption permissions not yet supported for remote signers)
  • Added clear messaging for NIP-46 users about backup limitations
  • Recovery phrase backup still works for all users

UI/UX Improvements

  • Fixed error/success message visibility (z-index issues with modals)
  • Fixed recovery phrase modal appearing behind other modals
  • Centered "Connect Your First Wallet" button

Documentation

  • Reorganized docs into docs/android/, docs/mobile/, docs/dev/ subdirectories
  • Added wallet development notes and known issues guide

Test Plan

  • Profile page displays correctly with banner
  • Settings page layout works on mobile and desktop
  • Bitcoin Connect wallet connection works
  • Fiat currency conversion displays correctly
  • NWC wallet connects on Safari iOS
  • NIP-46 login tested and works with Amber
  • NIP-46 users see appropriate warnings about backup limitations
  • Recovery phrase backup works for all auth methods

dmnyc added 30 commits January 2, 2026 16:21
- Add connection mutex to prevent concurrent WebSocket connection attempts
- Fix empty onDisconnect handler that caused hangs on Safari iOS
- Add relay.status check to isNwcConnected() for accurate connection state
- Add isNwcConnectedTo() helper to check connection to specific wallet URL
- Use inlined connection check in connectNwc to avoid TDZ bundler errors
Also updates docs/WALLET_DEVELOPMENT.md with known issues and TDZ prevention guide
Move early relay.status check before const declarations to avoid
referencing onConnect/onDisconnect before initialization
Also update WALLET_DEVELOPMENT.md to mark NWC restore as fixed
- Add fromTimestamp filter to listPayments to avoid stale transaction data
- Initial load uses 30-day window, 'Load More' fetches all history
- Add daysBack parameter to getPaymentHistory for flexibility
  - Document fromTimestamp filter attempt and sync delay issue
  - Disable filter in code until SDK sync behavior is understood
  - Mark as deferred to future build
- Add @getalby/bitcoin-connect for unified payment modal
- Create lightningService.ts singleton for external wallet payments
- Remove WebLN code from zapManager.ts
- Simplify ZapModal.svelte - launches Bitcoin Connect modal directly
- Add Bitcoin Connect CSS theming variables to app.css
- Payment detection via verify URL polling (1 second interval)
- Move Android docs to docs/android/
- Move dev docs to docs/dev/
- Move mobile docs to docs/mobile/
- Update login page styling
- Redesign settings page layout
- Update user profile page
- Add Accordion component
- Add Tabs component
- Redesign profile header: avatar left, name/bio center, buttons right-aligned
- Constrain profile page to max-w-4xl for better readability
- Fix profile navigation: CustomName and CustomAvatar now react to pubkey changes
- Fix follow list bug: always fetch latest follow list before modifying
- Standardize header button sizes (36px) for consistent alignment
- Adjust Feed grid columns for profile view context
- Remove photo edit overlay from avatar (moved to edit modal)
  - Add lightweight external wallet support via Bitcoin Connect
    - Only shown when no embedded wallets (NWC/Spark) exist
    - Provides payment capability only (no balance, history, or header widget)
    - Persists enabled state to localStorage
    - Confirmation modal before removing

  - Fix NWC payment failure after page refresh
    - Add ensureWalletConnected() call in sendPayment() to auto-reconnect

  - New files:
    - src/lib/wallet/bitcoinConnect.ts - enabled/disabled state store
    - src/components/icons/BitcoinConnectLogo.svelte - BC logo icon

  - Update wallet page UI:
    - Modal header changed to "Add Embedded Wallet"
    - BC option with divider at bottom of wallet selection
    - "External wallet connected" state with orange BC logo
    - "Remove External Wallet" with confirmation

  - Update docs/WALLET_DEVELOPMENT.md with BC documentation and testing checklist
  - Add currency conversion for wallet balances using @getalby/lightning-tools
    - New currencyStore.ts with 10 supported currencies (SATS, USD, EUR, etc.)
    - New currencyConversion.ts with 5-minute rate caching
    - FiatBalance.svelte shows fiat value below sats balance
    - CurrencySelector.svelte dropdown for currency selection
  - Add currency selector to wallet page (compact) next to balance display
  - Add Currency settings section in Settings page (next to Wallet section)
  - Add profile banner display on user profile page
    - Shows user's banner image if set, falls back to gradient
    - Avatar overlaps bottom of banner with ring separator
  - Fix SaveButton dropdown icon spacing and hover state (now circular)
  - Create unified encryptionService.ts for signer-agnostic encryption
  - Route encryption through NDK signer instead of window.nostr
  - Update NWC, Spark, and profile backup to use new service
  - Works with NIP-07 extensions, NIP-46 (Amber), and private keys
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements several major features and improvements to enhance mobile UX, wallet functionality, and NIP-46 remote signer support. The changes include Bitcoin Connect integration for external wallets, fiat currency conversion, a redesigned profile/settings UI, and a unified encryption service to support both NIP-07 and NIP-46 authentication methods.

Key Changes:

  • Bitcoin Connect integration as an external wallet option with simplified payment flow
  • Unified encryption service supporting NIP-07, NIP-46, and private key signers
  • Profile page redesign with banner display and improved mobile layout
  • Settings page redesign with accordion sections and relay connection status
  • Fiat currency conversion and display alongside sats balances

Reviewed changes

Copilot reviewed 39 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
svelte.config.js Comment capitalization fix for consistency
src/routes/wallet/+page.svelte Major refactor: Bitcoin Connect integration, NIP-46 warnings, fiat display, improved error messages
src/routes/user/[slug]/+page.svelte Profile redesign with banner, improved follow logic with safeguards
src/routes/settings/+page.svelte Complete redesign with accordions, relay status, currency selector
src/routes/login/+page.svelte Theme-aware logo selection
src/lib/zapManager.ts Removed WebLN code, added verify URL support
src/lib/wallet/walletManager.ts Added connection check before payment
src/lib/wallet/nwcBackup.ts Integrated unified encryption service
src/lib/wallet/index.ts Exported Bitcoin Connect functions
src/lib/wallet/bitcoinConnect.ts New external wallet state management
src/lib/spark/index.ts Integrated unified encryption service
src/lib/profileBackup.ts Integrated unified encryption service
src/lib/lightningService.ts New Bitcoin Connect payment modal integration
src/lib/encryptionService.ts New signer-agnostic encryption service
src/lib/currencyStore.ts New currency preference store
src/lib/currencyConversion.ts New fiat conversion utilities
src/lib/authManager.ts Simplified nostrconnect URL for compatibility
src/components/icons/BitcoinConnectLogo.svelte New Bitcoin Connect logo component
src/components/ZapModal.svelte Refactored to use Bitcoin Connect for external payments
src/components/Tabs.svelte New reusable tabs component
src/components/SaveButton.svelte Fixed dropdown trigger margin
src/components/NotificationBell.svelte Size adjustments for header consistency
src/components/Header.svelte Size and alignment improvements
src/components/FiatBalance.svelte New component for fiat balance display
src/components/Feed.svelte Profile-specific grid layout
src/components/CustomName.svelte Reactive pubkey handling fix
src/components/CustomAvatar.svelte Reactive pubkey handling fix
src/components/CurrencySelector.svelte New currency selector component
src/components/Accordion.svelte New accordion component
src/app.css Bitcoin Connect theming variables
package.json Added Bitcoin Connect dependencies
docs/ Reorganized into subdirectories with new documentation
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@spe1020 spe1020 merged commit 66fefe7 into zapcooking:main Jan 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants