Skip to content

Fix/wallet connect freighter error tests - #1314

Open
Seunfunmi-319509 wants to merge 3 commits into
LabsCrypt:mainfrom
Seunfunmi-319509:fix/wallet-connect-freighter-error-tests
Open

Fix/wallet connect freighter error tests#1314
Seunfunmi-319509 wants to merge 3 commits into
LabsCrypt:mainfrom
Seunfunmi-319509:fix/wallet-connect-freighter-error-tests

Conversation

@Seunfunmi-319509

Copy link
Copy Markdown

PR Summary

Added unit test coverage for the untested error paths in connectFreighter.

What was done

  • Added tests for FreighterNotInstalledError.
  • Added coverage for getAddress() failure handling.
  • Added coverage for the getNetworkDetails() try/catch fallback.
  • Mocked the Freighter API to simulate each failure scenario.
  • Verified the expected error and fallback behavior for each path.

Acceptance Criteria

  • FreighterNotInstalledError path is covered.
  • getAddress() failure path is covered.
  • getNetworkDetails() fallback path is covered.
  • All tests pass successfully.

The implementation is ready for review.

Closes #1287

Seunfunmi-319509 and others added 3 commits August 29, 2026 22:02
…and keeper-key model

Both indexerService.ts and soroban-indexer.service.ts reference
"docs/ARCHITECTURE.md for the full indexer ownership model" but no
such file existed in backend/docs/. This created a broken cross-
reference for contributors investigating the dual-indexer race (LabsCrypt#801)
and the keeper-key authorization model.

This adds backend/docs/ARCHITECTURE.md documenting:
- Indexer ownership: which of the three similarly-named files is
  authoritative, the dual-indexer race, and the phase-out plan
- SSE broadcast flow: end-to-end path from Soroban RPC through the
  worker, DB, SSE service, Redis fanout, to the frontend
- Keeper-key authorization: the custodial vs non-custodial signing
  model, the KEEPER_SECRET_KEY role, and the security boundary

Closes LabsCrypt#1299

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Adds tests for the three untested error branches in connectFreighter():
1. FreighterNotInstalledError when isConnected returns false
2. getAddress failure with no address or explicit error
3. getNetworkDetails catch fallback

Closes LabsCrypt#1287

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.

[Audit] No tests exist for connectFreighter's error paths

1 participant