fix(kyc): render pending page for dfxApproval instead of a blank screen#618
Conversation
Why this PR shows a red ✗ (it is not this change)The functional checks for this PR pass: Analyze & Test ✅, Coverage Floor Gate ✅, BitBox quirks audit ✅. The red is the Visual Regression job, and it is a pre-existing baseline drift, not caused by this PR. It fails on exactly one golden: Evidence that it is unrelated to this change:
Resolution: the drifted baseline needs to be regenerated via the |
|
Per global repo convention (
Please drop the issue ref before merge:
The in-code comment on the new Minor: consider renaming the test file to Fix itself looks correct (and the move to an exhaustive switch is a nice hardening). |
|
Re API as Decision Authority ( Underlying API question to verify separately: should
If |
|
@TaprootFreak done — dropped the |
|
Thanks for the layering review @TaprootFreak. Filed the API-classification follow-up as DFXswiss/api#3793 to confirm whether |
Status — ready for review
Open gate: formal maintainer approval (currently |
|
API-side root cause fixed in DFXswiss/api#3794: |
KycViewManager's KycSuccess step switch had no KycStep.dfxApproval case, so an in-progress dfxApproval step (emitted by _continueKyc) fell through to the (_) => const Scaffold() fallback — a blank white dead-end with no refresh/back. Route dfxApproval to the existing KycPendingPage (which has a refresh action), and drop the catch-all so the switch is exhaustive over KycStep: a future enum value becomes a compile error (forced handling) instead of a silent blank. Adds the first KycViewManager widget test, driving the real _continueKyc path to KycSuccess(dfxApproval) and asserting KycPendingPage renders. Refs RealUnitCH#613 (K1)
The dfxApproval routing fix shipped without its regression test (new file was not staged). Add the KycViewManager widget test that drives _continueKyc to KycSuccess(dfxApproval) and asserts KycPendingPage renders, not a blank Scaffold.
The earlier rename commit staged the file move with its original content; the issue-ref removal was lost. Remove it now as the reviewer requested.
2805ad6 to
084598e
Compare
Summary
KycViewManager'sKycSuccessstep switch had noKycStep.dfxApprovalcase. When_continueKycemitsKycSuccess(currentStep: KycStep.dfxApproval)(backendprocessStatus: InProgresswith aDfxApprovalcurrent step), it fell through to(_) => const Scaffold()— a blank white screen with no refresh/back, stranding the user.Fix:
dfxApprovalto the existingKycPendingPage(semantically "DFX is reviewing"; it already has a refresh action).(_)arm so the inner switch is exhaustive overKycStep— a future enum value becomes a compile error (forced handling) rather than another silent blank.Test
Adds the first
KycViewManagerwidget test: drives the real_continueKycpath toKycSuccess(dfxApproval)and assertsKycPendingPagerenders (not a blankScaffold).Verification (local, CI-equivalent, Flutter 3.41.6)
generate_localization→generate_release_info→build_runner→analyze→test:flutter analyzeon the changed files: No issues found.Scaffold→KycPendingPagenot found), confirming it catches the regression.Fixes the K1 item of #613.