Skip to content

refactor(kyc): drop unreachable KycRequired registration state#705

Merged
TaprootFreak merged 1 commit into
stagingfrom
refactor/kyc-drop-unreachable-kycrequired
Jun 8, 2026
Merged

refactor(kyc): drop unreachable KycRequired registration state#705
TaprootFreak merged 1 commit into
stagingfrom
refactor/kyc-drop-unreachable-kycrequired

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

Summary

Backend DFXswiss/api#3836 drops KycRequired from RealUnitRegistrationState (YAGNI — it is no longer emitted by GET /v1/realunit/registration). This removes the now-unreachable consumer-side handling so the app stops carrying dead code for a state the API never sends.

Changes

  • real_unit_registration_state.dart — remove the kycRequired(jsonName: 'KycRequired') enum value.
  • kyc_cubit.dart — remove the case RealUnitRegistrationState.kycRequired dispatch arm.
  • kyc_state.dart — remove the KycRequiredFailure state class.
  • kyc_page_manager.dart — remove the KycRequiredFailure()KycFailurePage switch arm.
  • real_unit_registration_info_dto.dart — drop the stale kycRequired mention from the doc comment.
  • strings_de.arb / strings_en.arb — remove the unused kycRequiredFailureMessage key.
  • docs/wallet-modes.md — drop the registration KycRequired references.
  • Tests — remove the obsolete KycRequired parse test and the KycRequiredFailure cubit test.

Note

PaymentInfoError.kycRequired (buy/sell) and the transaction-status kycRequired are unrelated concepts and remain untouched. After this change, an unexpected state: 'KycRequired' payload would throw ArgumentError (covered by the existing unknown-state test) — acceptable since the API no longer emits it.

Test plan

  • flutter analyze — clean (only a pre-existing, unrelated generated-i18n warning present on staging)
  • flutter test — 2272 non-golden tests pass
  • Visual Regression / goldens via CI (no golden references the removed state)

The API (DFXswiss/api#3836) removed KycRequired from
RealUnitRegistrationState (YAGNI — no longer emitted by
GET /v1/realunit/registration). Remove the now-unreachable consumer
handling: the enum arm, the KycCubit dispatch case, the KycRequiredFailure
state and its KycPageManager mapping, the kycRequiredFailureMessage i18n key
(de/en), a stale DTO doc comment, the wallet-modes doc references, and the
obsolete parse/cubit tests.

PaymentInfoError.kycRequired and the transaction status kycRequired are
unrelated and remain untouched.
@TaprootFreak TaprootFreak marked this pull request as ready for review June 8, 2026 12:13
@TaprootFreak TaprootFreak merged commit e8e1797 into staging Jun 8, 2026
12 checks passed
@TaprootFreak TaprootFreak deleted the refactor/kyc-drop-unreachable-kycrequired branch June 8, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant