Skip to content

[Docs] Update frontend architecture doc for wallet abstraction layer #521

Description

@collinsezedike

Summary

apps/docs/architecture/frontend.md still describes wallet connection as calling connectFreighter() directly. That function no longer exists in the codebase.

Motivation

The feat(web): extract wallet abstraction layer from Freighter flow commit replaced direct Freighter calls with a WalletAdapter interface (apps/web/src/lib/wallet.ts). useWalletConnect now calls wallet.connect() against a FreighterWallet implementation of that interface. No doc anywhere mentions this abstraction, so the architecture doc is both factually wrong (connectFreighter() doesn't exist) and missing the part of the design that matters most: this is exactly the seam the queued multi-wallet issues (xBull, LOBSTR) are meant to plug into.

Proposed Solution

Update the "Wallet store" section of frontend.md to describe the actual flow: useWalletConnect calls wallet.connect()/wallet.isInstalled()/wallet.isAuthorized() against the WalletAdapter interface, currently implemented only by FreighterWallet. Briefly note that adding a wallet means adding a new WalletAdapter implementation and selecting it, not touching callers.

Scope

Field Value
Area Docs
Protocol affected None
Network both
Breaking change? No

Alternatives Considered

None, this is a factual correction plus a missing-content gap, not a design decision.

Acceptance Criteria

  • frontend.md's wallet section reflects wallet.connect() via WalletAdapter, not connectFreighter()
  • Briefly documents the WalletAdapter interface and how a new wallet gets added
  • No remaining doc references to connectFreighter()

Additional Context

Found while auditing docs for staleness after recent PR/issue activity. connectFreighter() is confirmed absent from apps/web/src entirely, replaced by apps/web/src/lib/wallet.ts's WalletAdapter/FreighterWallet.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaigndocsDocumentation, guides, README, inline docs, or ADRsfrontendInvolves React components, Tailwind styling, or Next.js pagestrivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions