Skip to content

Fix issues #240, #241, #242, #243#354

Merged
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
Smartdevs17:fix/issues-240-241-242-243-v2
Apr 28, 2026
Merged

Fix issues #240, #241, #242, #243#354
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
Smartdevs17:fix/issues-240-241-242-243-v2

Conversation

@Smartdevs17
Copy link
Copy Markdown
Contributor

Summary

Related Issues

Closes #240
Closes #241
Closes #242
Closes #243

Changes Made

Issue #240 - Toast Notifications and Loading States

  • Wired react-hot-toast Toaster to the root layout
  • Added success/error toasts for all user actions (stream creation, withdrawal, top-up, cancel)
  • Added loading spinners to buttons during async operations
  • Added loading skeletons for data fetching components

Issue #241 - Transaction Confirmation Flow

  • Created TransactionTracker component with states: idle, signing, submitted, confirming, confirmed, failed
  • Shows transaction hash with Stellar Expert explorer link after submission
  • Polls /v1/streams/{id} to detect indexer confirmation
  • Reusable across stream creation, withdraw, top-up, cancel

Issue #242 - Token Amount Formatting

  • Created utils/amount.ts with:
    • fromStroops(amount, decimals) - convert raw to human-readable
    • toStroops(amount, decimals) - convert human-readable to raw
    • formatStreamRate(ratePerSecond, decimals, tokenSymbol) - format rate per second and per month
    • hasValidPrecision(amount, decimals) - validate decimal precision
    • Token decimals caching utilities
  • Applied to all amount displays throughout the app

Issue #243 - Settings Page

  • Added connected wallet section with address copy button and network badge
  • Added display preferences: default token, amount format (decimal places)
  • Added dark/light/system theme toggle with localStorage persistence
  • Added browser push notification opt-in toggle
  • Added disconnect wallet button with redirect to landing page

Testing

  • All changes are frontend-only and don't require dependency installation
  • Components follow existing patterns in the codebase
  • Toast notifications are properly integrated with react-hot-toast
  • TransactionTracker handles all 5 states correctly
  • Amount formatting handles edge cases (zero decimals, invalid precision)

- Add toast notifications and loading states throughout the app (Issue LabsCrypt#240)
- Create TransactionTracker component with 5-state lifecycle (Issue LabsCrypt#241)
- Create utils/amount.ts with token formatting functions (Issue LabsCrypt#242)
- Update settings page with theme toggle, display preferences, and browser notifications (Issue LabsCrypt#243)
- Apply amount formatting throughout the app
- Integrate TransactionTracker into activity history
- Add loading skeletons for data fetching components

Closes LabsCrypt#240
Closes LabsCrypt#241
Closes LabsCrypt#242
Closes LabsCrypt#243
@ogazboiz ogazboiz merged commit f2e12cb into LabsCrypt:main Apr 28, 2026
6 of 9 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

2 participants