FilOzone / FilOzone/filecoin-pay-explorer
refactor(explorer): split guided Squid funding orchestration
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 7
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 41
Description
## Description
Follow-up to #320. The guided Squid top-up flow now has explicit persistence, automatic refresh recovery, exact delivered-amount handling, and focused data-layer tests, but the two UI components still coordinate too many responsibilities.
Review context:
- Guided dialog lifecycle thread: https://github.com/FilOzone/filecoin-pay-explorer/pull/320#discussion_r3844722162
- Quote and execution thread: https://github.com/FilOzone/filecoin-pay-explorer/pull/320#discussion_r3846156714
## Scope
- Move restored acquisition state and lifecycle transitions into a dedicated hook or reducer.
- Isolate automatic arrival and refresh recovery orchestration from dialog rendering.
- Isolate Filecoin Pay deposit orchestration and wallet-network restoration.
- Split Squid token catalog, source balance, quote, wallet checks, and execution coordination into focused hooks.
- Extract presentational recovery and quote-review components where that makes state transitions easier to understand.
- Preserve the persisted-state, exact-delivered-amount, owner scoping, router trust, and cross-tab locking guarantees established in #320.
## Done criteria
- GuidedTopUpDialog primarily composes focused hooks and presentational sections.
- SquidQuoteReview no longer owns both all quote data loading and the full acquisition execution lifecycle.
- Acquisition, recovery, deposit, wallet-switch, quote, rejection, and balance-change paths remain covered without requiring full-dialog rendering for data-layer behavior.
- Existing #320 behavior and storage compatibility remain unchanged.
- Repository build, tests, type-check, lint, and format pass.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading GuidedTopUpDialog and SquidQuoteReview alongside the linked #320 review threads to map the existing lifecycle, quote, recovery, deposit, and wallet responsibilities. Done means those components compose focused hooks or presentational sections while preserving #320 behavior and storage compatibility, with the listed acquisition and recovery paths covered and build, tests, type-check, lint, and format passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, payments
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100