Skip to content

fix: repair merge-corrupted files and restore CI - #580

Merged
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
Markodiba:fix/ci-merge-corruption-and-broken-tests
Aug 24, 2026
Merged

fix: repair merge-corrupted files and restore CI#580
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
Markodiba:fix/ci-merge-corruption-and-broken-tests

Conversation

@Markodiba

@Markodiba Markodiba commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Repairs several files that had duplicate/interleaved code left behind by bad merges, breaking tsc, npm test, and npm run build:
    • lib/stellar.ts — missing closing brace between two functions
    • app/error.tsx — two competing error-parsing helpers spliced together
    • components/layout/testnet-faucet-banner.tsx — two full component implementations concatenated; kept the current Friendbot-funding version
    • app/app/analytics/page.tsx and components/analytics/charts.tsx — reconstructed from git history by replaying the legitimate SECONDS_PER_DAY and per-token-decimals fixes onto the last known-good version, dropping dead code pulled in by mistake
  • Fixes stale/broken tests uncovered once those files could compile again:
    • Deletes use-bulk-actions.test.ts / use-bulk-select.test.ts, which tested hooks deliberately removed as dead code long before a stale PR re-added tests for them
    • Fixes missing TokenInfo.address / StreamData.linearAmount+duration fields, a missing afterEach import, and a nonexistent toEndWith matcher in test fixtures
    • Updates webhook-settings tests to check the inline field errors the component renders now, instead of the toast calls it used before a later, deliberate UX fix
    • Fixes a real bug in useTokenPrice/usePortfolioValue: an empty stream list returned totalUsd=null instead of 0, and the price cache's error fallback never actually restored the last known-good price into a new component instance
    • Fixes module-level price-cache leakage between tests via vi.resetModules() + dynamic import, matching the pattern already used elsewhere in this repo
    • Fixes flaky act()/fake-timer interactions in use-auto-withdraw and use-contract tests
  • Documents NEXT_PUBLIC_STELLAR_NETWORK in .env.local.example and DEPLOYMENT.md, which picks the network but was previously undocumented

Test plan

Several files had duplicate/interleaved code left behind by bad merges
that broke tsc, npm test, and npm run build:

- lib/stellar.ts: missing closing brace between two functions
- app/error.tsx: two competing error-parsing helpers spliced together
- components/layout/testnet-faucet-banner.tsx: two full component
  implementations concatenated; kept the current Friendbot-funding
  version
- app/app/analytics/page.tsx and components/analytics/charts.tsx:
  reconstructed from git history, replaying the legitimate
  SECONDS_PER_DAY and per-token-decimals fixes onto the last
  known-good version and dropping dead code pulled in by mistake

Also fixed several stale/broken tests uncovered once these files
could compile again:

- Deleted __tests__/hooks/use-bulk-actions.test.ts and
  use-bulk-select.test.ts, which tested hooks deliberately deleted as
  dead code long before a stale PR re-added tests for them
- Fixed missing TokenInfo.address / StreamData.linearAmount+duration
  fields, a missing afterEach import, and a nonexistent toEndWith
  matcher in test fixtures
- Updated webhook-settings tests to check the inline field errors the
  component renders now instead of the toast calls it used before a
  later, deliberate UX fix
- Fixed a real bug in useTokenPrice/usePortfolioValue: an empty
  stream list returned totalUsd=null instead of 0, and the price
  cache's error fallback never actually restored the last known-good
  price into a new component instance
- Fixed module-level price-cache leakage between tests via
  vi.resetModules() + dynamic import, matching the existing pattern
  used elsewhere in this repo
- Fixed flaky act()/fake-timer interactions in use-auto-withdraw and
  use-contract tests

Also documented NEXT_PUBLIC_STELLAR_NETWORK in .env.local.example and
DEPLOYMENT.md, which picks the network but was previously undocumented.
@Austinaminu2
Austinaminu2 merged commit 7c867eb into FlowwStar:main Aug 24, 2026
2 of 6 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.

Document NEXT_PUBLIC_STELLAR_NETWORK in .env.local.example and DEPLOYMENT.md

2 participants