Severity
Medium. Follow-ups left open by #519.
1. Empty filtered list is a silent dead-end
lib/widgets/form/country_field.dart — after filtering by purpose, if the result is empty (where(purpose.allows) yields nothing), the widget renders a DropdownField with items: []. The user sees an empty, un-openable dropdown with no error and no retry; the form stays permanently invalid with no explanation. There is no isEmpty branch analogous to the error branch.
2. Duplicate parallel GET /v1/country
DfxCountryService is registered via registerCachedFactory (lib/setup/di.dart), which is a weak-reference cache, not a true singleton. getAllCountries() checks cachedCountries before its await and sets it only afterwards, with no stored in-flight Future. Two CountryFields mounted in the same frame (the registration step has two) both see an empty cache and fire two parallel GET /v1/country requests. Storing the in-flight future would deduplicate this.
3. Hardcoded, non-localized hintText: 'Schweiz'
country_field.dart passes a hardcoded German hintText: 'Schweiz'. The widget serves four purposes (citizenship + country) and the app is DE/EN localized. The hint is not localized and misleadingly suggests a preselection even though initialValue is null. It should be a localized, neutral hint (or removed).
4. getCountryBySymbol failure crashes the whole settings page
SettingsUserDataCubit (lib/screens/settings_user_data/cubit/settings_user_data_cubit.dart) resolves nationality / addressCountry via getCountryBySymbol. If that throws (e.g. the backend returns a symbol not present in /v1/country), it lands in the generic catch and emits SettingsUserDataFailure — the entire user-data page fails over a single unknown country symbol. Inconsistent with the robust per-field error handling CountryField received in #519.
Context
Found during a deep audit of the KYC country/nationality data path (see #519).
Severity
Medium. Follow-ups left open by #519.
1. Empty filtered list is a silent dead-end
lib/widgets/form/country_field.dart— after filtering bypurpose, if the result is empty (where(purpose.allows)yields nothing), the widget renders aDropdownFieldwithitems: []. The user sees an empty, un-openable dropdown with no error and no retry; the form stays permanently invalid with no explanation. There is noisEmptybranch analogous to the error branch.2. Duplicate parallel
GET /v1/countryDfxCountryServiceis registered viaregisterCachedFactory(lib/setup/di.dart), which is a weak-reference cache, not a true singleton.getAllCountries()checkscachedCountriesbefore itsawaitand sets it only afterwards, with no stored in-flightFuture. TwoCountryFields mounted in the same frame (the registration step has two) both see an empty cache and fire two parallelGET /v1/countryrequests. Storing the in-flight future would deduplicate this.3. Hardcoded, non-localized
hintText: 'Schweiz'country_field.dartpasses a hardcoded GermanhintText: 'Schweiz'. The widget serves four purposes (citizenship + country) and the app is DE/EN localized. The hint is not localized and misleadingly suggests a preselection even thoughinitialValueisnull. It should be a localized, neutral hint (or removed).4.
getCountryBySymbolfailure crashes the whole settings pageSettingsUserDataCubit(lib/screens/settings_user_data/cubit/settings_user_data_cubit.dart) resolvesnationality/addressCountryviagetCountryBySymbol. If that throws (e.g. the backend returns a symbol not present in/v1/country), it lands in the generic catch and emitsSettingsUserDataFailure— the entire user-data page fails over a single unknown country symbol. Inconsistent with the robust per-field error handlingCountryFieldreceived in #519.Context
Found during a deep audit of the KYC country/nationality data path (see #519).