features/wallet/swap_deep_scan
library
Classes
-
DeepScanRestoreNoteController
-
-
SwapDeepScanController
-
The single-flight owner of the deep scan. State = in-flight.
-
SwapDeepScanProgress
-
The main-surface progress cue's state (C1 / review H2): a widen keeps
surfacing older swap money for MINUTES after the sheet closes, so — once the
user has run a scan this session — a dismissible "still checking" banner
reports it while
SwapAddressCoverage.pending > 0. Gated on ran so it is
the CONSEQUENCE of the user's explicit action, never noise on every restored
wallet's ordinary first-sync backfill (which the #380 catch-up cue owns).
-
SwapDeepScanProgressController
-
Properties
-
deepScanRestoreNoteProvider
→ AsyncNotifierProvider<DeepScanRestoreNoteController, DeepScanRestoreNoteState>
-
The one-time POST-RESTORE note's lifecycle (#390 C2 / review H1), read from
the onboarding store where the controller writes it definitively at each
activation. Rebuilds on an identity change so a new wallet re-reads its OWN
provenance. Fail-soft: no store (a session-only host) or a read fault ⇒
notApplicable (no note — the note is a package-onboarding affordance).
final
-
swapAddressCoverageReadProvider
→ FutureProvider<SwapAddressCoverage?>
-
The render-only coverage read backing the sheet's "checked your first N swaps"
line.
autoDispose — it lives only while a sheet holds it, and re-pulls after
a scan (the controller invalidates it). Fail-soft null on no session; a
bridge fault surfaces as the FutureProvider's error arm (the sheet renders a
neutral fallback, never a scary error).
final
-
swapDeepScanInFlightProvider
→ NotifierProvider<SwapDeepScanController, bool>
-
#390 — the "Check older swap addresses" DEEP SCAN: the SDK's own in-app
recovery of a seed-only restore's older swap deposits/refunds (the #387
residual (a)). It WIDENS the range the wallet watches; the normal sync then
surfaces any older swap money into the balance over the next minutes — it does
NOT itself find funds, and it moves NO money (no authorizer). Its
SINGLE-FLIGHT latch (swapDeepScanInFlightProvider) both prevents a second
concurrent widen and drives the sheet's disabled/in-progress cue.
final
-
swapDeepScanProgressProvider
→ NotifierProvider<SwapDeepScanProgressController, SwapDeepScanProgress>
-
Session-scoped owner of the progress cue (the cross-process discoverability
is the post-restore note's job, not this transient in-session banner).
final
Functions
-
deepScanRefusalMessage(WalletLocalizations l10n, WalletApiError e)
→ String
-
Map a typed
WalletApiError from the deep scan to its honest copy: the two
refusal reasons get distinct guidance; anything else is the neutral
"couldn't start" (nothing changed).
-
showSwapDeepScanSheet(BuildContext context)
→ Future<void>
-
Open the "Check older swap addresses" sheet — a modal bottom sheet (a
deliberate recovery, adjacent to Rescan in the overflow menu). Exits through
its own Close (the scan runs in the background regardless once started).