Skip to content

fix: frontend component refactors, dead code cleanup, and docs update (#580, #581, #582, #583) - #590

Merged
ogazboiz merged 4 commits into
LabsCrypt:mainfrom
SharifIbrahimDev:main
May 30, 2026
Merged

fix: frontend component refactors, dead code cleanup, and docs update (#580, #581, #582, #583)#590
ogazboiz merged 4 commits into
LabsCrypt:mainfrom
SharifIbrahimDev:main

Conversation

@SharifIbrahimDev

Copy link
Copy Markdown

Description

This Pull Request bundles fixes for frontend consistency, code cleanliness, and documentation accuracy in the FlowFi repository.

Closes

Changes Included

  1. Duplicated duration-unit-to-seconds constants ([Frontend] Duplicated duration-unit-to-seconds constants (ScheduleStep vs lib/soroban) #580)

    • Exported a shared SECONDS_PER_UNIT map and DurationUnit type from frontend/src/lib/soroban.ts.
    • Refactored ScheduleStep.tsx to use the shared constants instead of inline magic numbers and switch statements for calculating totalSeconds.
    • Ensures the wizard rate previews align perfectly with the submitted duration.
  2. Dead code in WalletButton ([Frontend] Remove commented-out dead code in WalletButton #581)

    • Cleaned up WalletButton.tsx by removing the commented-out networkLabel logic and the abandoned wallet-chip__name / wallet-chip__network markup.
    • Preserved the network-mismatch warning in the dropdown exactly as requested.
  3. Global timeout shadowing ([Frontend] StreamCreationWizard shadows global 'timeout' with a state variable #582)

    • Renamed the timeout state variable in StreamCreationWizard.tsx to timeoutError to prevent shadowing the global timeout function.
    • Adjusted all corresponding JSX branches ({timeoutError ? ... : ...}).
    • Ensures no behavior change while vastly improving readability alongside the existing setTimeout calls in the polling function.
  4. Postgres Port Mismatch in Docs ([Docs] README states Postgres on port 5432 but docker-compose maps 5433 #583)

    • Updated README.md to state the correct host port 5433 (matching the docker-compose.yml mapping).
    • Updated backend/.env.example to point the DATABASE_URL and SANDBOX_DATABASE_URL examples to localhost:5433.

Verification

  • Duration calculations work correctly across the stream creation wizard and Soroban interactions.
  • WalletButton.tsx is cleaner and maintains full expected functionality.
  • Polling in StreamCreationWizard.tsx continues to work properly and the code is clearer.
  • The repository documentation is now aligned perfectly with the actual docker compose configuration, eliminating setup confusion for new contributors.

@ogazboiz
ogazboiz merged commit ff6eed3 into LabsCrypt:main May 30, 2026
8 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