fix(kyc): derive swissTaxResidence from the residence country instead of hardcoding true#679
Open
joshuakrueger-dfx wants to merge 1 commit into
Conversation
… of hardcoding true Every registration submit sent swissTaxResidence: true regardless of the user, so every non-Swiss registrant signed an EIP-712 payload asserting Swiss tax residence. Derive the flag from the selected residence (address) country (symbol == 'CH') instead. Note for review: residence country is used as the proxy for tax residence. If product wants an explicit "Swiss tax resident?" question (e.g. for cross-border cases), that is a follow-up UI change. Regression: test/screens/kyc/steps/kyc_registration_page_test.dart (CH => true, DE => false; the DE case fails on the old hardcoded value) Issue RealUnitCH#657 — Part 5, finding F6 (HIGH, compliance).
af18016 to
0ba15af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses Issue #657 — Part 5, finding F6 (HIGH, compliance).
Problem
_onSubmitsentswissTaxResidence: truehardcoded on every KYC registration — the value flows into the EIP-712-signed registration payload, so every non-Swiss registrant cryptographically asserted Swiss tax residence.Fix
Derive the flag from the selected residence (address) country:
countryCtrl.value!.symbol == 'CH'.Wohnsitzland wird als Proxy für Steuersitz verwendet (Big-Brother-Architect-Empfehlung). Falls ein explizites "Schweizer Steuersitz?"-UI-Feld gewünscht ist (Grenzgänger/Auslandschweizer), wäre das ein Follow-up.
Tests (RED→GREEN, proven)
New widget regressions driving the address-step submit: CH ⇒
true, DE ⇒false— the DE case fails on the old hardcoded value (verified). Suite 10/10 green,flutter analyzeclean.🤖 Big Brother fleet analysis + operator hand-finish. Ref #657.