Skip to content

fix(identity): resolve KycTier merge markers + style: cargo fmt --all#553

Merged
nanaf6203-bit merged 1 commit into
mainfrom
fix/cargo-fmt-post-smoke
Jun 24, 2026
Merged

fix(identity): resolve KycTier merge markers + style: cargo fmt --all#553
nanaf6203-bit merged 1 commit into
mainfrom
fix/cargo-fmt-post-smoke

Conversation

@nanaf6203-bit

Copy link
Copy Markdown
Contributor

What

  • Resolve the unresolved git conflict markers in contracts/identity/lib.rs (the KycTier enum, lines 227-244) by picking the main side, preserving both 5-variant CamelCase naming (Tier3Enhanced) AND 5-variant underscored naming (Tier3_Enhanced). Both forms are already in active use throughout the rest of the file (complete_kyc_verification matches both, tests reference both, initialize_kyc_tiers initializes as CamelCase).
  • Apply cargo fmt --all to the workspace (21 files, ~742 +/- 708).

Why

KycTier carried conflict markers from PR #547 (7b283b86) that was squash-merged into main, which had been blocking the new smoke.yml cargo fmt --check step from running on main.

Heads-up: cargo fmt --check is still red on this tree

I did not auto-merge this PR. A separate structural issue in the workspace layout prevents cargo fmt --all -- --check from exiting 0 even with this PR applied:

  • contracts/insurance/src/lib.rs declares mod premium_engine; inside #[ink::contract] mod propchain_insurance { ... }, so the compiler looks for src/propchain_insurance/premium_engine.rs. The .rs file is currently at flat src/premium_engine.rs.
  • Same pattern in contracts/tax-compliance/src/lib.rs: mod tax_engine;, mod jurisdiction_presets;, mod tax_strategies; declared inside mod tax_compliance { ... }, files at flat src/. Compiler looks for src/tax_compliance/{tax_engine,jurisdiction_presets,tax_strategies}.rs.

Required follow-up (separate PR): git mv the four flat .rs files into the expected subdirectories, plus a handful of caller-path updates (payments.rs uses crate::tax_engine, which becomes crate::tax_compliance::tax_engine after the move; compliance.rs and optimization.rs likewise).

Scope

Path Diff
contracts/identity/lib.rs conflict markers resolved to main-side 10-variant list
20 other files cargo fmt --all auto-format only

Branch: fix/cargo-fmt-post-smoke
Base: main
Diff stat: 21 files, +742/-708

… --all

- contracts/identity/lib.rs: pick main side of unresolved
  conflict markers (lines 227-244) around the KycTier enum,
  preserving both 5-variant CamelCase and 5-variant
  underscored naming forms (Tier3Enhanced AND Tier3_Enhanced)
  because callers (complete_kyc_verification, tests, etc.)
  already use both styles.

- 20 additional files reformatted by `cargo fmt --all`.

NOTE: `cargo fmt --all -- --check` STILL exits 1 on this
tree. Structural bug in workspace layout: contracts/insurance/src/
declares `mod premium_engine;` inside `mod propchain_insurance
{ ... }`, but premium_engine.rs lives at the flat src/ level,
not at src/propchain_insurance/premium_engine.rs. Same issue in
contracts/tax-compliance/src/ for tax_engine / jurisdiction_presets
/ tax_strategies. Companion PR (or follow-up) needed for the file
moves before cargo fmt --check can pass.
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