Split PR 578: KYC registration flow#610
Conversation
|
Re API as Decision Authority ( Wins ✅
Concern — int registrationInfoRetries = 4,
Duration registrationInfoRetryDelay = const Duration(seconds: 2),with the inline
That's the app deciding "Backend hasn't propagated yet → I'll try again in 2s". The rule (
The correct landing place for this is on the API side: either (a) The rest of the PR is in the correct layer (rendering API state, surfacing API errors). Only the retry loop pulls a server-side responsibility into the client. Suggested follow-up (consistent with pair-PR convention): open an issue in |
F1 (HIGH) BL-006 — BitBox reconnect dead-end: the disconnect-mid-sign
handler used to reset the merge latch, so the post-reconnect retry re-ran
the one-shot JWT account-id check. By then getAuthToken returns the merged
account on both reads, so the same-account-id guard dead-ended on
"email not confirmed" and the user could never finish. Keep _mergeDetected
set across the BitboxNotConnected path so the retry re-attempts the
registration SIGN. Removed the now-dead _initialMergeDetected mirror field.
Rewrote the cubit test that pinned the buggy reset to assert the retry
re-signs and succeeds (auth-side check runs exactly once).
F2 (MED) — KycInitial flashed the diagnostic catch-all ("Unhandled KYC
state: KycInitial") on the first frame. Route the pre-checkKyc() seed
state to KycLoadingPage. Added a KycViewManager test.
F3 (LOW) — corrected the misleading KycUnsupportedStepFailure docstring
(it described a re-entrant email-page route that does not happen; it is a
terminal failure page).
F4 (LOW) — BL-002 was untested: added a behavioral test for the Swiss
tax-residence auto-tick (CH → ticked, non-CH → cleared) and the
user-override latch (manual toggle stops the country listener overriding).
All red→green verified (each fix proven to fail when reverted/mutated);
flutter analyze clean; full KYC suite (204 tests) green.
9bb2fdc to
0eeaba1
Compare
Draft split from #578 after TaprootFreak review.
Scope:
Notes:
Validation: