Public report of noncelab/coconut_wallet, published 16 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 16 November 2026, 17:06 UTC · Survey ID cd_75373a736f1e4e33ad590dca8eeedb1e

noncelab/coconut_wallet

Measured 16 November 2026, 17:02 UTC, at code version bbc0bc3

First survey, so nothing to compare with yet
CAI score 57.3out of 100 At risk

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 195,876 lines of product code in 11 projects, tests not counted · Estimated rebuild effort: about 1.9 person-years · Weakest lens: Production Readiness, 50.9

Findings by how serious they are

20 critical 1073 serious 80 minor

11 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 17:02 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

65of 65 dimensions measured by tools.
1157of 1173 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
65dimensions across 8 lenses, read from 195,876 lines of product code in 11 projects.
Chapters

Executive summary

noncelab/coconut_wallet is rated At risk because critical security findings are open. Its score is held back because we found no automated security scanning of the code, its secrets or its dependencies. It scores 57.3 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 50.9, is the weakest lens and counts most in the score. The best first step is adding automated security scanning, worth about 4.6 points. Restoring certificate checks comes next, worth about 3.0 points. Raising Production Readiness to 70 would lift the score to about 61.8.

Two settings leave the servers or containers unsafe. One known security hole in a package the code depends on can be used by attackers, and eleven sets of files in separate parts keep changing together, which points to hidden dependencies. Correcting the unsafe settings, updating the vulnerable packages and making the hidden dependencies explicit would close these risks. Passing outside input through environment variables would fix the pipeline step that puts outside input straight into a shell command, and keeping the personal data out of the places it leaks to is also needed. Saving the change and the message together would take care of the two places where data is saved and a message sent separately.

The product code is 195,876 lines, about €280,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 50.9 · counts for 45%Security and Compliance 56.1 · counts for 25%Performance 60.0 · counts for 14%Code Health 66.0 · counts for 8%Maturity 78.7 · counts for 4%Event-Driven 79.9 · counts for 2%Architecture 97.1 · counts for 1%Domain Modelling 100.0 · counts for 1%

If Production Readiness rose from 50.9 to 70, the lowest score rated Strong, the score would rise from 57.3 to about 61.8.

Code composition: what the lines of code are
Product code 72%Tests 28%
Rebuild cost: about €280,000 · Estimate
Cost to rebuild€93,000 to €470,000, for 1,555 to 4,932 hours of work, about 1.9 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 57. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 195,876 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
Raises the score by about 4.6 points · Medium effort · Security & performance tooling
2
Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off.
Raises the score by about 3.0 points · Medium effort · Web-Security Posture
3
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Raises the score by about 2.8 points · Medium effort · Deployment & Rollback

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €280,000 to build again, about 1.9 person-years of work. Its weakest lens is Production Readiness, at 50.9 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing. Of all the actions in this report, it raises the score most for the work it takes: about 4.6 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch android android android:app android:app coconut_wallet coconut_wallet mobile_scanner (pub) mobile_scanner (pub) coconut_wallet->mobile_scanner (pub) ur ur coconut_wallet->ur coconut_wallet/go go mobile_scanner (Gradle) mobile_scanner (Gradle) mobile_scanner (SwiftPM) mobile_scanner (SwiftPM) trezor-bridge trezor-bridge trezor-connect-rs trezor-connect-rs trezor-bridge->trezor-connect-rs

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

103 modules, with 141 dependencies between them. 2 loops run through 14 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 63 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 bridge2 dev.steenbakker.mobile_scanner.objects3 repository.design_system4 repository.packages5 trezor_connect_rs.protocol.thp.state6 trezor_connect_rs.protocol.v17 trezor_connect_rs.transport.session8 trezor_connect_rs.transport.traits9 trezor_connect_rs.types.bitcoin10 trezor_connect_rs.types.network11 dev.steenbakker.mobile_scanner12 repository.enums13 trezor_connect_rs.api.address14 trezor_connect_rs.api.public_key15 trezor_connect_rs.compose.coinselect16 trezor_connect_rs.credential_store17 trezor_connect_rs.device.trezor18 trezor_connect_rs.params19 trezor_connect_rs.protocol.thp20 trezor_connect_rs.psbt21 repository.app22 repository.services23 repository.utils24 trezor_connect_rs.api.compose25 trezor_connect_rs.bitcoin_utils26 trezor_connect_rs.connected_device27 trezor_connect_rs.transport.callback28 trezor_connect_rs.transport.usb29 repository.repository30 trezor_bridge31 trezor_connect_rs.transport.bluetooth32 repository.ccos33 repository.core34 trezor_connect_rs.trezor35 repository.widgets36 repository.screens37 repository.providers38 repository.model39 repository.analytics40 repository
1 bridge
2 dev.steenbakker.mobile_scanner.objects
3 repository.design_system
4 repository.packages
5 trezor_connect_rs.protocol.thp.state
6 trezor_connect_rs.protocol.v1
7 trezor_connect_rs.transport.session
8 trezor_connect_rs.transport.traits
9 trezor_connect_rs.types.bitcoin
10 trezor_connect_rs.types.network
11 dev.steenbakker.mobile_scanner2
12 repository.enums11
13 trezor_connect_rs.api.address1
14 trezor_connect_rs.api.public_key1
15 trezor_connect_rs.compose.coinselect2
16 trezor_connect_rs.credential_store1
17 trezor_connect_rs.device.trezor1
18 trezor_connect_rs.params55
19 trezor_connect_rs.protocol.thp1
20 trezor_connect_rs.psbt11
21 repository.app4112
22 repository.services25326
23 repository.utils245
24 trezor_connect_rs.api.compose213
25 trezor_connect_rs.bitcoin_utils111
26 trezor_connect_rs.connected_device111110
27 trezor_connect_rs.transport.callback11111
28 trezor_connect_rs.transport.usb11121
29 repository.repository2212
30 trezor_bridge18
31 trezor_connect_rs.transport.bluetooth11211
32 repository.ccos2
33 repository.core11114
34 trezor_connect_rs.trezor1111
35 repository.widgets729212536
36 repository.screens3356111413587652
37 repository.providers1554311615911114
38 repository.model151
39 repository.analytics11
40 repository1151
Uses a module listed above itPart of a loopThe module itself
1 bridge2 dev.steenbakker.mobile_scanner.objects3 repository.design_system4 repository.packages5 trezor_connect_rs.protocol.thp.state6 trezor_connect_rs.protocol.v17 trezor_connect_rs.transport.session8 trezor_connect_rs.transport.traits9 trezor_connect_rs.types.bitcoin10 trezor_connect_rs.types.network11 dev.steenbakker.mobile_scanner12 repository.enums13 trezor_connect_rs.api.address14 trezor_connect_rs.api.public_key15 trezor_connect_rs.compose.coinselect16 trezor_connect_rs.credential_store17 trezor_connect_rs.device.trezor18 trezor_connect_rs.params19 trezor_connect_rs.protocol.thp20 trezor_connect_rs.psbt21 repository.app22 repository.services23 repository.utils24 trezor_connect_rs.api.compose25 trezor_connect_rs.bitcoin_utils26 trezor_connect_rs.connected_device27 trezor_connect_rs.transport.callback28 trezor_connect_rs.transport.usb29 repository.repository30 trezor_bridge31 trezor_connect_rs.transport.bluetooth32 repository.ccos33 repository.core34 trezor_connect_rs.trezor35 repository.widgets36 repository.screens37 repository.providers38 repository.model39 repository.analytics40 repositorybridge1dev.steenbakker.mobile_scanner.objects2repository.design_system3repository.packages4trezor_connect_rs.protocol.thp.state5trezor_connect_rs.protocol.v16trezor_connect_rs.transport.session7trezor_connect_rs.transport.traits8trezor_connect_rs.types.bitcoin9trezor_connect_rs.types.network10dev.steenbakker.mobile_scanner11repository.enums12trezor_connect_rs.api.address13trezor_connect_rs.api.public_key14trezor_connect_rs.compose.coinselect15trezor_connect_rs.credential_store16trezor_connect_rs.device.trezor17trezor_connect_rs.params18trezor_connect_rs.protocol.thp19trezor_connect_rs.psbt20repository.app21repository.services22repository.utils23trezor_connect_rs.api.compose24trezor_connect_rs.bitcoin_utils25trezor_connect_rs.connected_device26trezor_connect_rs.transport.callback27trezor_connect_rs.transport.usb28repository.repository29trezor_bridge30trezor_connect_rs.transport.bluetooth31repository.ccos32repository.core33trezor_connect_rs.trezor34repository.widgets35repository.screens36repository.providers37repository.model38repository.analytics39repository402111121155111411225326245213111111110111111112122121811211211114111172921253633561114135876521554311615911114151111151+63 more modules (most-connected shown)

At a glance — Code Health · 66.0 · Adequate ·

At a glance — Architecture · 97.1 · Exemplary ·

At a glance — Maturity · 78.7 · Strong ·

At a glance — Readiness · 50.9 · Adequate · gated by P3 ·

At a glance — Security · 56.1 · Adequate · gated by D36 ·

At a glance — Domain Modelling · 100.0 · Exemplary ·

At a glance — Event-Driven · 79.9 · Strong ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures7High / Critical
A02:2025 — Security Misconfiguration4High / Critical
A05:2025 — Injection3High / Critical
A01:2025 — Broken Access Control1High / Critical

Roadmap

Top priorities: Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing; Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off; Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.+4.6 ptsMediumSecurity & performance tooling
Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off.+3.0 ptsMediumWeb-Security Posture
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+2.8 ptsMediumDeployment & Rollback
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+2.4 ptsMediumObservability
Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.+2.3 ptsMediumAsync & latency hygiene
Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.+1.8 ptsMediumCI/CD gates
Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED.+0.9 ptsLowData Compliance (PII/GDPR)
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+0.6 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 236 files carrying findings, judged against the Production bar: 2% slop · 64% mixed · 34% near-clean.

FileScoreBandWorst signal
REDACTED3.0SlopIaC & Container Security: High IaC: REDACTED
lib/providers/wallet_provider.dart3.2SlopChange Coupling: Boundary-crossing change coupling: wallet_provider.dart ↔ wallet_preferences_repository.dart
lib/providers/view_model/send/connected/trezor_sign_view_model.dart3.5SlopChange Coupling: Boundary-crossing change coupling: trezor_sign_view_model.dart ↔ trezor_ble_connect_screen.dart
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart3.9SlopChange Coupling: Boundary-crossing change coupling: bitbox02_sign_viewmodel.dart ↔ send_confirm_screen.dart
lib/design_system/tokens/coconut_colors.dart5.0MixedChange Coupling: Boundary-crossing change coupling: coconut_colors.dart ↔ theme_bottom_sheet.dart
lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart5.0MixedChange Coupling: Boundary-crossing change coupling: trezor_ble_connect_view_model.dart ↔ trezor_usb_connect_screen.dart
lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart5.1MixedChange Coupling: Boundary-crossing change coupling: bitbox02_connect_viewmodel.dart ↔ send_confirm_screen.dart
lib/screens/wallet_detail/wallet_detail_screen.dart5.1MixedChange Coupling: Boundary-crossing change coupling: wallet_detail_screen.dart ↔ wallet_detail_sticky_header.dart
REDACTED5.1MixedDependency Vulnerabilities: Critical CVE: REDACTED
lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart5.5MixedCyclomatic Complexity: _BitBox02ConnectScreenState._buildPrimaryActionButton (cyclomatic 18)
lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart5.5MixedCyclomatic Complexity: _TrezorBleConnectScreenState._buildPrimaryActionButton (cyclomatic 18)
lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart5.5MixedGod Classes: ClassTooLong: _WalletCardDetailScreenState
lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart5.7MixedCognitive Complexity: UtxoOverviewViewModel.updateSelectedUtxosStatus (cognitive 18)
lib/providers/view_model/wallet_detail/wallet_info_view_model.dart5.9MixedCyclomatic Complexity: WalletInfoViewModel.getTaprootParticipants (cyclomatic 16)
lib/repository/realm/wallet_repository.dart5.9MixedCyclomatic Complexity: WalletRepository.deleteWallet (cyclomatic 16)
lib/providers/view_model/send/utxo_selection_view_model.dart5.9MixedGod Classes: TooManyMethods: UtxoSelectionViewModel
lib/screens/send/send_screen.dart6.0MixedExplicit Debt: TodoComment
lib/widgets/features/wallet/card/wallet_info_item_card.dart6.0MixedExplicit Debt: TodoComment
lib/screens/wallet_detail/address_list_screen.dart6.0MixedExplicit Debt: TodoComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 20

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1073

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 80

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 11

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 65 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 65 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D19D20D21D22D26D28D29D30D31D32D34D35D36D43D44AX1AX10AX3AX4AX6AX9DM5ED4GD1IC1M1M2M3M4P1P10P2P3P4P6PF3S1X1X12X14X16X17X18X2X21X23X25X27X28X29X3X30X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1157 of 1173 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1e54f-6007-76ea-be7e-5177db7d5c62.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .rs, .dart, and our analyzer cannot run the .dart test suite(s) — so no coverage was collected for the repository as a whole. The Rust half did build and run, and its own line coverage came back at 30.0% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.dart) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems), but the licence verdict published here was taken over its pub package dependencies. Nothing was read about its Bundler dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its pub package dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its pub package dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt`, `lib/packages/mobile_scanner/darwin/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. User interface: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. Boot: crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:32768: page.goto: Timeout 30000ms exceeded. Call log: - navigating to "http://127.0.0.1:32768/", waiting until "load" .
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'package:realm' is imported (lib/services/realm_debug_service.dart:4), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'package:realm' is imported (lib/services/realm_debug_service.dart:4), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'package:realm' is imported (lib/services/realm_debug_service.dart:4), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'package:realm' is imported (lib/services/realm_debug_service.dart:4), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 39 further occurrence(s) are not listed individually; the score already reflects all 79.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.8 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.8 / 10 · rule-coverage 100% · ceiling Prevented

91 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was LongPressedMenuWidgetState.showMenu at 49. A further 5 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Bitbox02MethodHandler.handleMethod at 21 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt (Bitbox02MethodHandler.handleMethod at 21), ios/Runner/Bitbox02MethodHandler.swift (Bitbox02MethodHandler.handle at 21). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

LongPressedMenuWidgetState.showMenu (cyclomatic 49)lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307
SeedQrDecoder._getUsefulBits (cyclomatic 46)lib/utils/seed_qr_decoder.dart:105
_BalanceHistoryWalletBreakdownState.build (cyclomatic 43)lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart:116
HomeItemsViewState._updatePreview (cyclomatic 41)lib/widgets/features/home/home_items_view.dart:285
_UtxoCoinCardState.build (cyclomatic 39)lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:471

+ 86 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 8 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with LongPressedMenuWidgetState.showMenu (cyclomatic 49), SeedQrDecoder._getUsefulBits (cyclomatic 46), _BalanceHistoryWalletBreakdownState.build (cyclomatic 43). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 8 together lifts Cyclomatic Complexity from 6.8 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity6.1 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 100% · ceiling Prevented

187 method(s) exceeded the cognitive complexity threshold of 15; the worst was _BalanceHistoryWalletBreakdownState.build at 68.

_BalanceHistoryWalletBreakdownState.build (cognitive 68)lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart:116
_SendScreenState._startHotWalletSigning (cognitive 67)lib/screens/send/send_screen.dart:926
LongPressedMenuWidgetState.showMenu (cognitive 61)lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307
NetworkService.getRecommendedFees (cognitive 57)lib/providers/node_provider/network_service.dart:55
_SendConfirmScreenState._signHotWallet (cognitive 54)lib/screens/send/send_confirm_screen.dart:452

+ 182 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with _BalanceHistoryWalletBreakdownState.build (cognitive 68), _SendScreenState._startHotWalletSigning (cognitive 67), LongPressedMenuWidgetState.showMenu (cognitive 61). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 6.1 to about 6.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes7.6 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.6 / 10 · rule-coverage 100% · ceiling Prevented

188 god class(es) detected.

MethodTooLong: LongPressedMenuWidgetState.showMenu · ×64lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307
FileTooLong: send/send_screen.dart · ×47lib/screens/send/send_screen.dart
ClassTooLong: _SendScreenState · ×39lib/screens/send/send_screen.dart:119
TooManyMethods: SendViewModel · ×38lib/providers/view_model/send/send_view_model.dart:89

What to do

  1. Resolve the 64 MethodTooLong finding(s) in God Classes — start with coconut_colors.dart (5), send_screen.dart (3), coconut_open_store_first_pow_scene.dart (2). — One of this dimension's main actionable groups (64 warning-level).
  2. Resolve the 47 FileTooLong finding(s) in God Classes — start with send_screen.dart, utxo_split_screen.dart, p2p_calculator_screen.dart. — One of this dimension's main actionable groups (47 warning-level).
  3. Resolve the 39 ClassTooLong finding(s) in God Classes — start with send_screen.dart, p2p_calculator_screen.dart, coconut_colors.dart. — One of this dimension's main actionable groups (39 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication7.9 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.9 / 10 · rule-coverage 100% · ceiling Verified

182 duplicated block group(s) detected. 5.1 % of the production lines (10,049 of 195,876) are in a reported copy. A further 159 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (10 lines × 2) · ×15lib/design_system/tokens/coconut_colors.dart:952
Duplicated block (9 lines × 2) · ×11lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:110
Duplicated block (12 lines × 2) · ×10lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:317
Duplicated block (11 lines × 2) · ×10lib/providers/transaction_provider.dart:18
Duplicated block (7 lines × 2) · ×10lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:247

+ 134 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 15 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with trezor_ble_connect_screen.dart (3), label_management_screen.dart (2), coconut_colors.dart. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 11 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with unsigned_transaction_qr_screen.dart (2), trezor_ble_connect_view_model.dart, bitbox02_connect_screen.dart. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 10 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with transaction_list_view_model.dart, coconut_open_store_intro_screen.dart, all_features_screen.dart. — One of this dimension's main actionable groups (10 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

10 production modules (Gradle+Cargo+Go+SwiftPM+pub), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 4 of the 10 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.6 / 10Stronggated by 15 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Verified

15 of 492 classes have LCOM4 above 3.

Low cohesion: WalletRepository (LCOM4 13) · ×15lib/repository/realm/wallet_repository.dart:27

What to do

  1. Resolve the 15 Low cohesion finding(s) in Cohesion (LCOM4) — start with wallet_repository.dart, utxo_overview_view_model.dart, utxo_merge_view_model.dart. — One of this dimension's main actionable groups (15 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

2 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.

Outdated: github.com/btcsuite/btcd · ×2

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 202 resolved pub package(s) use a banned license. Licences were read from pub.dev's analysis of each package's licence file. ★ This repository commits no pubspec.lock (Dart's guidance for a package), so the graph was closed here: the 55 package(s) its pubspec declares under dependencies, and transitively every package their published pubspecs declare, each at the newest release its constraint admits — the release a fresh `pub get` picks wherever constraints agree; where two disagree the first to reach the package was taken. dev_dependencies are not part of it. The packages the `flutter`, `flutter_localizations`, `flutter_test`, `flutter_web_plugins` SDK itself pins are the toolchain's and were not reached. pub.dev analyses only recent releases, so for 16 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one. ★ COVERAGE OF THIS VERDICT: it grades this repository's pub package dependencies and nothing else. The repository also declares a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems), a Go module (REDACTED/go.sum) and a Gradle build (build.gradle/build.gradle.kts), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 109 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: lib/screens/send/send_screen.dart (41×28=1148); lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart (36×24=864); lib/widgets/features/home/home_items_view.dart (17×41=697) Repeated repair below the complexity floor: lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart (20 of 29 changes were fixes); lib/screens/home/hodl_insights_screen.dart (17 of 24 changes were fixes); lib/design_system/tokens/coconut_colors.dart (17 of 24 changes were fixes)

Repeated repair: lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart · ×71lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:288
Hotspot: lib/screens/send/send_screen.dart · ×38lib/screens/send/send_screen.dart:1967

What to do

  1. Resolve the 71 Repeated repair finding(s) in Churn × Complexity Hotspots — start with hot_wallet_create_screen.dart, hodl_insights_screen.dart, coconut_colors.dart. — One of this dimension's main actionable groups (71 warning-level).
  2. Resolve the 38 Hotspot finding(s) in Churn × Complexity Hotspots — start with send_screen.dart, hot_wallet_restore_screen.dart, home_items_view.dart. — One of this dimension's main actionable groups (38 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor8.7 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Documented

66 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lib/utils/nfkd_util.dart. Counted over 524 of the 862 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×5

What to do

  1. Resolve the 5 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (5 recommendation-level).

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Stronggated by 23 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

23 deducted task-comment markers across 195876 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×22test/core/transaction/transaction_builder/transaction_builder_taproot_test.dart:511
FixmeCommentlib/screens/common/pin_check_screen.dart:174

What to do

  1. Resolve the 22 TodoComment finding(s) in Explicit Debt — start with signed_psbt_scanner_screen.dart (2), utxo_merge_view_model.dart (2), transaction_builder_taproot_test.dart. — One of this dimension's main actionable groups (22 warning-level).
  2. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with pin_check_screen.dart. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 38 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundrust/trezor-bridge/Cargo.toml:40

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency3.8 / 10Weak✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 3.8 / 10 · rule-coverage 100% · ceiling Verified

1 naming inconsistencies among 16 declarations measured against a convention their peers follow.

`_setQRViewController` spells `QR` where 15 names in the project spell it `Qr`lib/screens/send/air-gapped/signed_psbt_scanner_screen.dart:224

What to do

  1. Resolve the 1 `_setQRViewController` spells `QR` where 15 names in the project spell… finding(s) in Naming Consistency — start with signed_psbt_scanner_screen.dart. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the internal API surface is consistent and coherent.

Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 API inconsistencies among 24 exposed members measured against a convention their peers follow.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D26 · Project Cohesion8.2 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Documented

1 of 11 build units (Bundler, Cargo, Go, Gradle, SwiftPM, Xcode, pub) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesionGemfile:1

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with Gemfile. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)7.0 / 10Adequate✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 2 high, 0 medium, 1 low. semgrep hit a parse error in 2 file(s) — `assets/i18n/ja.i18n.yaml`, `assets/i18n/ko.i18n.yaml` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities8.6 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 1 critical, 0 high, 1 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.2 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Documented

4 finding(s): 0 critical, 2 high, 1 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D32 · Data Compliance (PII/GDPR)7.1 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

Maturity: Documented → Verified → Prevented · effective 7.1 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. semgrep could not parse 2 file(s) — `android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt`, `lib/packages/mobile_scanner/darwin/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

7 of 524 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is lib/screens/settings/realm_debug_screen.dart. Counted over 524 of the 862 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×7lib/screens/settings/realm_debug_screen.dart:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.5 / 10Adequategated by 11 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: trezor_ble_connect_screen.dart↔trezor_usb_connect_screen.dart 100%; isolate_state_manager.dart↔node_state_manager.dart 92%; bitbox02_sign_viewmodel.dart↔bitbox02_connect_viewmodel.dart 90%

Boundary-crossing change coupling: trezor_sign_view_model.dart ↔ trezor_ble_connect_screen.dart · ×11lib/providers/view_model/send/connected/trezor_sign_view_model.dart:1
Change coupling: trezor_ble_connect_screen.dart ↔ trezor_usb_connect_screen.dart · ×7lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:1
Change-coupling hub: isolate_state_manager.dart → node_provider.dart, node_state_manager.dart, script_sync_service.dart · ×4lib/providers/node_provider/state/isolate_state_manager.dart

What to do

  1. Resolve the 11 Boundary-crossing change coupling finding(s) in Change Coupling — start with trezor_sign_view_model.dart (3), wallet_detail_screen.dart, trezor_ble_connect_view_model.dart. — One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 7 Change coupling finding(s) in Change Coupling — start with trezor_ble_connect_screen.dart, bitbox02_sign_viewmodel.dart, multisig_wallet_item.dart. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with isolate_state_manager.dart, isolate_controller.dart, bitbox02_connect_screen.dart. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing3.3 / 10Weak✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 3.3 / 10 · rule-coverage 100% · ceiling Documented

1/3 supply-chain integrity signals present (provenance, signing, SBOM).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 5 platform declaration(s) and 13 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition9.6 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether an entity protects its own invariants — a class whose identity is derived from its fields (value equality) but whose fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

ED4 · Outbox / dual-write8.0 / 10Strong✓ Tool-verified

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

  • `WalletAppearanceProvider._onLifecycleEvent` performs two independent DURABLE writes — `_repository` (a durable store) and `_photoStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — lib/providers/wallet_appearance_provider.dart:86
  • `HotWalletSecretRepository.delete` performs two independent DURABLE writes — `_deviceKeystore` (a durable store) and `_secureStorage` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — lib/repository/secure_storage/hot_wallet_secret_repository.dart:110

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's Dart: methods whose whole body still throws UnimplementedError or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Dart: methods that only throw UnimplementedError or a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

M1 · Documentation (README)8.4 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates6.5 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

  • A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.

What to do

  • Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
  • Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability5.7 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 4/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `ios`, `macos`, `rust/trezor-bridge`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
  • `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:5

What to do

  • Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `getImportableLabelFiles` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/services/label_file_service.dart:15
  • `perform_thp_handshake` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — rust/trezor-connect-rs/src/transport/callback.rs:751
  • `perform_thp_handshake_inner` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — rust/trezor-connect-rs/src/transport/callback.rs:927
  • `perform_pairing` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — rust/trezor-connect-rs/src/transport/callback.rs:1580

What to do

  • Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.
  • Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
S1 · Web-Security Posture4.0 / 10Weak✓ Tool-verified

Other · Security — Read from this repository's Dart source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS certificate validation — facts about code that hold whether or not it serves anything itself. The TLS protocol version is not read: `dart:io` leaves the protocol floor to the platform's TLS library and has no switch that admits an obsolete version. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. This repository serves no HTTP of its own — no server framework among its pubspec dependencies, no `HttpServer` bound and no shelf, dart_frog or serverpod import in its production source or `bin/`. Its Flutter web build (`web/index.html`) compiles to static files that run in the browser and are served by whatever hosts them: static files cannot enforce HTTPS, send HSTS or any other response header, set an HttpOnly cookie or validate a request, so those controls are the host's, not this code's. Where this repository commits the host's configuration (an nginx, Caddy or Apache config, a serving REDACTED, `_headers`, `vercel.json`, `netlify.toml`, `firebase.json`, `staticwebapp.config.json`) it is read for the security response headers it sets, and the shipped page is read for third-party scripts loaded without Subresource Integrity.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `onBadCertificate` returning `true` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the callback so `dart:io` validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: load its CA into a `SecurityContext` (`setTrustedCertificatesBytes`) and pass it as `HttpClient(context: …)` / `SecureSocket.connect(…, context: …)`, which keeps the chain and hostname checks on. A callback that must exist should compare the presented certificate with a pinned fingerprint, never return `true`. — lib/services/network/socket/socket_factory.dart:61
  • `https://cdn.jsdelivr.net/npm/jsqr@1.3.1/dist/jsQR.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. — web/index.html:42

What to do

  • Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off.
  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X1 · Async correctness7.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`. (×5) — rust/trezor-connect-rs/src/transport/callback.rs:782, rust/trezor-connect-rs/src/transport/callback.rs:903, rust/trezor-connect-rs/src/transport/callback.rs:1060, …

What to do

  • Blocking `thread::sleep` inside an `async` body
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document2.7 / 10Weak✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `convertKeysToString` is public and takes `Map<dynamic, dynamic> map` from its caller, and it calls itself at line 11 (`convertKeysToString`) with a piece of `map` (and at line 16) — and nowhere in `convertKeysToString` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `convertKeysToString` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/utils/type_converter_utils.dart:11
  • `signerBsmsFromUrResult` is public, takes a document from its caller (line 323) and hands it to `_convertKeysToString`, which calls itself at line 425 (`_convertKeysToString`) with a piece of `map` (and at line 430) — and nowhere in `_convertKeysToString` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `_convertKeysToString` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/core/bip/129/multisig_normalizer.dart:425

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness6.5 / 10Adequate✓ Tool-verified

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

  • `_TransactionFeeBumpingScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_feeTextFieldFocusNode` itself (line 84, `FocusNode`), which makes that instance its own. Nothing in the class releases it — no `_feeTextFieldFocusNode.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `FocusNode` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_feeTextFieldFocusNode.dispose();` in `dispose()` before `super.dispose()`. — lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:84
  • `_P2PCalculatorScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_scrollController` itself (line 92, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_scrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_scrollController.dispose();` in `dispose()` before `super.dispose()`. — lib/screens/settings/tools/p2p_calculator_screen.dart:92
  • `_ElectrumServerScreen` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_defaultServerScrollController` itself (line 51, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_defaultServerScrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_defaultServerScrollController.dispose();` in `dispose()` before `super.dispose()`. — lib/screens/settings/app_settings/network/electrum_server_screen.dart:51
  • `_AppInfoScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_scrollController` itself (line 41, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_scrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_scrollController.dispose();` in `dispose()` before `super.dispose()`. — lib/screens/settings/app_settings/about/app_info_screen.dart:41
  • `_SendScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_screenScrollController` itself (line 176, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_screenScrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_screenScrollController.dispose();` in `dispose()` before `super.dispose()`. — lib/screens/send/send_screen.dart:176
  • `_SendScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_addressListScrollController` itself (line 177, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_addressListScrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_addressListScrollController.dispose();` in `dispose()` before `super.dispose()`. — lib/screens/send/send_screen.dart:177
  • `MobileScannerWeb` carries a disposal duty — it declares its own release — and it creates `_barcodesController` itself (line 35, `StreamController.broadcast`), which makes that instance its own. Nothing in the class releases it — no `_barcodesController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController.broadcast` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_barcodesController.close();` in `dispose()` before `super.dispose()`. — lib/packages/mobile_scanner/lib/src/web/mobile_scanner_web.dart:35
  • `MobileScannerWeb` carries a disposal duty — it declares its own release — and it creates `_settingsController` itself (line 49, `StreamController.broadcast`), which makes that instance its own. Nothing in the class releases it — no `_settingsController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController.broadcast` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_settingsController.close();` in `dispose()` before `super.dispose()`. — lib/packages/mobile_scanner/lib/src/web/mobile_scanner_web.dart:49
  • `sessions` (line 710) is a synchronous lock guard, and it is still alive at the `.await` on line 729: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`. — rust/trezor-bridge/src/lib.rs:710
  • `sessions` (line 739) is a synchronous lock guard, and it is still alive at the `.await` on line 754: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`. — rust/trezor-bridge/src/lib.rs:739
  • `sessions` (line 835) is a synchronous lock guard, and it is still alive at the `.await` on line 855: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`. — rust/trezor-bridge/src/lib.rs:835
  • `sessions` (line 888) is a synchronous lock guard, and it is still alive at the `.await` on line 902: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`. — rust/trezor-bridge/src/lib.rs:888
  • `sessions` (line 921) is a synchronous lock guard, and it is still alive at the `.await` on line 928: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`. — rust/trezor-bridge/src/lib.rs:921

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X2 · Cancellation propagation4.6 / 10Weak✓ Tool-verified

Other · Code Health — Whether functions that make a cancellable request accept or pass on a CancelToken (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 1/11 functions that make a cancellable request (Dio, AbortableRequest) accept a CancelToken or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. Take a `CancelToken? cancelToken` and hand it to the request as `cancelToken:` (or hold one and cancel it in `dispose`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `sendFaucetRequest` calls `_dio.post(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/dio_client.dart:30
  • `getFaucetStatus` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/dio_client.dart:50
  • `getLatestAppVersion` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/dio_client.dart:55
  • `getRecommendedFee` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/dio_client.dart:72
  • `_getMempoolSpaceFees` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/fee_service.dart:33
  • `_fetchBitflyerDailyCloses` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/historical_bitcoin_price_service.dart:23
  • `_fetchUpbitDailyCloses` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/historical_bitcoin_price_service.dart:54
  • `_fetchBinanceDailyCloses` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/historical_bitcoin_price_service.dart:77
  • `getLnInvoiceOfPow` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/services/speed_app_ln_invoice_service.dart:7
  • `_fetchPriceForFiat` calls `dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/providers/view_model/utility/p2p_calculator_view_model.dart:351

What to do

  • Thread a CancelToken through functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob4.8 / 10Weak✓ Tool-verified

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

  • `StoredCredential.device_label` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/credential_store.rs:46
  • `Features.pin_protection` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:25
  • `Features.imported` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:39
  • `Features.unlocked` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:41
  • `Features.passphrase_cached` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:43
  • `Features.firmware_present` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:45
  • `Features.flags` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:49
  • `Features.unfinished_backup` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:53
  • `Features.no_backup` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:55
  • `Features.recovery_mode` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:57
  • `Features.sd_card_present` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:63
  • `Features.sd_protection` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:65
  • `Features.wipe_code_protection` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:67
  • `Features.auto_lock_delay_ms` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:75
  • `Features.experimental_features` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/device/features.rs:79
  • `GetAddressParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/params.rs:24
  • `SignMessageParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/params.rs:57
  • `VerifyMessageParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/params.rs:73
  • `SignTxParams.push` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/params.rs:298
  • `SignTxParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/params.rs:304
  • `CoinInfo.shortcut` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:88
  • `CoinInfo.network` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:90
  • `CoinInfo.decimals` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:92
  • `CoinInfo.segwit` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:94
  • `CoinInfo.taproot` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:96
  • `CoinInfo.min_fee` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:98
  • `CoinInfo.max_fee` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:100
  • `CoinInfo.default_fee` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:102
  • `CoinInfo.dust_limit` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — rust/trezor-connect-rs/src/types/network.rs:104

What to do

  • Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen. Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for … range` leaves the slice or map it is walking alone — Go raises nothing, but the walk and the collection part: a range evaluates its slice once, so an element appended in the body is never visited and a removal by reslicing (`s = append(s[:i], s[i+1:]...)`, `slices.Delete`) shifts the next element under the index, which is then skipped while the last is read twice; a reslice, a reassignment or a sort leaves every later `s[i]` naming another element; and a map's order is unspecified, so deleting another key (or clearing the map) changes from run to run which entries the loop still sees.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling5.3 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — lib/widgets/features/wallet/card/wallet_info_item_card.dart:82, lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:124, lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:128, …
  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×20) — lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:76, lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:91, lib/widgets/features/qr/animated_qr/scan_data_handler/bc_ur_qr_scan_data_handler.dart:69, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×10) — lib/utils/logger.dart:64, lib/ui/coconut/coconut_overlays.dart:77, lib/ui/coconut/coconut_overlays.dart:154, …

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types9.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Dart's sound null safety is on and is not undermined by null assertions — a package whose `environment: sdk:` lower bound is 2.12 or above is null safe, so `String` cannot hold null and `String?` must be checked before use, and each postfix `!` is a run-time `Null check operator used on a null value` the author has told the analyzer cannot happen.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health66.0AdequateAcceptable, with room to improve.
Architecture97.1ExemplarySolid.
Maturity78.7StrongSolid.
Readiness50.9Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security56.1Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100.0ExemplaryStrongest area.
Event-Driven79.9StrongSolid.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: this repository stores data through 'package:realm' (lib/services/realm_debug_service.dart:4) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'package:realm' (lib/services/realm_debug_service.dart:4) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'package:realm' (lib/services/realm_debug_service.dart:4) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 57 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — Frontend below the scale floor (18 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (18 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (18 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (18 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (18 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (18 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Dart isolates share no mutable memory, so no two requests write one object at the same instant. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — The runtime tier booted this repository's service, but crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:32768: page.goto: Timeout 30000ms exceeded. Call log: - navigating to "http://127.0.0.1:32768/", waiting until "load" . This repository also has a user interface (1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates) that the booted service does not serve, and this scan has no strategy that reaches it — so no WCAG success criterion was verified in a rendered page on this run. That is a gap in OUR tooling, not a finding about your application: nothing here says the interface is inaccessible. The static accessibility checks still ran.
  • AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: this repository stores data through 'package:realm' (lib/services/realm_debug_service.dart:4) but declares no persisted model this check reads (Drift tables, Isar/ObjectBox/Floor/Hive entities, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server another machine can reach (no HttpServer or shelf server bound beyond loopback, no dart_frog route, no Serverpod endpoint, no Conduit, Alfred or Angel application) and keeps no data in a hosted backend. Access control is therefore N/A here — a Flutter app or pub package is authorized by the server it calls, not by itself; hiding a screen authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • D10 Test Quality — ~76327 lines of test source are present (.dart) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .dart test runner
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .dart, .go, .java, .kt, .rb, .rs, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Aggregate boundaries — not scored for Dart: aggregate-vs-value-object classification cannot be told apart in source (every class-holding-class reads alike), and a child COLLECTION (legitimate membership) vs a single embedded aggregate is indistinguishable — reported as guidance rather than measured
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — not scored for Dart: a cross-package domain leak cannot be told apart in source from a legitimate shared-kernel package, and most repositories ship a single package — reported as guidance rather than measured
  • DM4 Rich vs anemic domain model — this Dart repository declares no domain-layer entity carrying stored data (every type is a typed-id wrapper, DTO/config, ORM row or presentation container), so DM4's rich-vs-anemic read has no population to be taken over
  • DM6 Domain ↔ infrastructure boundary — this Dart repository maps no type to a persistence framework (drift/floor/isar/objectbox/hive), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not scored for Dart: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Dart, Go, JVM, Ruby, Rust, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 56 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for classes extending benchmark_harness's `BenchmarkBase`, `AsyncBenchmarkBase` or `PerfBenchmarkBase` (directly or through a base of your own), `benchmark(…)` calls under the pub `benchmark` package, Flutter's `benchmarkWidgets`, `watchPerformance` or `traceAction` in a test importing flutter_test, integration_test or flutter_driver, or benchmark_harness, benchmark or web_benchmarks in a pubspec.yaml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — X26 reached only 3% of this repository's production lines — dart (161,076 lines), rust (858 lines), cpp (484 lines), c (148 lines), javascript (15 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Dart was read, and it logs through none: package:logging, package:logger, talker and dart:developer take one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. Sentry's structured logs (`Sentry.logger`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 20 finding(s)
D35 · Change Coupling · Boundary-crossing change coupling · ×11
  • Boundary-crossing change coupling: trezor_sign_view_model.dart ↔ trezor_ble_connect_screen.dart lib/providers/view_model/send/connected/trezor_sign_view_model.dart:1 — `lib/providers/view_model/send/connected/trezor_sign_view_model.dart` (context providers) and `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `2c8f6c2a` fix(Bitbox): 서명 과정 지갑 불일치 UI, 연결 UX 개선; `7f5494f4` feat(Trezor): UI 개선, 지갑 미스매치 시 다른 트레저와 연결하기 버튼 노출; `0966c538` feat(Trezor): 가이드, TrezorDevice 연결 해제 함수와 호출처 개선, PairingCode/Matrix… — run `git show` on any of them.
  • Boundary-crossing change coupling: wallet_detail_screen.dart ↔ wallet_detail_sticky_header.dart lib/screens/wallet_detail/wallet_detail_screen.dart:1 — `lib/screens/wallet_detail/wallet_detail_screen.dart` (context screens) and `lib/widgets/features/wallet/header/wallet_detail_sticky_header.dart` (context widgets) sit in DIFFERENT parts of the tree yet change together 62% of the time (16 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `288b5946` feat(transaction-list): 상단 헤더 UI 수정, 스크롤 시 전환 효과 적용,; `91177f38` refactor(wallet-detail): 기존 WalletDetail의 Route, 함수명 등을 TransactionLi…; `ad14dff7` fix(ui): fix and unify BottomActionBarButton; refactoring (at that commit the file was still `lib/widgets/header/wallet_detail_sticky_header.dart`) — run `git show` on any of them.
  • Boundary-crossing change coupling: trezor_ble_connect_view_model.dart ↔ trezor_usb_connect_screen.dart lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:1 — `lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart` (context providers) and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `1205db44` fix(trezor): preserve recovery guidance and cancel stale connections …; `55435c64` fix(Trezor/Bitbox): 서명 지갑 불일치 UI 개선; `771bbf32` feat(Trezor): passphraseProtection 꺼진 상태에서 켤 수 있게 연결 플로우 개선 — run `git show` on any of them.
  • Boundary-crossing change coupling: trezor_sign_view_model.dart ↔ trezor_usb_connect_screen.dart lib/providers/view_model/send/connected/trezor_sign_view_model.dart:1 — `lib/providers/view_model/send/connected/trezor_sign_view_model.dart` (context providers) and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `2c8f6c2a` fix(Bitbox): 서명 과정 지갑 불일치 UI, 연결 UX 개선; `7f5494f4` feat(Trezor): UI 개선, 지갑 미스매치 시 다른 트레저와 연결하기 버튼 노출; `0966c538` feat(Trezor): 가이드, TrezorDevice 연결 해제 함수와 호출처 개선, PairingCode/Matrix… — run `git show` on any of them.
  • Boundary-crossing change coupling: realm_constants.dart ↔ coconut_wallet_model.dart lib/constants/realm_constants.dart:1 — `lib/constants/realm_constants.dart` (context constants) and `lib/repository/realm/model/coconut_wallet_model.dart` (context repository) sit in DIFFERENT parts of the tree yet change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `4e233aa3` fix(hot-wallet-logic): 핫월렛 생명주기 및 실패 복구 로직 개선; `e96bde4a` feat(hot-wallet): 지갑 출처와 서명 방식을 분리하고 싱글시그 핫월렛 구조 추가; `2f452627` feat(taproot): Data Layer에 TaprootWallet 추가 로직 — run `git show` on any of them.
  • Boundary-crossing change coupling: language_bottom_sheet.dart ↔ locale_util.dart lib/screens/settings/language_bottom_sheet.dart:1 — `lib/screens/settings/language_bottom_sheet.dart` (context screens) and `lib/utils/locale_util.dart` (context utils) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `ee031765` refactor(LanguageCode): kr -> ko, jp -> ja / PreferenceProvider에 마이그레…; `152f1cd6` refactor(LanguageCode): 언어코드 enum 추가 후 적용; `c1c706b9` feat(es-locale): add Spanish — run `git show` on any of them.
  • Boundary-crossing change coupling: bitbox02_sign_viewmodel.dart ↔ send_confirm_screen.dart lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:1 — `lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart` (context providers) and `lib/screens/send/send_confirm_screen.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `108664af` fix(BitBox02): 페어링 코드 비교없이 연결 완료하던 버그 수정; `d01133b4` feat(Trezor): 서명 전 연결 상태, 지갑 일치 여부에 따른 에러 처리; `75aed8b0` feat(Trezor): Safe 7 모델 블루투스 연동으로 서명 — run `git show` on any of them.
  • Boundary-crossing change coupling: wallet_provider.dart ↔ wallet_preferences_repository.dart lib/providers/wallet_provider.dart:1 — `lib/providers/wallet_provider.dart` (context providers) and `lib/repository/realm/wallet_preferences_repository.dart` (context repository) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d6eb0ff6` fix(utxo-selection-ux): improve manual selection flow and clean up; `c2d881d6` feat(home-edit): 홈 화면 기능(위젯) 추가/제거 구현, 홈화면 편집 바텀시트에 기능 name이 처음 실행했던 …; `fe0cd125` feat(home-edit): preferences/realm 반영 로직 구현 — run `git show` on any of them.
  • Boundary-crossing change coupling: trezor_sign_view_model.dart ↔ send_confirm_screen.dart lib/providers/view_model/send/connected/trezor_sign_view_model.dart:1 — `lib/providers/view_model/send/connected/trezor_sign_view_model.dart` (context providers) and `lib/screens/send/send_confirm_screen.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `8cee6d05` enhance(Trezor): 서명 단계에서 연결 해제 감지 후 재연결 시도하도록 개선; `f8686ce0` feat(Trezor): 패스프레이즈 ON한 트레저의 지갑 추가/서명; `0addf567` feat(Trezor): Model One USB Connect 지갑 추가, 서명, 예외처리 — run `git show` on any of them.
  • Boundary-crossing change coupling: bitbox02_connect_viewmodel.dart ↔ send_confirm_screen.dart lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:1 — `lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart` (context providers) and `lib/screens/send/send_confirm_screen.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `108664af` fix(BitBox02): 페어링 코드 비교없이 연결 완료하던 버그 수정; `55435c64` fix(Trezor/Bitbox): 서명 지갑 불일치 UI 개선; `d01133b4` feat(Trezor): 서명 전 연결 상태, 지갑 일치 여부에 따른 에러 처리 — run `git show` on any of them.
  • Boundary-crossing change coupling: coconut_colors.dart ↔ theme_bottom_sheet.dart lib/design_system/tokens/coconut_colors.dart:1 — `lib/design_system/tokens/coconut_colors.dart` (context design_system) and `lib/screens/settings/theme_bottom_sheet.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `781e8859` refactor(theme): rename coconutPulp theme to coconutTheme and fix acc…; `c0e38581` fix(ui): unify press/selection styling across settings and send screens; `92168912` fix(ui): replace hardcoded colors with theme tokens, fix UTXO chip co… — run `git show` on any of them.
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×2
  • Dual write (no outbox): WalletAppearanceProvider._onLifecycleEvent lib/providers/wallet_appearance_provider.dart:86 — `WalletAppearanceProvider._onLifecycleEvent` performs two independent DURABLE writes — `_repository` (a durable store) and `_photoStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
  • Dual write (no outbox): HotWalletSecretRepository.delete lib/repository/secure_storage/hot_wallet_secret_repository.dart:110 — `HotWalletSecretRepository.delete` performs two independent DURABLE writes — `_deviceKeystore` (a durable store) and `_secureStorage` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
S1 · Web-Security Posture · TLS certificate validation disabled · ×1
  • TLS certificate validation disabled lib/services/network/socket/socket_factory.dart:61 — `onBadCertificate` returning `true` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the callback so `dart:io` validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: load its CA into a `SecurityContext` (`setTrustedCertificatesBytes`) and pass it as `HttpClient(context: …)` / `SecureSocket.connect(…, context: …)`, which keeps the chain and hostname checks on. A callback that must exist should compare the presented certificate with a pinned fingerprint, never return `true`.
Serious — 1073 finding(s)
D15 · Churn × Complexity Hotspots · Repeated repair · ×71
  • Repeated repair: lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:288 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart changed 29 times in last 90 days and 20 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is _HotWalletCreateScreenState._buildAdvancedSettings at line 288), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(theme): unify theme roles and stabilize home transitions”; “fix(hot-wallet-create-restore-popup): 패스프레이즈 안내 팝업 내 문구 띄어쓰기 단위로 개행되도록 수정”; “fix(hot-wallet-create): 핫월렛 생성 - 중복된 이름 입력 시 errorText표시, 하단 생성 버튼 비활성화”; “fix(merge): 머지 후 라우팅 에러, UI 에러 해결. 지갑 정보 화면 - 모니터링 주소/메모관리/지갑재동기화 연동”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/home/hodl_insights_screen.dart lib/screens/home/hodl_insights_screen.dart:834 — lib/screens/home/hodl_insights_screen.dart changed 24 times in last 90 days and 17 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is _BalanceCardState.build at line 834), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wallet-selection): 노드 동기화 갱신 및 인사이트 설정 저장 실패 처리”; “fix(hodl-insights): 선택 지갑 삭제 시 모든 지갑으로 자동 전환”; “fix(hodl-insights): 인사이트 지갑 선택 설정 저장 및 복원”; “fix(balance-history): refine period summary typography fix(wallet-info): prefill the MFP sheet with the user-set fingerprint feat(hodl-insights): spring the UTXO bar into place on entry style(hodl-insights): adjust balance rate and balance trend link typography”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/hodl_insights_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/design_system/tokens/coconut_colors.dart lib/design_system/tokens/coconut_colors.dart:524 — lib/design_system/tokens/coconut_colors.dart changed 24 times in last 90 days and 17 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is CoconutColors._lerpForeground at line 524), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(theme): 세그먼트 선택 색상과 주소 안내 툴팁 대비 개선”; “refactor(legacy): remove unused files fix(ui): adjust UTXO overview chart background and height, and wallet card detail app bar icons”; “fix(utxo): distinguish availability cards with surface fills”; “fix(theme): unify theme roles and stabilize home transitions”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/design_system/tokens/coconut_colors.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/home/wallet_add/wallet_add_dialog.dart lib/screens/home/wallet_add/wallet_add_dialog.dart:138 — lib/screens/home/wallet_add/wallet_add_dialog.dart changed 23 times in last 90 days and 15 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is WalletAddDialog._buildContent at line 138), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home): bound the wallet add source sheet to the safe area”; “fix(ui): restore original layouts changed during QA”; “fix(wallet): 키보드와 큰 글씨에서 외형 및 지갑 추가 화면 넘침 수정”; “fix(merge): 설정 검색·지갑 이벤트·표시 회귀 수정”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_add/wallet_add_dialog.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/home/home_screen.dart lib/screens/home/home_screen.dart:77 — lib/screens/home/home_screen.dart changed 24 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is _HomeScreenState._startPeeking at line 77), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home): hide Updating indicator when there are no wallets”; “fix(home): read widget settings columns at save time”; “fix(home): use displayed columns in widget settings”; “fix(home): adapt home layout to foldable displays”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/home_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/home/home_edit_screen.dart lib/screens/home/home_edit_screen.dart:45 — lib/screens/home/home_edit_screen.dart changed 16 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is _HomeEditScreenState._add at line 45), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home-edit): 위젯 이름과 추가 버튼의 항목 구분 개선”; “fix(home): read widget settings columns at save time”; “fix(home): use displayed columns in widget settings”; “fix(ui): symmetric app bar, home widget polish and icon cleanup”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/home_edit_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:147 — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart changed 20 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is _WalletCardDetailScreenState._focusRecentTransactions at line 147), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wallet-detail): 지갑 카드와 보안 배너가 함께 뒤집히도록 수정”; “fix: 지갑 상세·금고 이동·백업 화면 UI 다듬기”; “fix(wallet-card-detail): 섹션 헤더 '더보기'의 활성화 색상 변경”; “fix(balance-history): refine period summary typography fix(wallet-info): prefill the MFP sheet with the user-set fingerprint feat(hodl-insights): spring the UTXO bar into place on entry style(hodl-insights): adjust balance rate and balance trend link typography”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/wallet_detail/address_list_screen.dart lib/screens/wallet_detail/address_list_screen.dart:553 — lib/screens/wallet_detail/address_list_screen.dart changed 14 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is _AddressListScreenState._nextLoad at line 553), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 지갑 상세·금고 이동·백업 화면 UI 다듬기”; “fix(address-list): 필터 하단 패딩을 16px로 확대”; “fix(theme): 세그먼트 선택 색상과 주소 안내 툴팁 대비 개선”; “fix(theme): unify theme roles and stabilize home transitions”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/address_list_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/widgets/common/overlays/common_bottom_sheets.dart lib/widgets/common/overlays/common_bottom_sheets.dart:142 — lib/widgets/common/overlays/common_bottom_sheets.dart changed 13 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is CommonBottomSheets.showCustomHeightBottomSheet at line 142), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ios): Duo에서 시트가 옆 상태 열 앞에서 끝나 열에 뒤 화면이 이어지도록 수정”; “fix: 새로고침으로 보정된 송금이 빨리 받기로 열리던 문제와 바텀시트 항목의 dispose 후 setState 수정 / 합치기 받는 주소 시트의 정렬·간격·구분선과 완료 버튼 그라데이션 맞춤”; “fix(나누기): 리뷰 반영 및 큰 Tx 확인 팝업 문구 개선 chore: align Flutter 3.35.7 and intl ^0.20.2 with develop”; “fix(theme): unify theme roles and stabilize home transitions”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/common/overlays/common_bottom_sheets.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/repository/realm/address_repository.dart lib/repository/realm/address_repository.dart:691 — lib/repository/realm/address_repository.dart changed 12 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is AddressRepository.addAddressesWithGapLimit at line 691), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(split): 대용량 트랜잭션 확인 중 선택 변경 시 이전 선택이 남는 문제 수정, 뷰모델 테스트 추가 refactor: cancelCheck 리네이밍”; “fix(wallet): UTXO 정리 후 잔액과 거래내역 동기화 안정화”; “fix(wallet): 잔액 일괄 갱신 시 중복 주소 합산 방지”; “fix(sync): 미확정 거래 주소 감시와 확인 재시도 보존”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/repository/realm/address_repository.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/app.dart lib/app.dart:81 — lib/app.dart changed 16 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is _CoconutWalletAppState._extractAnalyticsScreenName at line 81), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ios): iPhone Duo에서 상태바 세로 열에 화면이 가려지던 문제 수정”; “fix(app): lock native orientation without letterboxing foldables”; “fix(home): adapt home layout to foldable displays”; “refactor(legacy): remove unused files fix(ui): adjust UTXO overview chart background and height, and wallet card detail app bar icons”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/app.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/repository/shared_preference/shared_prefs_repository.dart lib/repository/shared_preference/shared_prefs_repository.dart:248 — lib/repository/shared_preference/shared_prefs_repository.dart changed 13 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is SharedPrefsRepository.getWalletLastResyncTimestamp at line 248), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(fiat): 기기 저장소가 통화 저장을 확인했을 때만 확인 플래그를 남기기”; “fix(hodl-insights): 진입 위젯의 지갑 범위가 공통 설정으로 자동 저장되지 않도록 수정”; “fix(wallet-selection): 노드 동기화 갱신 및 인사이트 설정 저장 실패 처리”; “fix(hodl-insights): 인사이트 지갑 선택 설정 저장 및 복원”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/repository/shared_preference/shared_prefs_repository.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:393 — REDACTED changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is _UtxoSelectionScreenState._buildEmptyState at line 393), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(utxo-selection): select tag filter chips by UtxoFilter instead of display text”; “fix(나누기): 금액별 나누기 sweep output이 dust로 제거되는 문제 수정 / UTXO 선택 시 1,000 sats 미만 비활성화 복구”; “fix(나누기): 리뷰 반영 및 큰 Tx 확인 팝업 문구 개선 chore: align Flutter 3.35.7 and intl ^0.20.2 with develop”; “fix(ui): symmetric app bar, home widget polish and icon cleanup”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/transaction/utxo_split_transaction_builder.dart lib/core/transaction/utxo_split_transaction_builder.dart:744 — lib/core/transaction/utxo_split_transaction_builder.dart changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is UtxoSplitTransactionBuilder._spawnBuildTask at line 744), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(split): bound signed tx size with the P2WSH witnessScript length prefix”; “fix(split): block splits over the standard tx size, add UtxoSelectionViewModel tests”; “fix(split): 대용량 트랜잭션 확인 중 선택 변경 시 이전 선택이 남는 문제 수정, 뷰모델 테스트 추가 refactor: cancelCheck 리네이밍”; “fix(나누기): 금액별 나누기 sweep output이 dust로 제거되는 문제 수정 / UTXO 선택 시 1,000 sats 미만 비활성화 복구”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/core/transaction/utxo_split_transaction_builder.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/providers/node_provider/subscription/subscription_service.dart lib/providers/node_provider/subscription/subscription_service.dart:325 — lib/providers/node_provider/subscription/subscription_service.dart changed 10 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is SubscriptionService._subscribeAddressRange at line 325), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wallet): UTXO 정리 후 잔액과 거래내역 동기화 안정화”; “fix(node): apply electrum server change on settings screen pop”; “fix(wallet-resync): preserve gap-limit-exceeding usedIndex across resync”; “fix(watched-addresses): fix gap-window under-extension and usedIndex race fix(address-list): retry segment tooltip when layout isn't ready yet”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/providers/node_provider/subscription/subscription_service.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/services/home/builtin_home_widgets.dart lib/services/home/builtin_home_widgets.dart:61 — lib/services/home/builtin_home_widgets.dart changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is BuiltinHomeWidget.build at line 61), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hodl-insights): 인사이트 지갑 선택 설정 저장 및 복원”; “fix(hodl-insights): 잔액 카드와 잔액 변화 그래프 카드의 크기·위치 일치 enhance(hodl-insights&home): 지갑별 차트 색 기준 통일 및 조각 구분 개선 fix(home): 연결 실패 상태 아이콘 색을 텍스트 색과 통일 enhance(wallet-detail): 더보기 눌림 효과 추가 및 잔액 변화 보기 화살표 아이콘 적용”; “fix(home): preserve balance precision and explicit wallet scopes”; “fix(ui): symmetric app bar, home widget polish and icon cleanup”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/services/home/builtin_home_widgets.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/wallet_detail/transaction_list_screen.dart lib/screens/wallet_detail/transaction_list_screen.dart:505 — lib/screens/wallet_detail/transaction_list_screen.dart changed 11 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is _TransactionListState._handleTransactionListUpdate at line 505), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ui): symmetric app bar, home widget polish and icon cleanup”; “fix(transaction-list): transaction item card 간 간격 축소(8px -> 4px)”; “fix(transaction-list): 거래 내역 라벨과 목록 사이 gap 축소(4px)”; “fix(transaction-list): 거래 목록 화면 스크롤 시 순간적으로 header부분에 '거래내역' 문구가 가려지는 현상 해결”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/transaction_list_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/widgets/features/home/card/home_alert_card.dart lib/widgets/features/home/card/home_alert_card.dart:156 — lib/widgets/features/home/card/home_alert_card.dart changed 11 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is _HomeAlertCardState._buildSecurityCard at line 156), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(alert-card): 패딩 수정 (22, 14) -> (16, 16)”; “fix(renewal-wallet-detail): 지갑 상세 화면 카드들의 내부 패딩을 22로 수정, transactionList의 트랜잭션 카드 radius를 지갑 상세화면의 트랜잭션 카드 radius와 통일”; “fix(ui): 핫월렛 / 지갑상세화면 개편 부분 큰폰트 대웅”; “fix(mnemonic-backup-confirm): 니모닉 백업 확인 화면 4글자 이상 입력된 상태에서 '완료' 누를 시 고스트텍스트를 포함한 단어로 인식 및 확인하도록 개선”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/features/home/card/home_alert_card.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/home/all_features_screen.dart lib/screens/home/all_features_screen.dart:74 — lib/screens/home/all_features_screen.dart changed 11 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is _AllFeaturesScreenState._categoryLabel at line 74), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home): polish Hodl Insights, All Features labels and feature icons”; “fix(theme): unify theme roles and stabilize home transitions”; “revert(home): restore the original empty feature list”; “fix(home): use one add-wallet banner for empty feature lists”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/all_features_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart:276 — lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart changed 11 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is HotWalletRestoreViewModel.restore at line 276), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hotwallet-restore): networkType이 testnet으로 고정되어있던 버그 수정”; “fix(duplicate-wallet-name): 같은 지갑(니모닉)의 중복 이름은 허용하도록 개선”; “fix(hot-wallet): compute 전달용 평문 사본의 메모리 wipe 누락 수정”; “fix(hot-wallet-synchronized): 핫월렛 생명주기 작업 간 경합 방지”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/ccos/coconut_open_store_intro_screen.dart lib/screens/ccos/coconut_open_store_intro_screen.dart:459 — lib/screens/ccos/coconut_open_store_intro_screen.dart changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is _CoconutOpenStoreIntroScreenState.build at line 459), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ccos): Duo 옆 상태 열에 사진 카드·워터마크·시작 애니메이션이 늘어나 보이던 문제 수정”; “fix(ccos): prevent overview numbers from overlapping copy”; “fix(theme): unify theme roles and stabilize home transitions”; “fix(home): stabilize return transitions and clip open store intro”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/ccos/coconut_open_store_intro_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/wallet_detail/wallet_info/wallet_appearance_screen.dart lib/screens/wallet_detail/wallet_info/wallet_appearance_screen.dart:504 — lib/screens/wallet_detail/wallet_info/wallet_appearance_screen.dart changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is _WalletTabState.build at line 504), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wallet-appearance): Duo에서 낮은 화면의 배경 선택 영역 확보”; “fix(wallet-appearance): 키보드에 지갑 이름 입력창이 가려지는 문제 수정”; “fix(wallet-appearance): 큰 글자 설정에서 탭 넘침 수정”; “fix(ui): restore original layouts changed during QA”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/wallet_info/wallet_appearance_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/screens/wallet_detail/wallet_info/mnemonic_backup_confirm_screen.dart lib/screens/wallet_detail/wallet_info/mnemonic_backup_confirm_screen.dart:283 — lib/screens/wallet_detail/wallet_info/mnemonic_backup_confirm_screen.dart changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is _MnemonicBackupConfirmScreenState._submitAnswer at line 283), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ui): symmetric app bar, home widget polish and icon cleanup”; “fix(merge): 머지 후 라우팅 에러, UI 에러 해결. 지갑 정보 화면 - 모니터링 주소/메모관리/지갑재동기화 연동”; “fix(ui): 핫월렛 / 지갑상세화면 개편 부분 큰폰트 대웅”; “fix(mnemonic-backup-confirm): 니모닉 백업 확인 화면 4글자 이상 입력된 상태에서 '완료' 누를 시 고스트텍스트를 포함한 단어로 인식 및 확인하도록 개선”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/wallet_info/mnemonic_backup_confirm_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/app_guard.dart lib/app_guard.dart:128 — lib/app_guard.dart changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is _AppGuardState._handleAppLifecycleState at line 128), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 리뷰 사항 수정 - 실제 동기화를 마쳤을 때만 "업데이트 완료" 표시. 대기 시간을 넘겨도 동기화 중이면 "업데이트 중" 유지 - `refreshWallets()`가 성공 여부를 반환하고 휴면 주소 확인까지 기다림 - 백그라운드 시간은 복귀 한 번에만 사용(`BackgroundResumePolicy`). inactive → resumed에서 재사용 안 함 - 이전 스캐너의 카메라 해제가 끝난 뒤에만 다시 시작하거나 강제로 정지함”; “fix(node): settle initialization failures across error zones”; “fix(settings): 로그 뷰어와 파일 로그 제거”; “fix(wallet-resync): stabilize resync and reconnect reliability”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/app_guard.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:27 — lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is WalletAddScannerViewModel.WalletAddScannerViewModel at line 27), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(wallet-add): keep Krux/SeedSigner source for descriptor imports”; “fix(wallet-add): coldCard 지갑 추가를 BBQR JSON(J)으로 제한하고 실기기 fixture 추가”; “fix(wallet-add): 직접 입력 스캔을 descriptor와 xpub으로 제한”; “fix(wallet-add): UR 결과를 type으로 해석”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 46 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×64
  • MethodTooLong: LongPressedMenuWidgetState.showMenu lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307 — MethodTooLong — showMenu runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CoconutColors.lerp lib/design_system/tokens/coconut_colors.dart:546 — MethodTooLong — lerp runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _HotWalletMnemonicBackupGuideScreenState.build lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:118 — MethodTooLong — build runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _HotWalletCreateScreenState._buildAdvancedSettings lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:288 — MethodTooLong — _buildAdvancedSettings runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _SendScreenState._buildRecipientPage lib/screens/send/send_screen.dart:1967 — MethodTooLong — _buildRecipientPage runs 211 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 111 over it, 2.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _WalletAddScannerScreenState._getGuideTextSpan lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:114 — MethodTooLong — _getGuideTextSpan runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _BalanceHistoryWalletBreakdownState.build lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart:116 — MethodTooLong — build runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _SelectWalletBottomSheetState._buildSheet lib/screens/send/select_wallet_bottom_sheet.dart:219 — MethodTooLong — _buildSheet runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _FirstPowSceneBodyState.build lib/screens/ccos/coconut_open_store_first_pow_scene.dart:266 — MethodTooLong — build runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _AppSettingsScreen.build lib/screens/settings/app_settings/app_settings_screen.dart:223 — MethodTooLong — build runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _CoconutTextFieldState.build lib/ui/coconut/coconut_text_field.dart:614 — MethodTooLong — build runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CoconutColors.coconutTheme lib/design_system/tokens/coconut_colors.dart:1126 — MethodTooLong — coconutTheme runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _FirstPowDetailScreenState.build lib/screens/ccos/coconut_open_store_first_pow_scene.dart:943 — MethodTooLong — build runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _WalletBalanceHistoryScreenState._chart lib/screens/home/wallet_balance_history_screen.dart:330 — MethodTooLong — _chart runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _ManualSplitListItemState.build lib/screens/wallet_detail/utxo_split_screen.dart:2028 — MethodTooLong — build runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _CoconutPopupState.build lib/ui/coconut/coconut_overlays.dart:754 — MethodTooLong — build runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CoconutColors.dark lib/design_system/tokens/coconut_colors.dart:801 — MethodTooLong — dark runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CoconutColors.light lib/design_system/tokens/coconut_colors.dart:963 — MethodTooLong — light runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RealmDebugService.realmObjectToMap lib/services/realm_debug_service.dart:93 — MethodTooLong — realmObjectToMap runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CoconutColors.CoconutColors lib/design_system/tokens/coconut_colors.dart:360 — MethodTooLong — CoconutColors runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WalletItemCard._buildWalletItemContent lib/widgets/features/wallet/card/wallet_item_card.dart:117 — MethodTooLong — _buildWalletItemContent runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _UtxoCoinCardState.build lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:471 — MethodTooLong — build runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _CoconutOpenStoreIntroCardState.build lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:59 — MethodTooLong — build runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _DeletableSettingsRowState.build lib/widgets/common/bottom_sheet/deletable_settings_row.dart:125 — MethodTooLong — build runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _BroadcastingScreenState.build lib/screens/send/broadcasting_screen.dart:285 — MethodTooLong — build runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 39 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×47
  • FileTooLong: send/send_screen.dart lib/screens/send/send_screen.dart — FileTooLong — 2172 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _SendScreenState (119-2994). The bar is 500 significant lines; this is 1672 over it, 4.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: wallet_detail/utxo_split_screen.dart lib/screens/wallet_detail/utxo_split_screen.dart — FileTooLong — 1639 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: _UtxoSplitScreenState (71-1419). The bar is 500 significant lines; this is 1139 over it, 3.28× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: tools/p2p_calculator_screen.dart lib/screens/settings/tools/p2p_calculator_screen.dart — FileTooLong — 1442 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _P2PCalculatorScreenState (63-1943). The bar is 500 significant lines; this is 942 over it, 2.88× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ccos/coconut_open_store_first_pow_scene.dart lib/screens/ccos/coconut_open_store_first_pow_scene.dart — FileTooLong — 1335 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 835 over it, 2.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ccos/coconut_open_store_intro_screen.dart lib/screens/ccos/coconut_open_store_intro_screen.dart — FileTooLong — 1276 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 776 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tokens/coconut_colors.dart lib/design_system/tokens/coconut_colors.dart — FileTooLong — 1080 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: CoconutColors (40-1305). The bar is 500 significant lines; this is 580 over it, 2.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: hot_wallet/hot_wallet_restore_screen.dart lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart — FileTooLong — 1075 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: _HotWalletRestoreViewState (129-1410). The bar is 500 significant lines; this is 575 over it, 2.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utxo_merge/utxo_merge_screen.dart lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart — FileTooLong — 929 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _UtxoMergeScreenState (70-1273). The bar is 500 significant lines; this is 429 over it, 1.86× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: wallet_detail/wallet_detail_screen.dart lib/screens/wallet_detail/wallet_detail_screen.dart — FileTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: _WalletDetailScreenState (68-858). The bar is 500 significant lines; this is 420 over it, 1.84× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: home/hodl_insights_screen.dart lib/screens/home/hodl_insights_screen.dart — FileTooLong — 901 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 401 over it, 1.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: wallet_info/wallet_info_screen.dart lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart — FileTooLong — 885 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: _WalletInfoScreenState (221-1173). The bar is 500 significant lines; this is 385 over it, 1.77× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: providers/wallet_provider.dart lib/providers/wallet_provider.dart — FileTooLong — 872 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: WalletProvider (41-1331). The bar is 500 significant lines; this is 372 over it, 1.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utxo_overview/utxo_overview_screen.dart lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart — FileTooLong — 870 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _UtxoOverviewScreenState (68-1181). The bar is 500 significant lines; this is 370 over it, 1.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: send/send_view_model.dart lib/providers/view_model/send/send_view_model.dart — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: SendViewModel (89-1203). The bar is 500 significant lines; this is 326 over it, 1.65× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: coconut/coconut_overlays.dart lib/ui/coconut/coconut_overlays.dart — FileTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 320 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: wallet_detail/transaction_detail_screen.dart lib/screens/wallet_detail/transaction_detail_screen.dart — FileTooLong — 744 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: _TransactionDetailScreenState (70-1033). The bar is 500 significant lines; this is 244 over it, 1.49× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utxo_overview/utxo_tag_chart.dart lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart — FileTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 235 over it, 1.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: wallet_detail/transaction_fee_bumping_screen.dart lib/screens/wallet_detail/transaction_fee_bumping_screen.dart — FileTooLong — 732 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: _TransactionFeeBumpingScreenState (70-1067). The bar is 500 significant lines; this is 232 over it, 1.46× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: card_detail/wallet_card_detail_screen.dart lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart — FileTooLong — 731 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: _WalletCardDetailScreenState (91-990). The bar is 500 significant lines; this is 231 over it, 1.46× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utxo_split/utxo_split_view_model.dart lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart — FileTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: UtxoSplitViewModel (51-984). The bar is 500 significant lines; this is 215 over it, 1.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: node_provider/node_provider.dart lib/providers/node_provider/node_provider.dart — FileTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: NodeProvider (36-1100). The bar is 500 significant lines; this is 213 over it, 1.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: wallet/TrezorMethodHandler.kt android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt — FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: TrezorMethodHandler (52-978). The bar is 500 significant lines; this is 202 over it, 1.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: home/home_items_view.dart lib/widgets/features/home/home_items_view.dart — FileTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: HomeItemsViewState (71-716). The bar is 500 significant lines; this is 177 over it, 1.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: home/wallet_balance_history_screen.dart lib/screens/home/wallet_balance_history_screen.dart — FileTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: _WalletBalanceHistoryScreenState (85-717). The bar is 500 significant lines; this is 166 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: send/broadcasting_screen.dart lib/screens/send/broadcasting_screen.dart — FileTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: _BroadcastingScreenState (78-832). The bar is 500 significant lines; this is 154 over it, 1.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 22 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×39
  • ClassTooLong: _SendScreenState lib/screens/send/send_screen.dart:119 — ClassTooLong — 2016 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 1616 over it, 5.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _P2PCalculatorScreenState lib/screens/settings/tools/p2p_calculator_screen.dart:63 — ClassTooLong — 1345 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 945 over it, 3.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CoconutColors lib/design_system/tokens/coconut_colors.dart:39 — ClassTooLong — 1062 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 662 over it, 2.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _UtxoSplitScreenState lib/screens/wallet_detail/utxo_split_screen.dart:71 — ClassTooLong — 976 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 576 over it, 2.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _HotWalletRestoreViewState lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:129 — ClassTooLong — 975 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 575 over it, 2.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _UtxoMergeScreenState lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:70 — ClassTooLong — 867 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 467 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WalletProvider lib/providers/wallet_provider.dart:41 — ClassTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods. The bar is 400 significant lines; this is 429 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _UtxoOverviewScreenState lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:68 — ClassTooLong — 809 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 409 over it, 2.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SendViewModel lib/providers/view_model/send/send_view_model.dart:89 — ClassTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded), 110 methods. The bar is 400 significant lines; this is 335 over it, 1.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _WalletInfoScreenState lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:221 — ClassTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 298 over it, 1.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NodeProvider lib/providers/node_provider/node_provider.dart:36 — ClassTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 400 significant lines; this is 280 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _TransactionDetailScreenState lib/screens/wallet_detail/transaction_detail_screen.dart:70 — ClassTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 277 over it, 1.69× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _TransactionFeeBumpingScreenState lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:70 — ClassTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 270 over it, 1.68× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _WalletCardDetailScreenState lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:91 — ClassTooLong — 667 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 267 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TrezorMethodHandler android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:52 — ClassTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 241 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UtxoSplitViewModel lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:51 — ClassTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 240 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UtxoMergeViewModel lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:52 — ClassTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods. The bar is 400 significant lines; this is 181 over it, 1.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _BroadcastingScreenState lib/screens/send/broadcasting_screen.dart:78 — ClassTooLong — 579 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 179 over it, 1.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _WalletDetailScreenState lib/screens/wallet_detail/wallet_detail_screen.dart:68 — ClassTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 175 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _ElectrumServerScreen lib/screens/settings/app_settings/network/electrum_server_screen.dart:45 — ClassTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 167 over it, 1.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UtxoSplitTransactionBuilder lib/core/transaction/utxo_split_transaction_builder.dart:55 — ClassTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 155 over it, 1.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _WalletAddScannerScreenState lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:60 — ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 143 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _HotWalletCreateScreenState lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:44 — ClassTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 135 over it, 1.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LongPressedMenuWidgetState lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:85 — ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 127 over it, 1.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PreferenceProvider lib/providers/preferences/preference_provider.dart:36 — ClassTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods. The bar is 400 significant lines; this is 123 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 14 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×38
  • Hotspot: lib/screens/send/send_screen.dart lib/screens/send/send_screen.dart:1967 — lib/screens/send/send_screen.dart changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in _SendScreenState._buildRecipientPage at line 1967. 24 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/send/send_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:362 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in _HotWalletRestoreViewState.build at line 362. 24 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/widgets/features/home/home_items_view.dart lib/widgets/features/home/home_items_view.dart:285 — lib/widgets/features/home/home_items_view.dart changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in HomeItemsViewState._updatePreview at line 285. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/features/home/home_items_view.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/home/wallet_balance_history_screen.dart lib/screens/home/wallet_balance_history_screen.dart:330 — lib/screens/home/wallet_balance_history_screen.dart changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _WalletBalanceHistoryScreenState._chart at line 330. 13 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_balance_history_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:808 — lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in _WalletInfoScreenState._showTargetSettingBottomSheet at line 808. 11 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/wallet_detail/wallet_detail_screen.dart lib/screens/wallet_detail/wallet_detail_screen.dart:296 — lib/screens/wallet_detail/wallet_detail_screen.dart changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in _WalletDetailScreenState._buildTargetCard at line 296. 21 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/wallet_detail_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/send/broadcasting_screen.dart lib/screens/send/broadcasting_screen.dart:285 — lib/screens/send/broadcasting_screen.dart changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _BroadcastingScreenState.build at line 285. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/send/broadcasting_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/send/send_confirm_screen.dart lib/screens/send/send_confirm_screen.dart:452 — lib/screens/send/send_confirm_screen.dart changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _SendConfirmScreenState._signHotWallet at line 452. 10 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/send/send_confirm_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307 — lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in LongPressedMenuWidgetState.showMenu at line 307. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/providers/view_model/send/broadcasting_view_model.dart lib/providers/view_model/send/broadcasting_view_model.dart:375 — lib/providers/view_model/send/broadcasting_view_model.dart changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in BroadcastingViewModel.setTxInfo at line 375. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/providers/view_model/send/broadcasting_view_model.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/providers/node_provider/node_provider.dart lib/providers/node_provider/node_provider.dart:417 — lib/providers/node_provider/node_provider.dart changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in NodeProvider.initialize at line 417. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/providers/node_provider/node_provider.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/providers/wallet_provider.dart lib/providers/wallet_provider.dart:654 — lib/providers/wallet_provider.dart changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in WalletProvider._addHotWallet at line 654. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/providers/wallet_provider.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:472 — lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in _TrezorUsbConnectScreenState._buildPrimaryActionButton at line 472. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart:116 — lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in _BalanceHistoryWalletBreakdownState.build at line 116. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/settings/app_settings/app_settings_screen.dart lib/screens/settings/app_settings/app_settings_screen.dart:223 — lib/screens/settings/app_settings/app_settings_screen.dart changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in _AppSettingsScreen.build at line 223. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/settings/app_settings/app_settings_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/ui/coconut/coconut_text_field.dart lib/ui/coconut/coconut_text_field.dart:614 — lib/ui/coconut/coconut_text_field.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in _CoconutTextFieldState.build at line 614. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/ui/coconut/coconut_text_field.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/send/select_wallet_bottom_sheet.dart lib/screens/send/select_wallet_bottom_sheet.dart:219 — lib/screens/send/select_wallet_bottom_sheet.dart changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in _SelectWalletBottomSheetState._buildSheet at line 219. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/send/select_wallet_bottom_sheet.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/widgets/features/wallet/card/wallet_info_item_card.dart lib/widgets/features/wallet/card/wallet_info_item_card.dart:153 — lib/widgets/features/wallet/card/wallet_info_item_card.dart changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in _WalletInfoItemCardState.build at line 153. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/features/wallet/card/wallet_info_item_card.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/wallet_detail/utxo_split_screen.dart lib/screens/wallet_detail/utxo_split_screen.dart:643 — lib/screens/wallet_detail/utxo_split_screen.dart changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in _UtxoSplitScreenState._buildApplyButton at line 643. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/utxo_split_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:553 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in _TrezorBleConnectScreenState._buildPrimaryActionButton at line 553. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:338 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in _BitBox02ConnectScreenState._buildPrimaryActionButton at line 338. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/widgets/features/wallet/card/wallet_item_card.dart lib/widgets/features/wallet/card/wallet_item_card.dart:117 — lib/widgets/features/wallet/card/wallet_item_card.dart changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in WalletItemCard._buildWalletItemContent at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/features/wallet/card/wallet_item_card.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/screens/wallet_detail/card_detail/wallet_detail_card_carousel.dart lib/screens/wallet_detail/card_detail/wallet_detail_card_carousel.dart:155 — lib/screens/wallet_detail/card_detail/wallet_detail_card_carousel.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in _WalletDetailCardCarouselState.build at line 155. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/screens/wallet_detail/card_detail/wallet_detail_card_carousel.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/widgets/common/buttons/shrink_animation_button.dart lib/widgets/common/buttons/shrink_animation_button.dart:131 — lib/widgets/common/buttons/shrink_animation_button.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _ShrinkAnimationButtonState.build at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/widgets/common/buttons/shrink_animation_button.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/ui/coconut/coconut_overlays.dart lib/ui/coconut/coconut_overlays.dart:754 — lib/ui/coconut/coconut_overlays.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in _CoconutPopupState.build at line 754. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:44:21 +09:00' --until='2026-11-10 16:44:21 +09:00' --full-history --no-merges -- lib/ui/coconut/coconut_overlays.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 13 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×38
  • TooManyMethods: SendViewModel lib/providers/view_model/send/send_view_model.dart:89 — TooManyMethods — 110 methods. The bar is 30 methods; this is 80 over it, 3.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PreferenceProvider lib/providers/preferences/preference_provider.dart:36 — TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UtxoMergeViewModel lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:52 — TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WalletProvider lib/providers/wallet_provider.dart:41 — TooManyMethods — 89 methods. The bar is 30 methods; this is 59 over it, 2.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _SendScreenState lib/screens/send/send_screen.dart:119 — TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NodeProvider lib/providers/node_provider/node_provider.dart:36 — TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UtxoSplitViewModel lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:51 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UtxoOverviewViewModel lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:27 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WalletInfoViewModel lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:29 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BroadcastingViewModel lib/providers/view_model/send/broadcasting_view_model.dart:38 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SharedPrefsRepository lib/repository/shared_preference/shared_prefs_repository.dart:10 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _P2PCalculatorScreenState lib/screens/settings/tools/p2p_calculator_screen.dart:63 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HomeViewModel lib/providers/view_model/home/home_view_model.dart:18 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FeeBumpingViewModel lib/providers/view_model/wallet_detail/fee_bumping_view_model.dart:33 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TransactionDetailViewModel lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:22 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _UtxoMergeScreenState lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:70 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _UtxoOverviewScreenState lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:68 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: P2PCalculatorViewModel lib/providers/view_model/utility/p2p_calculator_view_model.dart:19 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TransactionListViewModel lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:29 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _HotWalletRestoreViewState lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:129 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UtxoSplitTransactionBuilder lib/core/transaction/utxo_split_transaction_builder.dart:55 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WalletAppearanceViewModel lib/providers/view_model/wallet_detail/wallet_appearance_view_model.dart:40 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TrezorBleConnectViewModel lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:28 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TrezorUsbConnectViewModel lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:28 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _WalletCardDetailScreenState lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:91 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 13 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×30
  • Swallowed exception (caught, then discarded) lib/widgets/features/wallet/card/wallet_info_item_card.dart:82 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:76 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:91 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:124 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:128 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/bc_ur_qr_scan_data_handler.dart:69 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/bc_ur_qr_scan_data_handler.dart:83 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/coconut_wallet_add_qr_scan_data_handler.dart:78 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/composed_scan_data_handler.dart:46 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/descriptor_qr_scan_data_handler.dart:41 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/widgets/features/qr/animated_qr/scan_data_handler/extended_pub_key_qr_scan_data_handler.dart:11 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/address_util.dart:193 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/balance_format_util.dart:28 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/hex_util.dart:7 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/logger.dart:87 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/seed_qr_decoder.dart:89 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/bitcoin/transaction_util.dart:16 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/bb_qr/bb_qr_decoder.dart:79 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/bb_qr/bb_qr_decoder.dart:104 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/bb_qr/bb_qr_decoder.dart:118 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/utils/bb_qr/bb_qr_decoder.dart:146 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/services/electrum_service.dart:148 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/services/model/response/electrum_response_types.dart:53 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/screens/wallet_detail/wallet_detail_faucet_request_bottom_sheet.dart:308 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/repository/shared_preference/shared_prefs_repository.dart:191 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 5 more in this group — see findings.md.
X25 · Inert configuration knob · Configuration option is read nowhere · ×29
  • Configuration option is read nowhere rust/trezor-connect-rs/src/credential_store.rs:46 — `StoredCredential.device_label` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:25 — `Features.pin_protection` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:39 — `Features.imported` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:41 — `Features.unlocked` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:43 — `Features.passphrase_cached` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:45 — `Features.firmware_present` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:49 — `Features.flags` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:53 — `Features.unfinished_backup` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:55 — `Features.no_backup` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:57 — `Features.recovery_mode` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:63 — `Features.sd_card_present` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:65 — `Features.sd_protection` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:67 — `Features.wipe_code_protection` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:75 — `Features.auto_lock_delay_ms` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/device/features.rs:79 — `Features.experimental_features` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/params.rs:24 — `GetAddressParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/params.rs:57 — `SignMessageParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/params.rs:73 — `VerifyMessageParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/params.rs:298 — `SignTxParams.push` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/params.rs:304 — `SignTxParams.chunkify` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/types/network.rs:88 — `CoinInfo.shortcut` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/types/network.rs:90 — `CoinInfo.network` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/types/network.rs:92 — `CoinInfo.decimals` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/types/network.rs:94 — `CoinInfo.segwit` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere rust/trezor-connect-rs/src/types/network.rs:96 — `CoinInfo.taproot` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • + 4 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×22
  • TodoComment test/core/transaction/transaction_builder/transaction_builder_taproot_test.dart:511 — // TODO: update with exact keyPath base fee after running — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/widgets/features/wallet/header/wallet_detail_sticky_header.dart:9 — /// TODO: WalletDetailScreen에서 TransactionListHeader를 사용하도록 변경 후 삭제 예정 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:513 — // TODO: ccos랑 머지 후 색상은 primary — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/widgets/features/wallet/card/wallet_info_item_card.dart:191 — // TODO: 만약 멀티시그의 외부지갑도 지원하게 된다면 이 부분 수정해야합니다. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/utils/alert_util.dart:6 — // todo : cds에 맞게 수정 후 삭제 예정 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/services/wallet_add_service.dart:69 — // TODO: cborBytes == decodedCbor (?) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/screens/wallet_detail/address_list_screen.dart:466 — // TODO: CoconutToolTip의 placement 타입은 내부적으로 width 파라미터를 사용하지 않고 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/screens/settings/app_settings/about/app_info_screen.dart:213 — // TODO: mainnet인 경우 gradient 적용 필요 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/screens/settings/app_settings/about/coconut_crew_screen.dart:179 — // TODO: 실제 CDN 링크로 파일 구성 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/screens/send/send_screen.dart:875 — // TODO: balance_format_util의 formatSatoshiToReadableBitcoin을 응용해서 Formatter를 하나 더 추가하기 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/screens/send/air-gapped/signed_psbt_scanner_screen.dart:79 — // TODO: CoconutQrScanner -> AnimatedQrScanner로 Rename — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/screens/send/air-gapped/signed_psbt_scanner_screen.dart:250 — // TODO: third party 추가 시 [5]가 갑자기 나와서 임시 주석 처리 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/wallet_provider.dart:526 — /// TODO: 추후 멀티시그지갑 descriptor 추가 가능해 진 후 함수 변경 필요 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:184 — // todo: 상태를 반환해주도록 수정되면 좋겠음. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/view_model/wallet_detail/utxo_tag_crud_view_model.dart:18 — // todo 컬러 인덱스 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:410 — // TODO: max 이하인지도 확인해야함 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:476 — // TODO: 반환 값 의미 불명확 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:558 — // TODO: 이렇게 키를 생성해서 사용하는 것이 좋은 방법인지 확인 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/providers/node_provider/isolate/isolate_initializer.dart:25 — // TODO: isSetPin, 핀 설정/해제할 때 isolate에서도 인지할 수 있는 로직 추가 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/core/transaction/utxo_selector.dart:93 — // TODO: 기존 로직과의 차이: dust보다 큰 값이 남는지 체크 안해보는 중. change Output이 없도록 트랜잭션을 만들 수가 있음 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/constants/app_info.dart:3 — /// TODO: release date 기록 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment go/Seq.java:77 — // TODO(crawshaw): We could cut down allocations for frequently — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×15
  • Duplicated block (10 lines × 2) lib/design_system/tokens/coconut_colors.dart:952 — lib/design_system/tokens/coconut_colors.dart:952-961 | lib/design_system/tokens/coconut_colors.dart:1115-1124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/design_system/tokens/coconut_colors.dart:952` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/design_system/tokens/coconut_colors.dart:951` calls `Color` and `lib/design_system/tokens/coconut_colors.dart:1114` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) lib/providers/node_provider/transaction/mempool_api_service.dart:28 — lib/providers/node_provider/transaction/mempool_api_service.dart:28-37 | lib/providers/node_provider/transaction/mempool_api_service.dart:45-54 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/providers/node_provider/transaction/mempool_api_service.dart:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) lib/screens/ccos/coconut_open_store_build_scene.dart:137 — lib/screens/ccos/coconut_open_store_build_scene.dart:137-146 | lib/screens/ccos/coconut_open_store_build_scene.dart:175-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_build_scene.dart:137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:617 — lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:617-626 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:1377-1386 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:617` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:584 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:584-593 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:252-261 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:584` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:601 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:601-610 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:511-520 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:601` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `TrezorBleConnectViewModel` in one and `TrezorUsbConnectViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) lib/screens/send/broadcasting_complete_screen.dart:339 — lib/screens/send/broadcasting_complete_screen.dart:339-348 | lib/screens/send/broadcasting_screen.dart:840-849 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) lib/screens/send/connected/trezor_sign_screen.dart:313 — lib/screens/send/connected/trezor_sign_screen.dart:313-322 | lib/screens/send/connected/trezor_sign_screen.dart:350-359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/screens/settings/app_settings/network/electrum_server_screen.dart:556 — lib/screens/settings/app_settings/network/electrum_server_screen.dart:556-565 | lib/screens/settings/app_settings/network/electrum_server_screen.dart:634-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/app_settings/network/electrum_server_screen.dart:556` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) lib/screens/wallet_detail/utxo_overview/utxo_summary_chart.dart:64 — lib/screens/wallet_detail/utxo_overview/utxo_summary_chart.dart:64-73 | lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:155-164 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_summary_chart.dart:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) lib/services/web_socket_service.dart:232 — lib/services/web_socket_service.dart:232-241 | lib/services/web_socket_service.dart:258-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/utils/numeric_input_formatters.dart:84 — lib/utils/numeric_input_formatters.dart:84-93 | lib/utils/numeric_input_formatters.dart:135-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/utils/numeric_input_formatters.dart:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/utils/numeric_input_formatters.dart:81` calls `tryParse` and `lib/utils/numeric_input_formatters.dart:133` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:247 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:247-256 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:191-200 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/screens/settings/tools/bip329/label_management_screen.dart:40 — lib/screens/settings/tools/bip329/label_management_screen.dart:40-49 | lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:1051-1060 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_management_screen.dart` and `lib/screens/wallet_detail/transaction_fee_bumping_screen.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/screens/settings/tools/bip329/label_management_screen.dart:51 — lib/screens/settings/tools/bip329/label_management_screen.dart:51-60 | lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:1040-1049 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_management_screen.dart` and `lib/screens/wallet_detail/transaction_fee_bumping_screen.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D6 · Cohesion (LCOM4) · Low cohesion · ×15
  • Low cohesion: WalletRepository (LCOM4 13) lib/repository/realm/wallet_repository.dart:27 — WalletRepository's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UtxoOverviewViewModel (LCOM4 11) lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:27 — UtxoOverviewViewModel's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UtxoMergeViewModel (LCOM4 9) lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:52 — UtxoMergeViewModel's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TransactionRecord (LCOM4 6) lib/model/wallet/transaction_record.dart:6 — TransactionRecord's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HomeViewModel (LCOM4 5) lib/providers/view_model/home/home_view_model.dart:18 — HomeViewModel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UtxoSplitViewModel (LCOM4 5) lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:51 — UtxoSplitViewModel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WalletAppearanceViewModel (LCOM4 5) lib/providers/view_model/wallet_detail/wallet_appearance_view_model.dart:40 — WalletAppearanceViewModel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TransactionDraftRepository (LCOM4 5) lib/repository/realm/transaction_draft_repository.dart:12 — TransactionDraftRepository's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SendConfirmViewModel (LCOM4 4) lib/providers/view_model/send/send_confirm_view_model.dart:15 — SendConfirmViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UtxoSelectionViewModel (LCOM4 4) lib/providers/view_model/send/utxo_selection_view_model.dart:15 — UtxoSelectionViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WalletDetailViewModel (LCOM4 4) lib/providers/view_model/wallet_detail/wallet_detail_view_model.dart:22 — WalletDetailViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WalletInfoViewModel (LCOM4 4) lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:29 — WalletInfoViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _WalletCardDetailScreenState (LCOM4 4) lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:91 — _WalletCardDetailScreenState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Result (LCOM4 4) lib/utils/result.dart:3 — Result's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _QrScannerViewState (LCOM4 4) lib/widgets/features/qr/qr_scanner_view.dart:44 — _QrScannerViewState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×11
  • Duplicated block (9 lines × 2) lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:110 — lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:110-118 | lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:304-312 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:172 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:172-180 | lib/screens/send/connected/bitbox02_sign_screen.dart:104-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) lib/screens/home/wallet_stack_list_screen.dart:207 — lib/screens/home/wallet_stack_list_screen.dart:207-215 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:146-154 — before extracting anything, compare `lib/screens/home/wallet_stack_list_screen.dart` and `lib/widgets/features/wallet/card/wallet_carousel_indicator.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_stack_list_screen.dart:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:232 — lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:232-240 | lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:259-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:232` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:263 — lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:263-271 | lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:273-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:263` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/screens/send/connected/bitbox02_sign_screen.dart:191 — lib/screens/send/connected/bitbox02_sign_screen.dart:191-199 | lib/screens/send/connected/trezor_sign_screen.dart:204-212 — before extracting anything, compare `lib/screens/send/connected/bitbox02_sign_screen.dart` and `lib/screens/send/connected/trezor_sign_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/connected/bitbox02_sign_screen.dart:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/screens/send/send_screen.dart:2564 — lib/screens/send/send_screen.dart:2564-2572 | lib/screens/send/send_screen.dart:2599-2607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_screen.dart:2564` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:800 — lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:800-808 | lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:834-842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:800` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:273 — lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:273-281 | lib/providers/view_model/send/connected/trezor_sign_view_model.dart:249-257 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) ios/Runner/TrezorMethodHandler.swift:602 — ios/Runner/TrezorMethodHandler.swift:602-610 | ios/Runner/TrezorMethodHandler.swift:627-635 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) rust/trezor-bridge/src/lib.rs:85 — rust/trezor-bridge/src/lib.rs:85-93 | rust/trezor-bridge/src/lib.rs:143-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×10
  • Duplicated block (12 lines × 2) lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:317 — lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:317-328 | lib/providers/view_model/wallet_detail/wallet_detail_view_model.dart:154-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:329` calls `error` and `lib/providers/view_model/wallet_detail/wallet_detail_view_model.dart:166` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) lib/screens/ccos/coconut_open_store_intro_screen.dart:1596 — lib/screens/ccos/coconut_open_store_intro_screen.dart:1596-1607 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1609-1620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_intro_screen.dart:1596` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) lib/screens/home/all_features_screen.dart:312 — lib/screens/home/all_features_screen.dart:312-323 | lib/screens/home/home_edit_screen.dart:454-465 — before extracting anything, compare `lib/screens/home/all_features_screen.dart` and `lib/screens/home/home_edit_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/all_features_screen.dart:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/screens/review/negative_feedback_screen.dart:76 — lib/screens/review/negative_feedback_screen.dart:76-87 | lib/screens/review/positive_feedback_screen.dart:75-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/review/negative_feedback_screen.dart:76` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) lib/screens/send/connected/bitbox02_sign_screen.dart:76 — lib/screens/send/connected/bitbox02_sign_screen.dart:76-87 | lib/screens/send/connected/trezor_sign_screen.dart:91-102 — before extracting anything, compare `lib/screens/send/connected/bitbox02_sign_screen.dart` and `lib/screens/send/connected/trezor_sign_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/connected/bitbox02_sign_screen.dart:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/screens/wallet_detail/transaction_detail_screen.dart:712 — lib/screens/wallet_detail/transaction_detail_screen.dart:712-723 | lib/screens/wallet_detail/utxo_detail_screen.dart:483-494 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/transaction_detail_screen.dart:712` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/screens/wallet_detail/utxo_split_screen.dart:469 — lib/screens/wallet_detail/utxo_split_screen.dart:469-480 | lib/screens/wallet_detail/utxo_split_screen.dart:1445-1456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_split_screen.dart:469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/widgets/features/send/send_transaction_flow_card.dart:370 — lib/widgets/features/send/send_transaction_flow_card.dart:370-381 | lib/widgets/features/send/send_transaction_flow_card.dart:386-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/widgets/features/wallet/icon/wallet_icon.dart:99 — lib/widgets/features/wallet/icon/wallet_icon.dart:99-110 | lib/widgets/features/wallet/icon/wallet_icon_small.dart:115-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/wallet/icon/wallet_icon.dart:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:318 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:318-329 | android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:739-750 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×10
  • Duplicated block (11 lines × 2) lib/providers/transaction_provider.dart:18 — lib/providers/transaction_provider.dart:18-28 | lib/providers/transaction_provider.dart:34-44 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/ccos/coconut_open_store_idea_scene.dart:54 — lib/screens/ccos/coconut_open_store_idea_scene.dart:54-64 | lib/screens/ccos/coconut_open_store_idea_scene.dart:85-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_idea_scene.dart:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:303 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:303-313 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:460-470 — before extracting anything, compare `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:303` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `BitBox02ConnectViewModel` in one and `TrezorUsbConnectViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:333 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:333-343 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:299-309 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:333` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:644 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:644-654 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:1269-1279 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) lib/screens/review/negative_feedback_screen.dart:19 — lib/screens/review/negative_feedback_screen.dart:19-29 | lib/screens/review/positive_feedback_screen.dart:16-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) lib/screens/send/broadcasting_screen.dart:793 — lib/screens/send/broadcasting_screen.dart:793-803 | lib/screens/send/send_confirm_screen.dart:695-705 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/broadcasting_screen.dart:793` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `BroadcastingViewModel` in one and `SendConfirmViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) lib/screens/send/connected/bitbox02_sign_screen.dart:62 — lib/screens/send/connected/bitbox02_sign_screen.dart:62-72 | lib/screens/send/connected/trezor_sign_screen.dart:67-77 — before extracting anything, compare `lib/screens/send/connected/bitbox02_sign_screen.dart` and `lib/screens/send/connected/trezor_sign_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/connected/bitbox02_sign_screen.dart:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) lib/screens/settings/tools/bip329/label_management_screen.dart:176 — lib/screens/settings/tools/bip329/label_management_screen.dart:176-186 | lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:434-444 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_management_screen.dart` and `lib/screens/wallet_detail/transaction_fee_bumping_screen.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/bip329/label_management_screen.dart:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) lib/utils/numeric_input_formatters.dart:49 — lib/utils/numeric_input_formatters.dart:49-59 | lib/utils/numeric_input_formatters.dart:105-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/utils/numeric_input_formatters.dart:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×10
  • Duplicated block (7 lines × 2) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:247 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:247-253 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:420-426 — before extracting anything, compare `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `BitBox02ConnectViewModel` in one and `TrezorUsbConnectViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) lib/screens/home/wallet_add/wallet_add_mfp_input_bottom_sheet.dart:69 — lib/screens/home/wallet_add/wallet_add_mfp_input_bottom_sheet.dart:69-75 | lib/screens/wallet_detail/wallet_info/wallet_info_edit_bottom_sheet.dart:122-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) lib/utils/seed_qr_decoder.dart:138 — lib/utils/seed_qr_decoder.dart:138-144 | lib/utils/seed_qr_decoder.dart:159-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/utils/seed_qr_decoder.dart:138` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) lib/widgets/features/send/send_transaction_flow_card.dart:625 — lib/widgets/features/send/send_transaction_flow_card.dart:625-631 | lib/widgets/features/send/send_transaction_flow_card.dart:637-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) lib/screens/ccos/coconut_open_store_contribute_screen.dart:40 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:40-46 | lib/screens/ccos/coconut_open_store_idea_scene.dart:27-33 — before extracting anything, compare `lib/screens/ccos/coconut_open_store_contribute_screen.dart` and `lib/screens/ccos/coconut_open_store_idea_scene.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) lib/core/transaction/fee_bumping/cpfp_builder.dart:319 — lib/core/transaction/fee_bumping/cpfp_builder.dart:319-325 | lib/core/transaction/fee_bumping/rbf_builder.dart:654-660 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:128 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:128-134 | lib/screens/wallet_detail/utxo_split_screen.dart:120-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:144 — lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:144-150 | lib/widgets/features/qr/animated_qr/scan_data_handler/bc_ur_qr_scan_data_handler.dart:98-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:39 — lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:39-45 | lib/screens/wallet_detail/wallet_info/trezor_section.dart:39-45 — before extracting anything, compare `lib/screens/wallet_detail/wallet_info/bitbox02_section.dart` and `lib/screens/wallet_detail/wallet_info/trezor_section.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) rust/trezor-bridge/src/lib.rs:709 — rust/trezor-bridge/src/lib.rs:709-715 | rust/trezor-bridge/src/lib.rs:834-840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/trezor-bridge/src/lib.rs:709` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X2 · Cancellation propagation · Function without a CancelToken · ×10
  • Function without a CancelToken: sendFaucetRequest lib/services/dio_client.dart:30 — `sendFaucetRequest` calls `_dio.post(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: getFaucetStatus lib/services/dio_client.dart:50 — `getFaucetStatus` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: getLatestAppVersion lib/services/dio_client.dart:55 — `getLatestAppVersion` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: getRecommendedFee lib/services/dio_client.dart:72 — `getRecommendedFee` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _getMempoolSpaceFees lib/services/fee_service.dart:33 — `_getMempoolSpaceFees` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _fetchBitflyerDailyCloses lib/services/historical_bitcoin_price_service.dart:23 — `_fetchBitflyerDailyCloses` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _fetchUpbitDailyCloses lib/services/historical_bitcoin_price_service.dart:54 — `_fetchUpbitDailyCloses` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _fetchBinanceDailyCloses lib/services/historical_bitcoin_price_service.dart:77 — `_fetchBinanceDailyCloses` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: getLnInvoiceOfPow lib/services/speed_app_ln_invoice_service.dart:7 — `getLnInvoiceOfPow` calls `_dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _fetchPriceForFiat lib/providers/view_model/utility/p2p_calculator_view_model.dart:351 — `_fetchPriceForFiat` calls `dio.get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
X3 · Exception handling · Swallowed exception (empty catch) · ×10
  • Swallowed exception (empty catch) lib/utils/logger.dart:64 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/ui/coconut/coconut_overlays.dart:77 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/ui/coconut/coconut_overlays.dart:154 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/services/hardware_wallet/bitbox02_device.dart:63 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/services/hardware_wallet/bitbox02_device.dart:94 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:462 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:354 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:365 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:84 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:90 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:269 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:269-276 | lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:288-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:269` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) lib/screens/home/wallet_list_user_experience_survey_bottom_sheet.dart:67 — lib/screens/home/wallet_list_user_experience_survey_bottom_sheet.dart:67-74 | lib/screens/review/negative_feedback_screen.dart:66-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_list_user_experience_survey_bottom_sheet.dart:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) lib/screens/send/send_confirm_screen.dart:528 — lib/screens/send/send_confirm_screen.dart:528-535 | lib/screens/send/send_screen.dart:1000-1007 — before extracting anything, compare `lib/screens/send/send_confirm_screen.dart` and `lib/screens/send/send_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) lib/screens/settings/app_settings/network/block_explorer_screen.dart:211 — lib/screens/settings/app_settings/network/block_explorer_screen.dart:211-218 | lib/screens/settings/app_settings/network/block_explorer_screen.dart:260-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/app_settings/network/block_explorer_screen.dart:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) lib/widgets/common/buttons/shrink_animation_button.dart:186 — lib/widgets/common/buttons/shrink_animation_button.dart:186-193 | lib/widgets/features/home/widgets/home_widget_parts.dart:67-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/common/buttons/shrink_animation_button.dart:186` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) lib/widgets/features/home/home_items_view.dart:621 — lib/widgets/features/home/home_items_view.dart:621-628 | lib/widgets/features/home/home_items_view.dart:698-705 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/home/home_items_view.dart:621` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) lib/widgets/features/send/send_transaction_flow_card.dart:386 — lib/widgets/features/send/send_transaction_flow_card.dart:386-393 | lib/widgets/features/send/send_transaction_flow_card.dart:425-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/send/send_transaction_flow_card.dart:386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:897 — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:897-904 | lib/screens/wallet_detail/wallet_detail_screen.dart:811-818 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) ios/Runner/TrezorMethodHandler.swift:182 — ios/Runner/TrezorMethodHandler.swift:182-189 | ios/Runner/TrezorMethodHandler.swift:287-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ios/Runner/TrezorMethodHandler.swift:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×9
  • Duplicated block (6 lines × 2) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:355 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:355-360 | lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:576-581 — before extracting anything, compare `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:355` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `BitBox02ConnectViewModel` in one and `TrezorBleConnectViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:577 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:577-582 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:501-506 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:577` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:729 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:729-734 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:339-344 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) lib/repository/shared_preference/shared_prefs_repository.dart:198 — lib/repository/shared_preference/shared_prefs_repository.dart:198-203 | lib/repository/shared_preference/shared_prefs_repository.dart:265-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) lib/screens/home/hodl_insights_screen.dart:821 — lib/screens/home/hodl_insights_screen.dart:821-826 | lib/screens/home/hodl_insights_screen.dart:1233-1238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/hodl_insights_screen.dart:821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) lib/app.dart:219 — lib/app.dart:219-224 | lib/screens/home/hodl_insights_screen.dart:539-544 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:495 — lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:495-500 | lib/providers/view_model/wallet_detail/utxo_detail_view_model.dart:237-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) ios/Runner/Bitbox02MethodHandler.swift:243 — ios/Runner/Bitbox02MethodHandler.swift:243-248 | ios/Runner/Bitbox02MethodHandler.swift:266-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) ios/Runner/Bitbox02MethodHandler.swift:359 — ios/Runner/Bitbox02MethodHandler.swift:359-364 | ios/Runner/Bitbox02MethodHandler.swift:390-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×8
  • Edited copy of a member (12 corresponding lines) lib/screens/home/hodl_insights_screen.dart:821 — lib/screens/home/hodl_insights_screen.dart:821-832 | lib/screens/home/hodl_insights_screen.dart:1233-1244 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/services/electrum_service.dart:176 — lib/services/electrum_service.dart:176-187 | lib/services/electrum_service.dart:189-200 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:408 — lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:408-419 | lib/widgets/features/wallet/trezor/trezor_connect_shared_widgets.dart:220-240 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:239 — lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:239-250 | lib/providers/view_model/send/connected/trezor_sign_view_model.dart:214-225 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:70 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:70-81 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:72-84 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:246 — lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:246-257 | lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:302-313 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:868 — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:868-880 | lib/screens/wallet_detail/wallet_detail_screen.dart:786-797 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:357 — REDACTED:357-368 | lib/widgets/features/utxo/dropdown/utxo_filter_dropdown.dart:72-83 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×8
  • Duplicated block (5 lines × 2) lib/screens/ccos/coconut_open_store_intro_screen.dart:706 — lib/screens/ccos/coconut_open_store_intro_screen.dart:706-710 | lib/screens/ccos/coconut_open_store_intro_screen.dart:722-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_intro_screen.dart:706` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) lib/widgets/features/home/widgets/activity_widget_views.dart:122 — lib/widgets/features/home/widgets/activity_widget_views.dart:122-126 | lib/widgets/features/home/widgets/wallet_list_view.dart:118-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/home/widgets/activity_widget_views.dart:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:96 — lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:96-100 | lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:285-289 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) lib/widgets/features/home/widgets/wallet_widget_views.dart:195 — lib/widgets/features/home/widgets/wallet_widget_views.dart:195-199 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:248-252 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) lib/widgets/features/send/send_transaction_flow_card.dart:719 — lib/widgets/features/send/send_transaction_flow_card.dart:719-723 | lib/widgets/features/transaction/card/transaction_input_output_card.dart:486-490 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) lib/screens/home/wallet_stack_list_screen.dart:147 — lib/screens/home/wallet_stack_list_screen.dart:147-151 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:87-91 — before extracting anything, compare `lib/screens/home/wallet_stack_list_screen.dart` and `lib/widgets/features/wallet/card/wallet_carousel_indicator.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:322 — lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:322-326 | lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:334-338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:322` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:309 — lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:309-313 | lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:356-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:309` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×8
  • Owned disposable field is never released lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:84 — `_TransactionFeeBumpingScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_feeTextFieldFocusNode` itself (line 84, `FocusNode`), which makes that instance its own. Nothing in the class releases it — no `_feeTextFieldFocusNode.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `FocusNode` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_feeTextFieldFocusNode.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/screens/settings/tools/p2p_calculator_screen.dart:92 — `_P2PCalculatorScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_scrollController` itself (line 92, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_scrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_scrollController.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/screens/settings/app_settings/network/electrum_server_screen.dart:51 — `_ElectrumServerScreen` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_defaultServerScrollController` itself (line 51, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_defaultServerScrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_defaultServerScrollController.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/screens/settings/app_settings/about/app_info_screen.dart:41 — `_AppInfoScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_scrollController` itself (line 41, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_scrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_scrollController.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/screens/send/send_screen.dart:176 — `_SendScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_screenScrollController` itself (line 176, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_screenScrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_screenScrollController.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/screens/send/send_screen.dart:177 — `_SendScreenState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_addressListScrollController` itself (line 177, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_addressListScrollController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `ScrollController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_addressListScrollController.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/packages/mobile_scanner/lib/src/web/mobile_scanner_web.dart:35 — `MobileScannerWeb` carries a disposal duty — it declares its own release — and it creates `_barcodesController` itself (line 35, `StreamController.broadcast`), which makes that instance its own. Nothing in the class releases it — no `_barcodesController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController.broadcast` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_barcodesController.close();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released lib/packages/mobile_scanner/lib/src/web/mobile_scanner_web.dart:49 — `MobileScannerWeb` carries a disposal duty — it declares its own release — and it creates `_settingsController` itself (line 49, `StreamController.broadcast`), which makes that instance its own. Nothing in the class releases it — no `_settingsController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController.broadcast` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_settingsController.close();` in `dispose()` before `super.dispose()`.
D35 · Change Coupling · Change coupling · ×7
  • Change coupling: trezor_ble_connect_screen.dart ↔ trezor_usb_connect_screen.dart lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:1 — `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` change together 100% of the time (18 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `8543279c` refactor(hardware-wallet): 재연결 모드 명시화 및 모드 구분 테스트 추가, 미사용 번역 키 제거; `a3a314aa` enhance(wallet-info): '이 기기 정보' 섹션 분리 및 연결 해제·재연결 지원; `1205db44` fix(trezor): preserve recovery guidance and cancel stale connections … — run `git show` on any of them.
  • Change coupling: bitbox02_sign_viewmodel.dart ↔ bitbox02_connect_viewmodel.dart lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:1 — `lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart` and `lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `108664af` fix(BitBox02): 페어링 코드 비교없이 연결 완료하던 버그 수정; `2c8f6c2a` fix(Bitbox): 서명 과정 지갑 불일치 UI, 연결 UX 개선; `d01133b4` feat(Trezor): 서명 전 연결 상태, 지갑 일치 여부에 따른 에러 처리 — run `git show` on any of them.
  • Change coupling: multisig_wallet_item.dart ↔ singlesig_wallet_item.dart lib/model/wallet/multisig_wallet_item.dart:1 — `lib/model/wallet/multisig_wallet_item.dart` and `lib/model/wallet/singlesig_wallet_item.dart` change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `4823d7e1` feat(external-wallet-info): 외부지갑한정 이름 변경 기능 추가 (at that commit the files were still `lib/model/wallet/multisig_wallet_list_item.dart` and `lib/model/wallet/singlesig_wallet_list_item.dart`); `a8013641` feat(coconut_wallet_model): 외부지갑 스키마 추가(ExternalWallet) feat(wallet_r… (at that commit the files were still `lib/model/wallet/multisig_wallet_list_item.dart` and `lib/model/wallet/singlesig_wallet_list_item.dart`); `45ec47fd` refactor(wallet-detail): 받기, 보내기 호출 시 하나의 함수 호출되도록 수정 (at that commit the files were still `lib/model/wallet/multisig_wallet_list_item.dart` and `lib/model/wallet/singlesig_wallet_list_item.dart`) — run `git show` on any of them.
  • Change coupling: cpfp_service.dart ↔ rbf_service.dart lib/providers/node_provider/transaction/cpfp_service.dart:1 — `lib/providers/node_provider/transaction/cpfp_service.dart` and `lib/providers/node_provider/transaction/rbf_service.dart` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `291f0c77` fix(sync): 확정 거래 UTXO 정리 실패 후 재시도 복구; `ad7bdea5` fix(realm-id): Realm 객체를 위한 id 관련 함수를 RealmIdService로 모으기, Object.has…; `30e5630e` refactor(dto): rbf, cpfp 관련 dto 클래스 중복 제거 — run `git show` on any of them.
  • Change coupling: pin_check_screen.dart ↔ pin_setting_screen.dart lib/screens/common/pin_check_screen.dart:1 — `lib/screens/common/pin_check_screen.dart` and `lib/screens/settings/pin_setting_screen.dart` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `c6993c66` fix(reset): 비밀번호 분실 - 앱 초기화 버그 수정; `5167141f` refactor: 암호화 관련 deprecated 로직 제거; `8b0894c3` fix(design): 6자리 입력 시 UI 수정 remove unused imports remove deprecated m… — run `git show` on any of them.
  • Change coupling: balance_sync_service.dart ↔ subscription_service.dart lib/providers/node_provider/balance_sync_service.dart:1 — `lib/providers/node_provider/balance_sync_service.dart` and `lib/providers/node_provider/subscription/subscription_service.dart` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `bf4eab6d` fix(wallet): UTXO 정리 후 잔액과 거래내역 동기화 안정화; `b71da3e5` fix(stale-balance): fixed the mismatch between the balance and UTXOs; `fc2af1aa` refactor(): 파일 위치 수정 — run `git show` on any of them.
  • Change coupling: trezor_sign_view_model.dart ↔ trezor_ble_connect_view_model.dart lib/providers/view_model/send/connected/trezor_sign_view_model.dart:1 — `lib/providers/view_model/send/connected/trezor_sign_view_model.dart` and `lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `7f5494f4` feat(Trezor): UI 개선, 지갑 미스매치 시 다른 트레저와 연결하기 버튼 노출; `0966c538` feat(Trezor): 가이드, TrezorDevice 연결 해제 함수와 호출처 개선, PairingCode/Matrix…; `f8686ce0` feat(Trezor): 패스프레이즈 ON한 트레저의 지갑 추가/서명 — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×7
  • Edited copy of a member (10 corresponding lines) lib/providers/view_model/wallet_detail/wallet_appearance_view_model.dart:96 — lib/providers/view_model/wallet_detail/wallet_appearance_view_model.dart:96-105 | lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:141-152 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:546 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:546-559 | lib/screens/send/send_confirm_screen.dart:745-754 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) ios/Runner/Bitbox02MethodHandler.swift:10 — ios/Runner/Bitbox02MethodHandler.swift:10-19 | ios/Runner/TrezorMethodHandler.swift:29-38 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) lib/screens/settings/tools/p2p_calculator_screen.dart:315 — lib/screens/settings/tools/p2p_calculator_screen.dart:315-324 | lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:263-272 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) lib/screens/home/wallet_balance_history_screen.dart:849 — lib/screens/home/wallet_balance_history_screen.dart:849-859 | lib/widgets/features/home/add_wallet_hint.dart:107-116 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) lib/screens/wallet_detail/utxo_overview/utxo_summary_chart.dart:227 — lib/screens/wallet_detail/utxo_overview/utxo_summary_chart.dart:227-236 | lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:272-281 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) lib/screens/wallet_detail/wallet_info/hot_wallet_passphrase_check_screen.dart:55 — lib/screens/wallet_detail/wallet_info/hot_wallet_passphrase_check_screen.dart:55-64 | lib/screens/wallet_detail/wallet_info/mnemonic_backup_confirm_screen.dart:141-151 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×7
  • Duplicated block (17 lines × 2) lib/screens/common/tag_select_bottom_sheet.dart:115 — lib/screens/common/tag_select_bottom_sheet.dart:115-131 | lib/screens/common/tag_select_bottom_sheet.dart:143-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/common/tag_select_bottom_sheet.dart:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:521 — lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:521-537 | lib/screens/send/air-gapped/signed_psbt_scanner_screen.dart:229-245 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:521` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:126 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:126-142 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:141-157 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:968 — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:968-984 | lib/screens/wallet_detail/wallet_detail_screen.dart:836-852 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:968` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:802 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:802-818 | lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:821-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:802` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:633 — lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:633-649 | lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:1059-1075 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:633` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) lib/screens/wallet_detail/utxo_split_screen.dart:1748 — lib/screens/wallet_detail/utxo_split_screen.dart:1748-1764 | lib/screens/wallet_detail/utxo_split_screen.dart:1806-1822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_split_screen.dart:1748` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×6
  • Edited copy of a member (11 corresponding lines) lib/utils/logger.dart:41 — lib/utils/logger.dart:41-51 | lib/widgets/features/wallet/card/wallet_info_item_card.dart:138-151 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:272 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:272-282 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:284-294 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:431 — lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:431-441 | lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:459-469 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) lib/screens/wallet_detail/transaction_list_screen.dart:618 — lib/screens/wallet_detail/transaction_list_screen.dart:618-628 | lib/screens/wallet_detail/utxo_overview/utxo_list.dart:125-139 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:527 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:527-537 | lib/screens/wallet_detail/wallet_info/mnemonic_backup_complete_screen.dart:133-143 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) lib/screens/wallet_detail/utxo_split_screen.dart:1515 — lib/screens/wallet_detail/utxo_split_screen.dart:1515-1526 | lib/screens/wallet_detail/utxo_split_screen.dart:1528-1538 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×6
  • Edited copy of a member (13 corresponding lines) lib/screens/home/wallet_add/hot_wallet/hot_wallet_app_lock_guide_screen.dart:52 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_app_lock_guide_screen.dart:52-64 | lib/widgets/features/qr/input_and_share_overlay.dart:105-123 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) lib/screens/wallet_detail/wallet_detail_screen.dart:568 — lib/screens/wallet_detail/wallet_detail_screen.dart:568-580 | lib/widgets/features/qr/input_and_share_overlay.dart:84-103 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) lib/providers/utxo_tag_provider.dart:18 — lib/providers/utxo_tag_provider.dart:18-32 | lib/providers/utxo_tag_provider.dart:85-97 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02UsbManager.kt:124 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02UsbManager.kt:124-136 | android/app/src/main/kotlin/onl/coconut/wallet/TrezorUsbManager.kt:112-124 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:230 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:230-243 | lib/screens/home/widget_configure_sheet.dart:197-209 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) lib/providers/wallet_provider.dart:352 — lib/providers/wallet_provider.dart:352-364 | lib/providers/wallet_provider.dart:366-378 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×6
  • Edited copy of a member (15 corresponding lines) lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:47 — lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:47-61 | lib/screens/wallet_detail/wallet_info/trezor_section.dart:47-62 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) lib/providers/transaction_provider.dart:17 — lib/providers/transaction_provider.dart:17-31 | lib/providers/transaction_provider.dart:33-47 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) lib/screens/wallet_detail/transaction_detail_screen.dart:179 — lib/screens/wallet_detail/transaction_detail_screen.dart:179-193 | lib/screens/wallet_detail/transaction_list_screen.dart:132-149 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) lib/services/web_socket_service.dart:230 — lib/services/web_socket_service.dart:230-244 | lib/services/web_socket_service.dart:256-270 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) lib/model/wallet/multisig_wallet_item.dart:10 — lib/model/wallet/multisig_wallet_item.dart:10-24 | lib/model/wallet/taproot_wallet_item.dart:8-22 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:257 — lib/providers/view_model/send/connected/bitbox02_sign_viewmodel.dart:257-271 | lib/providers/view_model/send/connected/trezor_sign_view_model.dart:232-247 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×6
  • Duplicated block (16 lines × 2) lib/screens/home/all_features_screen.dart:268 — lib/screens/home/all_features_screen.dart:268-283 | lib/screens/home/all_features_screen.dart:313-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/all_features_screen.dart:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:306 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:306-321 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:347-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) lib/screens/send/send_confirm_screen.dart:336 — lib/screens/send/send_confirm_screen.dart:336-351 | lib/screens/send/send_screen.dart:1067-1082 — before extracting anything, compare `lib/screens/send/send_confirm_screen.dart` and `lib/screens/send/send_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_confirm_screen.dart:336` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) REDACTED:142 — REDACTED:142-157 | lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:137-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) lib/utils/seed_qr_decoder.dart:117 — lib/utils/seed_qr_decoder.dart:117-132 | lib/utils/seed_qr_decoder.dart:146-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/utils/seed_qr_decoder.dart:117` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) lib/widgets/features/wallet/card/wallet_item_card.dart:166 — lib/widgets/features/wallet/card/wallet_item_card.dart:166-181 | lib/widgets/features/wallet/card/wallet_item_card.dart:205-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/wallet/card/wallet_item_card.dart:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) lib/screens/ccos/coconut_open_store_idea_scene.dart:65 — lib/screens/ccos/coconut_open_store_idea_scene.dart:65-79 | lib/screens/ccos/coconut_open_store_idea_scene.dart:81-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_idea_scene.dart:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:105 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:105-119 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:124-138 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:123` calls `debugPrint` and `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:104` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) lib/screens/send/send_confirm_screen.dart:548 — lib/screens/send/send_confirm_screen.dart:548-562 | lib/screens/send/send_screen.dart:1018-1032 — before extracting anything, compare `lib/screens/send/send_confirm_screen.dart` and `lib/screens/send/send_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_confirm_screen.dart:548` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) lib/screens/settings/tools/bip329/label_export_screen.dart:404 — lib/screens/settings/tools/bip329/label_export_screen.dart:404-418 | lib/screens/settings/tools/bip329/label_import_screen.dart:264-278 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_export_screen.dart` and `lib/screens/settings/tools/bip329/label_import_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/bip329/label_export_screen.dart:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:45 — lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:45-59 | lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:96-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:996 — lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:996-1010 | lib/screens/wallet_detail/wallet_resync/wallet_resync_screen.dart:206-220 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:996` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×5
  • Edited copy of a member (20 corresponding lines) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:296 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:296-315 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:334-354 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) lib/screens/home/wallet_stack_list_screen.dart:159 — lib/screens/home/wallet_stack_list_screen.dart:159-179 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:99-118 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) lib/screens/send/connected/bitbox02_sign_screen.dart:53 — lib/screens/send/connected/bitbox02_sign_screen.dart:53-72 | lib/screens/send/connected/trezor_sign_screen.dart:57-77 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:996 — lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:996-1015 | lib/screens/wallet_detail/wallet_resync/wallet_resync_screen.dart:206-225 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) ios/Runner/DeviceDekKeystore.swift:8 — ios/Runner/DeviceDekKeystore.swift:8-35 | ios/Runner/DeviceDekKeystore.swift:37-56 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×5
  • Edited copy of a member (19 corresponding lines) lib/widgets/features/home/widgets/balance_widget_views.dart:30 — lib/widgets/features/home/widgets/balance_widget_views.dart:30-48 | lib/widgets/features/home/widgets/balance_widget_views.dart:71-94 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:328 — lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:328-346 | lib/providers/view_model/wallet_detail/wallet_detail_view_model.dart:183-204 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) lib/screens/settings/tools/bip329/label_export_screen.dart:590 — lib/screens/settings/tools/bip329/label_export_screen.dart:590-608 | lib/screens/settings/tools/bip329/label_import_screen.dart:647-665 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:103 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:103-124 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:121-139 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:214 — lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:214-232 | lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:306-325 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×5
  • Edited copy of a member (7 corresponding lines) lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:247 — lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:247-253 | lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:380-386 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) lib/firebase_options.dart:51 — lib/firebase_options.dart:51-57 | lib/firebase_options.dart:59-66 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:728 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:728-734 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:338-344 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) lib/widgets/common/bottom_sheet/selectable_list_bottom_sheet.dart:48 — lib/widgets/common/bottom_sheet/selectable_list_bottom_sheet.dart:48-56 | lib/widgets/common/overlays/common_bottom_sheets.dart:704-710 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:300 — lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:300-307 | lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:55-61 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×5
  • Edited copy of a member (9 corresponding lines) lib/utils/amimation_util.dart:4 — lib/utils/amimation_util.dart:4-12 | lib/utils/amimation_util.dart:14-22 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) lib/widgets/common/buttons/shrink_animation_button.dart:51 — lib/widgets/common/buttons/shrink_animation_button.dart:51-59 | lib/widgets/features/transaction/card/transaction_draft_card.dart:57-66 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) lib/screens/ccos/coconut_open_store_build_scene.dart:250 — lib/screens/ccos/coconut_open_store_build_scene.dart:250-260 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:1413-1421 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) ios/Runner/BluetoothTransport.swift:131 — ios/Runner/BluetoothTransport.swift:131-139 | ios/Runner/TrezorMethodHandler.swift:580-590 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:399 — lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:399-407 | lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:359-368 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×5
  • Duplicated block (18 lines × 2) lib/core/transaction/transaction_builder.dart:321 — lib/core/transaction/transaction_builder.dart:321-338 | lib/core/transaction/transaction_builder.dart:431-448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/core/transaction/transaction_builder.dart:321` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) lib/screens/settings/app_settings/network/electrum_server_screen.dart:567 — lib/screens/settings/app_settings/network/electrum_server_screen.dart:567-584 | lib/screens/settings/app_settings/network/electrum_server_screen.dart:645-662 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/app_settings/network/electrum_server_screen.dart:567` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) lib/screens/wallet_detail/transaction_list_screen.dart:567 — lib/screens/wallet_detail/transaction_list_screen.dart:567-584 | lib/screens/wallet_detail/transaction_list_screen.dart:597-614 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/transaction_list_screen.dart:567` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:92 — lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:92-109 | lib/screens/wallet_detail/wallet_info/trezor_section.dart:93-110 — before extracting anything, compare `lib/screens/wallet_detail/wallet_info/bitbox02_section.dart` and `lib/screens/wallet_detail/wallet_info/trezor_section.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) rust/trezor-bridge/src/lib.rs:305 — rust/trezor-bridge/src/lib.rs:305-322 | rust/trezor-bridge/src/lib.rs:349-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) lib/screens/send/send_confirm_screen.dart:142 — lib/screens/send/send_confirm_screen.dart:142-154 | lib/screens/send/send_screen.dart:1198-1210 — before extracting anything, compare `lib/screens/send/send_confirm_screen.dart` and `lib/screens/send/send_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_confirm_screen.dart:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) lib/screens/send/send_screen.dart:1428 — lib/screens/send/send_screen.dart:1428-1440 | lib/widgets/features/utxo/bottom_sheet/estimated_fee_bottom_sheet.dart:264-276 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_screen.dart:1428` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:38 — lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:38-50 | lib/screens/wallet_detail/wallet_backup_data_screen.dart:41-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) lib/screens/wallet_detail/transaction_detail_screen.dart:287 — lib/screens/wallet_detail/transaction_detail_screen.dart:287-299 | lib/screens/wallet_detail/transaction_detail_screen.dart:369-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/transaction_detail_screen.dart:287` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) rust/trezor-bridge/src/lib.rs:270 — rust/trezor-bridge/src/lib.rs:270-282 | rust/trezor-bridge/src/lib.rs:415-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X1 · Async correctness · Blocking `thread · ×5
  • Blocking `thread::sleep` inside an `async` body rust/trezor-connect-rs/src/transport/callback.rs:782 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
  • Blocking `thread::sleep` inside an `async` body rust/trezor-connect-rs/src/transport/callback.rs:903 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
  • Blocking `thread::sleep` inside an `async` body rust/trezor-connect-rs/src/transport/callback.rs:1060 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
  • Blocking `thread::sleep` inside an `async` body rust/trezor-connect-rs/src/transport/callback.rs:1127 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
  • Blocking `thread::sleep` inside an `async` body rust/trezor-connect-rs/src/transport/callback.rs:1707 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
X18 · Disposal-pattern correctness · Lock guard kept alive across a wait · ×5
  • Lock guard kept alive across a wait rust/trezor-bridge/src/lib.rs:710 — `sessions` (line 710) is a synchronous lock guard, and it is still alive at the `.await` on line 729: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`.
  • Lock guard kept alive across a wait rust/trezor-bridge/src/lib.rs:739 — `sessions` (line 739) is a synchronous lock guard, and it is still alive at the `.await` on line 754: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`.
  • Lock guard kept alive across a wait rust/trezor-bridge/src/lib.rs:835 — `sessions` (line 835) is a synchronous lock guard, and it is still alive at the `.await` on line 855: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`.
  • Lock guard kept alive across a wait rust/trezor-bridge/src/lib.rs:888 — `sessions` (line 888) is a synchronous lock guard, and it is still alive at the `.await` on line 902: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`.
  • Lock guard kept alive across a wait rust/trezor-bridge/src/lib.rs:921 — `sessions` (line 921) is a synchronous lock guard, and it is still alive at the `.await` on line 928: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(sessions);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`.
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: isolate_state_manager.dart → node_provider.dart, node_state_manager.dart, script_sync_service.dart lib/providers/node_provider/state/isolate_state_manager.dart — `lib/providers/node_provider/state/isolate_state_manager.dart` changes together with 3 other files — `lib/providers/node_provider/node_provider.dart`, `lib/providers/node_provider/state/node_state_manager.dart`, `lib/providers/node_provider/subscription/script_sync_service.dart` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: isolate_controller.dart → isolate_manager.dart, node_provider.dart, script_sync_service.dart lib/providers/node_provider/isolate/isolate_controller.dart — `lib/providers/node_provider/isolate/isolate_controller.dart` changes together with 3 other files — `lib/providers/node_provider/isolate/isolate_manager.dart`, `lib/providers/node_provider/node_provider.dart`, `lib/providers/node_provider/subscription/script_sync_service.dart` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: bitbox02_connect_screen.dart → trezor_ble_connect_screen.dart, trezor_usb_connect_screen.dart, bitbox02_sign_screen.dart lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart — `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart` changes together with 3 other files — `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart`, `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart`, `lib/screens/send/connected/bitbox02_sign_screen.dart` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: trezor_sign_screen.dart → trezor_ble_connect_screen.dart, bitbox02_sign_screen.dart, send_confirm_screen.dart lib/screens/send/connected/trezor_sign_screen.dart — `lib/screens/send/connected/trezor_sign_screen.dart` changes together with 3 other files — `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart`, `lib/screens/send/connected/bitbox02_sign_screen.dart`, `lib/screens/send/send_confirm_screen.dart` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×4
  • Edited copy of a member (36 corresponding lines) lib/screens/send/send_confirm_screen.dart:316 — lib/screens/send/send_confirm_screen.dart:316-351 | lib/screens/send/send_screen.dart:1047-1082 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) lib/screens/home/all_features_screen.dart:260 — lib/screens/home/all_features_screen.dart:260-295 | lib/screens/home/home_edit_screen.dart:445-483 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) lib/screens/wallet_detail/transaction_detail_screen.dart:691 — lib/screens/wallet_detail/transaction_detail_screen.dart:691-728 | lib/screens/wallet_detail/utxo_detail_screen.dart:464-499 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) lib/repository/realm/transaction_draft_repository.dart:17 — lib/repository/realm/transaction_draft_repository.dart:17-52 | lib/repository/realm/transaction_draft_repository.dart:97-132 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×4
  • Edited copy of a member (23 corresponding lines) lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:315 — lib/providers/view_model/wallet_detail/transaction_list_view_model.dart:315-337 | lib/providers/view_model/wallet_detail/wallet_detail_view_model.dart:148-171 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) ios/Runner/TrezorMethodHandler.swift:601 — ios/Runner/TrezorMethodHandler.swift:601-623 | ios/Runner/TrezorMethodHandler.swift:625-659 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) lib/widgets/features/wallet/trezor/trezor_connect_shared_widgets.dart:147 — lib/widgets/features/wallet/trezor/trezor_connect_shared_widgets.dart:147-172 | lib/widgets/features/wallet/trezor/trezor_connect_shared_widgets.dart:182-204 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) lib/widgets/features/transaction/card/transaction_draft_card.dart:84 — lib/widgets/features/transaction/card/transaction_draft_card.dart:84-106 | lib/widgets/features/transaction/card/transaction_draft_card.dart:108-135 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×4
  • Edited copy of a member (16 corresponding lines) lib/providers/node_provider/transaction/mempool_api_service.dart:27 — lib/providers/node_provider/transaction/mempool_api_service.dart:27-42 | lib/providers/node_provider/transaction/mempool_api_service.dart:44-59 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) lib/widgets/features/transaction/card/transaction_input_output_card.dart:391 — lib/widgets/features/transaction/card/transaction_input_output_card.dart:391-406 | lib/widgets/features/transaction/card/transaction_input_output_card.dart:408-423 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) lib/screens/send/send_screen.dart:466 — lib/screens/send/send_screen.dart:466-486 | lib/screens/send/send_screen.dart:2910-2925 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) lib/screens/send/broadcasting_screen.dart:504 — lib/screens/send/broadcasting_screen.dart:504-519 | lib/screens/wallet_detail/transaction_detail_screen.dart:1016-1032 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) lib/widgets/features/wallet/icon/wallet_icon.dart:91 — lib/widgets/features/wallet/icon/wallet_icon.dart:91-110 | lib/widgets/features/wallet/icon/wallet_icon_small.dart:110-126 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) lib/providers/utxo_tag_provider.dart:99 — lib/providers/utxo_tag_provider.dart:99-127 | lib/providers/utxo_tag_provider.dart:129-145 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) lib/providers/node_provider/state/isolate_state_manager.dart:107 — lib/providers/node_provider/state/isolate_state_manager.dart:107-123 | lib/providers/node_provider/state/isolate_state_manager.dart:125-144 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) lib/providers/view_model/wallet_detail/fee_bumping_view_model.dart:378 — lib/providers/view_model/wallet_detail/fee_bumping_view_model.dart:378-394 | lib/providers/view_model/wallet_detail/fee_bumping_view_model.dart:396-412 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×4
  • Edited copy of a member (14 corresponding lines) lib/screens/send/connected/bitbox02_sign_screen.dart:134 — lib/screens/send/connected/bitbox02_sign_screen.dart:134-147 | lib/screens/send/connected/trezor_sign_screen.dart:151-164 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) lib/screens/wallet_detail/transaction_detail_screen.dart:556 — lib/screens/wallet_detail/transaction_detail_screen.dart:556-569 | lib/screens/wallet_detail/utxo_detail_screen.dart:449-462 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) lib/ui/coconut/coconut_overlays.dart:554 — lib/ui/coconut/coconut_overlays.dart:554-567 | lib/ui/coconut/coconut_overlays.dart:569-582 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:166 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:166-179 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:86-99 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:142 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:142-147 | lib/screens/wallet_detail/utxo_split_screen.dart:134-139 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) lib/widgets/features/home/wallet_onboarding_view.dart:38 — lib/widgets/features/home/wallet_onboarding_view.dart:38-43 | lib/widgets/features/wallet/add/wallet_add_options.dart:29-34 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) lib/screens/home/hodl_insights_screen.dart:717 — lib/screens/home/hodl_insights_screen.dart:717-722 | lib/screens/home/home_screen.dart:136-141 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) lib/providers/node_provider/isolate/isolate_manager.dart:527 — lib/providers/node_provider/isolate/isolate_manager.dart:527-532 | lib/providers/node_provider/node_provider.dart:612-617 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×4
  • Sync-over-async blocking lib/services/label_file_service.dart:15 — `getImportableLabelFiles` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking rust/trezor-connect-rs/src/transport/callback.rs:751 — `perform_thp_handshake` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking rust/trezor-connect-rs/src/transport/callback.rs:927 — `perform_thp_handshake_inner` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking rust/trezor-connect-rs/src/transport/callback.rs:1580 — `perform_pairing` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×3
  • Edited copy of a member (39 corresponding lines) lib/screens/home/wallet_stack_list_screen.dart:181 — lib/screens/home/wallet_stack_list_screen.dart:181-219 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:120-158 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) lib/screens/ccos/coconut_open_store_intro_screen.dart:832 — lib/screens/ccos/coconut_open_store_intro_screen.dart:832-870 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1580-1635 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) lib/screens/settings/tools/bip329/label_export_screen.dart:252 — lib/screens/settings/tools/bip329/label_export_screen.dart:252-290 | lib/screens/settings/tools/bip329/label_export_screen.dart:292-334 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×3
  • Edited copy of a member (32 corresponding lines) rust/trezor-bridge/src/lib.rs:95 — rust/trezor-bridge/src/lib.rs:95-130 | rust/trezor-bridge/src/lib.rs:153-184 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:275 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:275-306 | lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:308-345 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) lib/screens/wallet_detail/utxo_split_screen.dart:823 — lib/screens/wallet_detail/utxo_split_screen.dart:823-854 | lib/screens/wallet_detail/utxo_split_screen.dart:856-889 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×3
  • Edited copy of a member (24 corresponding lines) lib/screens/ccos/coconut_open_store_first_pow_scene.dart:654 — lib/screens/ccos/coconut_open_store_first_pow_scene.dart:654-680 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:1273-1296 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) lib/screens/settings/tools/bip329/label_import_screen.dart:577 — lib/screens/settings/tools/bip329/label_import_screen.dart:577-600 | lib/utils/dashed_border_painter.dart:13-36 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) lib/widgets/common/buttons/positioned_card_close_button.dart:26 — lib/widgets/common/buttons/positioned_card_close_button.dart:26-49 | lib/widgets/common/buttons/positioned_card_close_button.dart:72-95 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 16+ corresponding lines) lib/services/hardware_wallet/bitbox02_device.dart:168 — lib/services/hardware_wallet/bitbox02_device.dart:168-194 | lib/services/hardware_wallet/bitbox02_device.dart:196-222 | lib/services/hardware_wallet/trezor_device.dart:212-227 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:291 — lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:291-306 | lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:282-298 | lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:264-279 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) lib/screens/settings/tools/bip329/label_export_screen.dart:452 — lib/screens/settings/tools/bip329/label_export_screen.dart:452-467 | lib/screens/settings/tools/bip329/label_import_screen.dart:452-468 | lib/screens/settings/tools/bip329/label_import_screen.dart:470-486 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×3
  • Edited copy of a member (18 corresponding lines) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:518 — lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:518-537 | lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:203-220 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) lib/screens/home/wallet_add/hot_wallet/widgets/mnemonic_input_section.dart:19 — lib/screens/home/wallet_add/hot_wallet/widgets/mnemonic_input_section.dart:19-41 | lib/screens/home/wallet_add/hot_wallet/widgets/seed_qr_input_section.dart:23-40 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) lib/widgets/features/wallet/taproot/taproot_setup_summary_card.dart:131 — lib/widgets/features/wallet/taproot/taproot_setup_summary_card.dart:131-154 | lib/widgets/features/wallet/taproot/taproot_setup_summary_card.dart:203-220 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) lib/screens/settings/app_settings/about/app_info_screen.dart:504 — lib/screens/settings/app_settings/about/app_info_screen.dart:504-507 | lib/screens/settings/app_settings/app_settings_screen.dart:511-514 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) lib/screens/ccos/coconut_open_store_contribute_screen.dart:48 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:48-51 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:166-169 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) lib/model/wallet/hot_wallet_secret.dart:93 — lib/model/wallet/hot_wallet_secret.dart:93-96 | lib/providers/view_model/wallet_add/hot_wallet_create_view_model.dart:54-57 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×3
  • Edited copy of a member (8 corresponding lines) lib/providers/view_model/utility/p2p_calculator_view_model.dart:304 — lib/providers/view_model/utility/p2p_calculator_view_model.dart:304-311 | lib/utils/fee_rate_mixin.dart:85-92 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:833 — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:833-840 | lib/screens/wallet_detail/wallet_detail_screen.dart:733-745 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) lib/screens/home/wallet_stack_list_screen.dart:229 — lib/screens/home/wallet_stack_list_screen.dart:229-236 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:169-177 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) lib/screens/home/all_features_screen.dart:116 — lib/screens/home/all_features_screen.dart:116-140 | lib/screens/home/home_edit_screen.dart:125-149 — before extracting anything, compare `lib/screens/home/all_features_screen.dart` and `lib/screens/home/home_edit_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/all_features_screen.dart:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) lib/screens/home/wallet_stack_list_screen.dart:181 — lib/screens/home/wallet_stack_list_screen.dart:181-205 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:120-144 — before extracting anything, compare `lib/screens/home/wallet_stack_list_screen.dart` and `lib/widgets/features/wallet/card/wallet_carousel_indicator.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_stack_list_screen.dart:181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) lib/screens/send/connected/bitbox02_sign_screen.dart:154 — lib/screens/send/connected/bitbox02_sign_screen.dart:154-178 | lib/screens/send/connected/trezor_sign_screen.dart:171-195 — before extracting anything, compare `lib/screens/send/connected/bitbox02_sign_screen.dart` and `lib/screens/send/connected/trezor_sign_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/connected/bitbox02_sign_screen.dart:154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:309 — lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:309-322 | lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:381-394 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) lib/screens/send/send_confirm_screen.dart:471 — lib/screens/send/send_confirm_screen.dart:471-484 | lib/screens/send/send_screen.dart:944-957 — before extracting anything, compare `lib/screens/send/send_confirm_screen.dart` and `lib/screens/send/send_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_confirm_screen.dart:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) lib/screens/send/send_confirm_screen.dart:507 — lib/screens/send/send_confirm_screen.dart:507-520 | lib/screens/send/send_screen.dart:981-994 — before extracting anything, compare `lib/screens/send/send_confirm_screen.dart` and `lib/screens/send/send_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/send_confirm_screen.dart:507` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/screens/send/send_screen.dart:979` calls `_enterHotWalletSigningStage` and `lib/screens/send/send_confirm_screen.dart:506` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:20 — lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:20-61 | lib/screens/wallet_detail/wallet_backup_data_screen.dart:20-64 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:661 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:661-713 | lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:715-756 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×2
  • Edited copy of a member (47 corresponding lines) lib/screens/send/send_screen.dart:1300 — lib/screens/send/send_screen.dart:1300-1348 | lib/widgets/features/utxo/bottom_sheet/estimated_fee_bottom_sheet.dart:297-343 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) lib/screens/wallet_detail/utxo_detail_screen.dart:501 — lib/screens/wallet_detail/utxo_detail_screen.dart:501-547 | lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:894-948 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) lib/screens/ccos/coconut_open_store_contribute_screen.dart:163 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:163-202 | lib/screens/ccos/coconut_open_store_idea_scene.dart:146-178 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) lib/screens/home/wallet_add/connected/trezor_transport_select_screen.dart:148 — lib/screens/home/wallet_add/connected/trezor_transport_select_screen.dart:148-180 | lib/screens/home/wallet_add/wallet_add_dialog.dart:422-467 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:392 — lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:392-416 | lib/providers/view_model/wallet_detail/utxo_detail_view_model.dart:134-158 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) lib/screens/wallet_detail/utxo_tag_crud_screen.dart:143 — lib/screens/wallet_detail/utxo_tag_crud_screen.dart:143-167 | lib/screens/wallet_detail/utxo_tag_crud_screen.dart:169-197 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) lib/screens/send/broadcasting_screen.dart:791 — lib/screens/send/broadcasting_screen.dart:791-812 | lib/screens/send/send_confirm_screen.dart:688-714 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) lib/screens/settings/app_settings/network/electrum_server_screen.dart:780 — lib/screens/settings/app_settings/network/electrum_server_screen.dart:780-809 | lib/screens/wallet_detail/wallet_resync/wallet_resync_screen.dart:558-579 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) lib/screens/wallet_detail/transaction_list_screen.dart:562 — lib/screens/wallet_detail/transaction_list_screen.dart:562-588 | lib/screens/wallet_detail/transaction_list_screen.dart:590-616 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) lib/services/security/hot_wallet_signing_service.dart:43 — lib/services/security/hot_wallet_signing_service.dart:43-71 | lib/services/security/hot_wallet_signing_service.dart:73-99 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) lib/screens/send/send_confirm_screen.dart:621 — lib/screens/send/send_confirm_screen.dart:621-641 | lib/screens/send/send_confirm_screen.dart:659-680 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) lib/services/hardware_wallet/bitbox02_device.dart:234 — lib/services/hardware_wallet/bitbox02_device.dart:234-254 | lib/services/hardware_wallet/bitbox02_device.dart:262-283 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 9+ corresponding lines) lib/repository/shared_preference/shared_prefs_repository.dart:196 — lib/repository/shared_preference/shared_prefs_repository.dart:196-206 | lib/repository/shared_preference/shared_prefs_repository.dart:208-216 | lib/repository/shared_preference/shared_prefs_repository.dart:263-273 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) lib/services/electrum_service.dart:166 — lib/services/electrum_service.dart:166-174 | lib/services/electrum_service.dart:314-328 | lib/services/electrum_service.dart:330-340 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) lib/core/transaction/fee_bumping/cpfp_builder.dart:40 — lib/core/transaction/fee_bumping/cpfp_builder.dart:40-44 | lib/core/transaction/fee_bumping/rbf_builder.dart:36-40 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) lib/screens/settings/tools/transaction_draft_screen.dart:109 — lib/screens/settings/tools/transaction_draft_screen.dart:109-113 | lib/screens/wallet_detail/address_list_screen.dart:227-233 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×2
  • Edited copy of a member (3 corresponding lines) lib/providers/view_model/send/utxo_selection_view_model.dart:208 — lib/providers/view_model/send/utxo_selection_view_model.dart:208-210 | lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:151-153 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:485 — lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:485-488 | lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:941-943 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) lib/screens/send/connected/bitbox02_sign_screen.dart:340 — lib/screens/send/connected/bitbox02_sign_screen.dart:340-361 | lib/screens/send/connected/trezor_sign_screen.dart:359-381 — before extracting anything, compare `lib/screens/send/connected/bitbox02_sign_screen.dart` and `lib/screens/send/connected/trezor_sign_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/connected/bitbox02_sign_screen.dart:340` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `BitBox02SignViewModel` in one and `TrezorSignViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (22–23 lines × 2) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:285 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:285-306 | lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:323-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_components.dart:285` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) lib/services/hardware_wallet/bitbox02_device.dart:172 — lib/services/hardware_wallet/bitbox02_device.dart:172-194 | lib/services/hardware_wallet/bitbox02_device.dart:200-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/services/hardware_wallet/bitbox02_device.dart:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:470 — lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:470-492 | lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:523-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:470` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:271 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:271-292 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:220-241 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:69 — lib/screens/wallet_detail/wallet_info/bitbox02_section.dart:69-90 | lib/screens/wallet_detail/wallet_info/trezor_section.dart:70-91 — before extracting anything, compare `lib/screens/wallet_detail/wallet_info/bitbox02_section.dart` and `lib/screens/wallet_detail/wallet_info/trezor_section.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) lib/repository/realm/utxo_repository.dart:520 — lib/repository/realm/utxo_repository.dart:520-540 | lib/repository/realm/utxo_repository.dart:543-563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/repository/realm/utxo_repository.dart:520` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) lib/screens/settings/tools/bip329/label_export_screen.dart:253 — lib/screens/settings/tools/bip329/label_export_screen.dart:253-273 | lib/screens/settings/tools/bip329/label_export_screen.dart:297-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/bip329/label_export_screen.dart:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:83 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:83-101 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:101-119 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:123` calls `debugPrint` and `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:105` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) lib/screens/send/broadcasting_complete_screen.dart:226 — lib/screens/send/broadcasting_complete_screen.dart:226-244 | lib/screens/send/broadcasting_complete_screen.dart:265-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/broadcasting_complete_screen.dart:226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) lib/screens/ccos/coconut_open_store_contribute_screen.dart:165 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:165-180 | lib/screens/ccos/coconut_open_store_idea_scene.dart:148-164 — before extracting anything, compare `lib/screens/ccos/coconut_open_store_contribute_screen.dart` and `lib/screens/ccos/coconut_open_store_idea_scene.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_contribute_screen.dart:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–17 lines × 2) lib/screens/settings/app_settings/about/app_info_screen.dart:183 — lib/screens/settings/app_settings/about/app_info_screen.dart:183-199 | lib/screens/settings/app_settings/about/app_info_screen.dart:443-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/app_settings/about/app_info_screen.dart:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×2
  • Duplicated block (13–15 lines × 2) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:926 — lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:926-940 | lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:969-981 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:926` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–15 lines × 2) lib/widgets/features/wallet/card/wallet_item_card.dart:288 — lib/widgets/features/wallet/card/wallet_item_card.dart:288-302 | lib/widgets/features/wallet/card/wallet_item_card.dart:379-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/wallet/card/wallet_item_card.dart:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×2
  • Duplicated block (14 lines × 3) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:269 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:269-282 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:310-323 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:351-364 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:269` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) go/bridge.go:250 — go/bridge.go:250-263 | go/bridge.go:282-295 | go/bridge.go:405-418 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:153 — lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:153-164 | lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:186-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11–12 lines × 2) lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:25 — lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:25-35 | lib/screens/wallet_detail/wallet_backup_data_screen.dart:25-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/taproot_wallet_backup_data_screen.dart:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) lib/screens/ccos/coconut_open_store_intro_screen.dart:1596 — lib/screens/ccos/coconut_open_store_intro_screen.dart:1596-1606 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1609-1619 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1622-1632 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_intro_screen.dart:1596` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) lib/screens/home/all_features_screen.dart:268 — lib/screens/home/all_features_screen.dart:268-278 | lib/screens/home/all_features_screen.dart:313-323 | lib/screens/home/home_edit_screen.dart:455-465 — before extracting anything, compare `lib/screens/home/all_features_screen.dart` and `lib/screens/home/home_edit_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/all_features_screen.dart:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:492 — lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:492-501 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:530-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:492` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–11 lines × 2) lib/widgets/features/home/add_wallet_hint.dart:84 — lib/widgets/features/home/add_wallet_hint.dart:84-94 | lib/widgets/features/home/all_features_hint.dart:127-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/home/add_wallet_hint.dart:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) lib/screens/ccos/coconut_open_store_contribute_screen.dart:163 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:163-171 | lib/screens/ccos/coconut_open_store_idea_scene.dart:146-154 | lib/screens/ccos/coconut_open_store_idea_scene.dart:255-263 — before extracting anything, compare `lib/screens/ccos/coconut_open_store_contribute_screen.dart` and `lib/screens/ccos/coconut_open_store_idea_scene.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_contribute_screen.dart:163` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) lib/screens/ccos/coconut_open_store_intro_screen.dart:840 — lib/screens/ccos/coconut_open_store_intro_screen.dart:840-848 | lib/screens/ccos/coconut_open_store_intro_screen.dart:850-858 | lib/screens/ccos/coconut_open_store_intro_screen.dart:859-867 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_intro_screen.dart:840` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/screens/ccos/coconut_open_store_intro_screen.dart:850` calls `Container` and `lib/screens/ccos/coconut_open_store_intro_screen.dart:859` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:306 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:306-311 | lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:539-544 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:463-468 — before extracting anything, compare `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `BitBox02ConnectViewModel` in one and `TrezorBleConnectViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:273 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:273-278 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:285-290 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:335-340 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:308 — lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:308-312 | lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:300-304 | lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:380-384 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:308` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) lib/screens/ccos/coconut_open_store_contribute_screen.dart:230 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:230-234 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:587-591 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1119-1123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×2
  • Recursive walk over a caller-supplied document has no depth cap lib/utils/type_converter_utils.dart:11 — `convertKeysToString` is public and takes `Map<dynamic, dynamic> map` from its caller, and it calls itself at line 11 (`convertKeysToString`) with a piece of `map` (and at line 16) — and nowhere in `convertKeysToString` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `convertKeysToString` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap lib/core/bip/129/multisig_normalizer.dart:425 — `signerBsmsFromUrResult` is public, takes a document from its caller (line 323) and hands it to `_convertKeysToString`, which calls itself at line 425 (`_convertKeysToString`) with a piece of `map` (and at line 430) — and nowhere in `_convertKeysToString` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `_convertKeysToString` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D1 · Cyclomatic Complexity · LongPressedMenuWidgetState.showMenu (cyclomatic 49) · ×1
  • LongPressedMenuWidgetState.showMenu (cyclomatic 49) lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307 — LongPressedMenuWidgetState.showMenu has cyclomatic complexity 49 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SeedQrDecoder._getUsefulBits (cyclomatic 46) · ×1
  • SeedQrDecoder._getUsefulBits (cyclomatic 46) lib/utils/seed_qr_decoder.dart:105 — SeedQrDecoder._getUsefulBits has cyclomatic complexity 46 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _BalanceHistoryWalletBreakdownState.build (cyclomatic 43) · ×1
  • _BalanceHistoryWalletBreakdownState.build (cyclomatic 43) lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart:116 — _BalanceHistoryWalletBreakdownState.build has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeItemsViewState._updatePreview (cyclomatic 41) · ×1
  • HomeItemsViewState._updatePreview (cyclomatic 41) lib/widgets/features/home/home_items_view.dart:285 — HomeItemsViewState._updatePreview has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _UtxoCoinCardState.build (cyclomatic 39) · ×1
  • _UtxoCoinCardState.build (cyclomatic 39) lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:471 — _UtxoCoinCardState.build has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CoconutTextFieldState.build (cyclomatic 35) · ×1
  • _CoconutTextFieldState.build (cyclomatic 35) lib/ui/coconut/coconut_text_field.dart:614 — _CoconutTextFieldState.build has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrezorMethodHandler.connectToDevice (cyclomatic 33) · ×1
  • TrezorMethodHandler.connectToDevice (cyclomatic 33) android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:435 — TrezorMethodHandler.connectToDevice has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _TrezorUsbConnectScreenState._buildPrimaryActionButton (cyclomatic 32) · ×1
  • _TrezorUsbConnectScreenState._buildPrimaryActionButton (cyclomatic 32) lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:472 — _TrezorUsbConnectScreenState._buildPrimaryActionButton has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · HomeItemsViewState.build (cyclomatic 30) · ×1
  • HomeItemsViewState.build (cyclomatic 30) lib/widgets/features/home/home_items_view.dart:423 — HomeItemsViewState.build has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NetworkService.getRecommendedFees (cyclomatic 29) · ×1
  • NetworkService.getRecommendedFees (cyclomatic 29) lib/providers/node_provider/network_service.dart:55 — NetworkService.getRecommendedFees has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppSettingsScreen._waitForSourceKeyboard (cyclomatic 29) · ×1
  • AppSettingsScreen._waitForSourceKeyboard (cyclomatic 29) lib/screens/settings/app_settings/app_settings_screen.dart:77 — AppSettingsScreen._waitForSourceKeyboard has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BroadcastingViewModel.setTxInfo (cyclomatic 28) · ×1
  • BroadcastingViewModel.setTxInfo (cyclomatic 28) lib/providers/view_model/send/broadcasting_view_model.dart:375 — BroadcastingViewModel.setTxInfo has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SendScreenState._buildRecipientPage (cyclomatic 28) · ×1
  • _SendScreenState._buildRecipientPage (cyclomatic 28) lib/screens/send/send_screen.dart:1967 — _SendScreenState._buildRecipientPage has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SendTransactionFlowCardState._buildOutputNodesDefault (cyclomatic 27) · ×1
  • _SendTransactionFlowCardState._buildOutputNodesDefault (cyclomatic 27) lib/widgets/features/send/send_transaction_flow_card.dart:442 — _SendTransactionFlowCardState._buildOutputNodesDefault has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InputOutputDetailRow.getRowProperty (cyclomatic 27) · ×1
  • InputOutputDetailRow.getRowProperty (cyclomatic 27) lib/widgets/features/transaction/row/input_output_detail_row.dart:143 — InputOutputDetailRow.getRowProperty has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WalletItemCard._buildWalletItemContent (cyclomatic 27) · ×1
  • WalletItemCard._buildWalletItemContent (cyclomatic 27) lib/widgets/features/wallet/card/wallet_item_card.dart:117 — WalletItemCard._buildWalletItemContent has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SendScreenState._startHotWalletSigning (cyclomatic 26) · ×1
  • _SendScreenState._startHotWalletSigning (cyclomatic 26) lib/screens/send/send_screen.dart:926 — _SendScreenState._startHotWalletSigning has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WalletBalanceHistoryScreenState._chart (cyclomatic 25) · ×1
  • _WalletBalanceHistoryScreenState._chart (cyclomatic 25) lib/screens/home/wallet_balance_history_screen.dart:330 — _WalletBalanceHistoryScreenState._chart has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _BroadcastingScreenState.build (cyclomatic 25) · ×1
  • _BroadcastingScreenState.build (cyclomatic 25) lib/screens/send/broadcasting_screen.dart:285 — _BroadcastingScreenState.build has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SendConfirmScreenState._signHotWallet (cyclomatic 25) · ×1
  • _SendConfirmScreenState._signHotWallet (cyclomatic 25) lib/screens/send/send_confirm_screen.dart:452 — _SendConfirmScreenState._signHotWallet has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ShrinkAnimationButtonState.build (cyclomatic 25) · ×1
  • _ShrinkAnimationButtonState.build (cyclomatic 25) lib/widgets/common/buttons/shrink_animation_button.dart:131 — _ShrinkAnimationButtonState.build has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _FlowNodeTileState._resolveTextColor (cyclomatic 25) · ×1
  • _FlowNodeTileState._resolveTextColor (cyclomatic 25) lib/widgets/features/send/send_transaction_flow_card.dart:725 — _FlowNodeTileState._resolveTextColor has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrezorBleConnectViewModel.connect (cyclomatic 24) · ×1
  • TrezorBleConnectViewModel.connect (cyclomatic 24) lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:135 — TrezorBleConnectViewModel.connect has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _HotWalletRestoreViewState.build (cyclomatic 24) · ×1
  • _HotWalletRestoreViewState.build (cyclomatic 24) lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:362 — _HotWalletRestoreViewState.build has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _HotWalletRestoreViewState._performRestore (cyclomatic 24) · ×1
  • _HotWalletRestoreViewState._performRestore (cyclomatic 24) lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:1261 — _HotWalletRestoreViewState._performRestore has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SendScreenState.initState (cyclomatic 24) · ×1
  • _SendScreenState.initState (cyclomatic 24) lib/screens/send/send_screen.dart:211 — _SendScreenState.initState has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CoinStackState.build (cyclomatic 24) · ×1
  • _CoinStackState.build (cyclomatic 24) lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:228 — _CoinStackState.build has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DeletableSettingsRowState.build (cyclomatic 24) · ×1
  • _DeletableSettingsRowState.build (cyclomatic 24) lib/widgets/common/bottom_sheet/deletable_settings_row.dart:125 — _DeletableSettingsRowState.build has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IsolateManager._handleIsolateManagerMessage (cyclomatic 23) · ×1
  • IsolateManager._handleIsolateManagerMessage (cyclomatic 23) lib/providers/node_provider/isolate/isolate_manager.dart:215 — IsolateManager._handleIsolateManagerMessage has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeConnectionStatusViewModel._refreshElectrumRecoveryNotice (cyclomatic 23) · ×1
  • HomeConnectionStatusViewModel._refreshElectrumRecoveryNotice (cyclomatic 23) lib/providers/view_model/home/home_connection_status_view_model.dart:206 — HomeConnectionStatusViewModel._refreshElectrumRecoveryNotice has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _BroadcastingScreenState._broadcast (cyclomatic 23) · ×1
  • _BroadcastingScreenState._broadcast (cyclomatic 23) lib/screens/send/broadcasting_screen.dart:113 — _BroadcastingScreenState._broadcast has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SelectWalletBottomSheetState._buildSheet (cyclomatic 23) · ×1
  • _SelectWalletBottomSheetState._buildSheet (cyclomatic 23) lib/screens/send/select_wallet_bottom_sheet.dart:219 — _SelectWalletBottomSheetState._buildSheet has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SendTransactionFlowCardState._buildOutputNodesForReceiving (cyclomatic 23) · ×1
  • _SendTransactionFlowCardState._buildOutputNodesForReceiving (cyclomatic 23) lib/widgets/features/send/send_transaction_flow_card.dart:355 — _SendTransactionFlowCardState._buildOutputNodesForReceiving has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _P2PCalculatorScreenState._buildCalculatorCards (cyclomatic 22) · ×1
  • _P2PCalculatorScreenState._buildCalculatorCards (cyclomatic 22) lib/screens/settings/tools/p2p_calculator_screen.dart:1261 — _P2PCalculatorScreenState._buildCalculatorCards has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _WalletInfoItemCardState.build (cyclomatic 22) · ×1
  • _WalletInfoItemCardState.build (cyclomatic 22) lib/widgets/features/wallet/card/wallet_info_item_card.dart:153 — _WalletInfoItemCardState.build has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeProvider.initialize (cyclomatic 21) · ×1
  • NodeProvider.initialize (cyclomatic 21) lib/providers/node_provider/node_provider.dart:417 — NodeProvider.initialize has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _PinSettingScreenState._onKeyTap (cyclomatic 21) · ×1
  • _PinSettingScreenState._onKeyTap (cyclomatic 21) lib/screens/settings/pin_setting_screen.dart:108 — _PinSettingScreenState._onKeyTap has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CoconutOptionPicker.build (cyclomatic 21) · ×1
  • CoconutOptionPicker.build (cyclomatic 21) lib/ui/coconut/coconut_option_picker.dart:58 — CoconutOptionPicker.build has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CompactBalanceChart.build (cyclomatic 21) · ×1
  • _CompactBalanceChart.build (cyclomatic 21) lib/widgets/wallet_balance_history_chart.dart:124 — _CompactBalanceChart.build has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bridge.normalizePsbtKeys (cyclomatic 21) · ×1
  • bridge.normalizePsbtKeys (cyclomatic 21) go/bridge.go:579 — bridge.normalizePsbtKeys has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.configurePlatformChannels (cyclomatic 21) · ×1
  • AppDelegate.configurePlatformChannels (cyclomatic 21) ios/Runner/AppDelegate.swift:32 — AppDelegate.configurePlatformChannels has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultisigNormalizer.signerBsmsFromUrResult (cyclomatic 20) · ×1
  • MultisigNormalizer.signerBsmsFromUrResult (cyclomatic 20) lib/core/bip/129/multisig_normalizer.dart:322 — MultisigNormalizer.signerBsmsFromUrResult has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IsolateController.executeNetworkCommand (cyclomatic 20) · ×1
  • IsolateController.executeNetworkCommand (cyclomatic 20) lib/providers/node_provider/isolate/isolate_controller.dart:33 — IsolateController.executeNetworkCommand has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SendViewModel.onKeyTap (cyclomatic 20) · ×1
  • SendViewModel.onKeyTap (cyclomatic 20) lib/providers/view_model/send/send_view_model.dart:888 — SendViewModel.onKeyTap has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RealmDebugService.getDynamicQueryExamples (cyclomatic 20) · ×1
  • RealmDebugService.getDynamicQueryExamples (cyclomatic 20) lib/services/realm_debug_service.dart:278 — RealmDebugService.getDynamicQueryExamples has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NfkdUtil._utf8Runes (cyclomatic 20) · ×1
  • NfkdUtil._utf8Runes (cyclomatic 20) lib/utils/nfkd_util.dart:97 — NfkdUtil._utf8Runes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrezorMethodHandler.connect (cyclomatic 20) · ×1
  • TrezorMethodHandler.connect (cyclomatic 20) ios/Runner/TrezorMethodHandler.swift:71 — TrezorMethodHandler.connect has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BitBox02ConnectViewModel.connect (cyclomatic 19) · ×1
  • BitBox02ConnectViewModel.connect (cyclomatic 19) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:77 — BitBox02ConnectViewModel.connect has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeConnectionStatusViewModel._followRefresh (cyclomatic 18) · ×1
  • HomeConnectionStatusViewModel._followRefresh (cyclomatic 18) lib/providers/view_model/home/home_connection_status_view_model.dart:66 — HomeConnectionStatusViewModel._followRefresh has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _BitBox02ConnectScreenState._buildPrimaryActionButton (cyclomatic 18) · ×1
  • _BitBox02ConnectScreenState._buildPrimaryActionButton (cyclomatic 18) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:338 — _BitBox02ConnectScreenState._buildPrimaryActionButton has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _TrezorBleConnectScreenState._buildPrimaryActionButton (cyclomatic 18) · ×1
  • _TrezorBleConnectScreenState._buildPrimaryActionButton (cyclomatic 18) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:553 — _TrezorBleConnectScreenState._buildPrimaryActionButton has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _SendConfirmScreenState.build (cyclomatic 18) · ×1
  • _SendConfirmScreenState.build (cyclomatic 18) lib/screens/send/send_confirm_screen.dart:84 — _SendConfirmScreenState.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _WalletDetailCardCarouselState.build (cyclomatic 18) · ×1
  • _WalletDetailCardCarouselState.build (cyclomatic 18) lib/screens/wallet_detail/card_detail/wallet_detail_card_carousel.dart:155 — _WalletDetailCardCarouselState.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _WalletInfoScreenState._showTargetSettingBottomSheet (cyclomatic 18) · ×1
  • _WalletInfoScreenState._showTargetSettingBottomSheet (cyclomatic 18) lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:808 — _WalletInfoScreenState._showTargetSettingBottomSheet has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeGridLayout._exchangeWithWideRow (cyclomatic 18) · ×1
  • HomeGridLayout._exchangeWithWideRow (cyclomatic 18) lib/services/home/home_grid_layout.dart:186 — HomeGridLayout._exchangeWithWideRow has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CoconutPopupState.build (cyclomatic 18) · ×1
  • _CoconutPopupState.build (cyclomatic 18) lib/ui/coconut/coconut_overlays.dart:754 — _CoconutPopupState.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionBuilder._createSingleWhenFeeSubtractedFromAmount (cyclomatic 17) · ×1
  • TransactionBuilder._createSingleWhenFeeSubtractedFromAmount (cyclomatic 17) lib/core/transaction/transaction_builder.dart:269 — TransactionBuilder._createSingleWhenFeeSubtractedFromAmount has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UtxoState.sortUtxo (cyclomatic 17) · ×1
  • UtxoState.sortUtxo (cyclomatic 17) lib/model/utxo/utxo_state.dart:41 — UtxoState.sortUtxo has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LabelImportViewModel._processRecord (cyclomatic 17) · ×1
  • LabelImportViewModel._processRecord (cyclomatic 17) lib/providers/view_model/settings/label_import_view_model.dart:86 — LabelImportViewModel._processRecord has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrezorUsbConnectViewModel.connect (cyclomatic 17) · ×1
  • TrezorUsbConnectViewModel.connect (cyclomatic 17) lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:77 — TrezorUsbConnectViewModel.connect has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _QrWithCopyTextScreenState.build (cyclomatic 17) · ×1
  • _QrWithCopyTextScreenState.build (cyclomatic 17) lib/screens/common/qr_with_copy_text_screen.dart:216 — _QrWithCopyTextScreenState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _BroadcastingScreenState.initState (cyclomatic 17) · ×1
  • _BroadcastingScreenState.initState (cyclomatic 17) lib/screens/send/broadcasting_screen.dart:571 — _BroadcastingScreenState.initState has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _AppSettingsScreen.build (cyclomatic 17) · ×1
  • _AppSettingsScreen.build (cyclomatic 17) lib/screens/settings/app_settings/app_settings_screen.dart:223 — _AppSettingsScreen.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ElectrumServerScreen._buildServerList (cyclomatic 17) · ×1
  • _ElectrumServerScreen._buildServerList (cyclomatic 17) lib/screens/settings/app_settings/network/electrum_server_screen.dart:404 — _ElectrumServerScreen._buildServerList has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UtxoTagGridSectionState._groupUtxosByTag (cyclomatic 17) · ×1
  • _UtxoTagGridSectionState._groupUtxosByTag (cyclomatic 17) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:701 — _UtxoTagGridSectionState._groupUtxosByTag has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · _UtxoSplitScreenState._syncHeaderAnimation (cyclomatic 17) · ×1
  • _UtxoSplitScreenState._syncHeaderAnimation (cyclomatic 17) lib/screens/wallet_detail/utxo_split_screen.dart:286 — _UtxoSplitScreenState._syncHeaderAnimation has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _UtxoSplitScreenState._buildApplyButton (cyclomatic 17) · ×1
  • _UtxoSplitScreenState._buildApplyButton (cyclomatic 17) lib/screens/wallet_detail/utxo_split_screen.dart:643 — _UtxoSplitScreenState._buildApplyButton has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · HomeGridLayout.reflow (cyclomatic 17) · ×1
  • HomeGridLayout.reflow (cyclomatic 17) lib/services/home/home_grid_layout.dart:18 — HomeGridLayout.reflow has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _TransactionDraftCardState.build (cyclomatic 17) · ×1
  • _TransactionDraftCardState.build (cyclomatic 17) lib/widgets/features/transaction/card/transaction_draft_card.dart:145 — _TransactionDraftCardState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionBuilder._createBatchWhenFeeSubtractedFromAmount (cyclomatic 16) · ×1
  • TransactionBuilder._createBatchWhenFeeSubtractedFromAmount (cyclomatic 16) lib/core/transaction/transaction_builder.dart:378 — TransactionBuilder._createBatchWhenFeeSubtractedFromAmount has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WatchOnlyWallet.isSupportedTaprootConfiguration (cyclomatic 16) · ×1
  • WatchOnlyWallet.isSupportedTaprootConfiguration (cyclomatic 16) lib/model/wallet/watch_only_wallet.dart:57 — WatchOnlyWallet.isSupportedTaprootConfiguration has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IsolateManager._send (cyclomatic 16) · ×1
  • IsolateManager._send (cyclomatic 16) lib/providers/node_provider/isolate/isolate_manager.dart:421 — IsolateManager._send has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeProvider._updateCurrentBlock (cyclomatic 16) · ×1
  • NodeProvider._updateCurrentBlock (cyclomatic 16) lib/providers/node_provider/node_provider.dart:178 — NodeProvider._updateCurrentBlock has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BroadcastingViewModel.prepareTagInheritance (cyclomatic 16) · ×1
  • BroadcastingViewModel.prepareTagInheritance (cyclomatic 16) lib/providers/view_model/send/broadcasting_view_model.dart:152 — BroadcastingViewModel.prepareTagInheritance has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AddressSearchViewModel.validateAddress (cyclomatic 16) · ×1
  • AddressSearchViewModel.validateAddress (cyclomatic 16) lib/providers/view_model/wallet_detail/address_search_view_model.dart:68 — AddressSearchViewModel.validateAddress has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TransactionDetailViewModel._initTransactionList (cyclomatic 16) · ×1
  • TransactionDetailViewModel._initTransactionList (cyclomatic 16) lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:241 — TransactionDetailViewModel._initTransactionList has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WalletInfoViewModel.getTaprootParticipants (cyclomatic 16) · ×1
  • WalletInfoViewModel.getTaprootParticipants (cyclomatic 16) lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:214 — WalletInfoViewModel.getTaprootParticipants has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WalletProvider._addHotWallet (cyclomatic 16) · ×1
  • WalletProvider._addHotWallet (cyclomatic 16) lib/providers/wallet_provider.dart:654 — WalletProvider._addHotWallet has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · UtxoRepository.addUtxosToTags (cyclomatic 16) · ×1
  • UtxoRepository.addUtxosToTags (cyclomatic 16) lib/repository/realm/utxo_repository.dart:258 — UtxoRepository.addUtxosToTags has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WalletRepository.deleteWallet (cyclomatic 16) · ×1
  • WalletRepository.deleteWallet (cyclomatic 16) lib/repository/realm/wallet_repository.dart:498 — WalletRepository.deleteWallet has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _WalletAddScannerScreenState._handleClipboardImport (cyclomatic 16) · ×1
  • _WalletAddScannerScreenState._handleClipboardImport (cyclomatic 16) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:436 — _WalletAddScannerScreenState._handleClipboardImport has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UnsignedTransactionQrScreenState._getGuideTextSpan (cyclomatic 16) · ×1
  • _UnsignedTransactionQrScreenState._getGuideTextSpan (cyclomatic 16) lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:222 — _UnsignedTransactionQrScreenState._getGuideTextSpan has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SendScreenState._buildAppBar (cyclomatic 16) · ×1
  • _SendScreenState._buildAppBar (cyclomatic 16) lib/screens/send/send_screen.dart:696 — _SendScreenState._buildAppBar has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SendScreenState._addAddressField (cyclomatic 16) · ×1
  • _SendScreenState._addAddressField (cyclomatic 16) lib/screens/send/send_screen.dart:2819 — _SendScreenState._addAddressField has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UtxoMergeScreenState._buildStepOptionPicker (cyclomatic 16) · ×1
  • _UtxoMergeScreenState._buildStepOptionPicker (cyclomatic 16) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:1139 — _UtxoMergeScreenState._buildStepOptionPicker has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DonutChartState._hitTestSegment (cyclomatic 16) · ×1
  • _DonutChartState._hitTestSegment (cyclomatic 16) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:287 — _DonutChartState._hitTestSegment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UtxoSplitScreenState._scheduleAutoOpenMethodBottomSheet (cyclomatic 16) · ×1
  • _UtxoSplitScreenState._scheduleAutoOpenMethodBottomSheet (cyclomatic 16) lib/screens/wallet_detail/utxo_split_screen.dart:856 — _UtxoSplitScreenState._scheduleAutoOpenMethodBottomSheet has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _WalletDetailScreenState._buildTargetCard (cyclomatic 16) · ×1
  • _WalletDetailScreenState._buildTargetCard (cyclomatic 16) lib/screens/wallet_detail/wallet_detail_screen.dart:296 — _WalletDetailScreenState._buildTargetCard has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FeatureLauncher.launch (cyclomatic 16) · ×1
  • FeatureLauncher.launch (cyclomatic 16) lib/services/feature/feature_launcher.dart:57 — FeatureLauncher.launch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AddressValidator.validateAddress (cyclomatic 16) · ×1
  • AddressValidator.validateAddress (cyclomatic 16) lib/utils/address_util.dart:161 — AddressValidator.validateAddress has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bridge.BTCSignPSBT (cyclomatic 16) · ×1
  • bridge.BTCSignPSBT (cyclomatic 16) go/bridge.go:313 — bridge.BTCSignPSBT has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment lib/screens/common/pin_check_screen.dart:174 — // FIXME: 여기 await 안 넣어줘도 되는지?? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · _BalanceHistoryWalletBreakdownState.build (cognitive 68) · ×1
  • _BalanceHistoryWalletBreakdownState.build (cognitive 68) lib/widgets/features/home/widgets/balance_history_wallet_breakdown.dart:116 — _BalanceHistoryWalletBreakdownState.build has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (29 pts), ternaries 13 (26 pts), boolean chains 10, loops 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SendScreenState._startHotWalletSigning (cognitive 67) · ×1
  • _SendScreenState._startHotWalletSigning (cognitive 67) lib/screens/send/send_screen.dart:926 — _SendScreenState._startHotWalletSigning has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (62 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LongPressedMenuWidgetState.showMenu (cognitive 61) · ×1
  • LongPressedMenuWidgetState.showMenu (cognitive 61) lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:307 — LongPressedMenuWidgetState.showMenu has cognitive complexity 61 (threshold 15). Drivers by points: if/else 26 (34 pts), ternaries 12 (14 pts), boolean chains 11, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NetworkService.getRecommendedFees (cognitive 57) · ×1
  • NetworkService.getRecommendedFees (cognitive 57) lib/providers/node_provider/network_service.dart:55 — NetworkService.getRecommendedFees has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 22 (44 pts), if/else 3 (8 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SendConfirmScreenState._signHotWallet (cognitive 54) · ×1
  • _SendConfirmScreenState._signHotWallet (cognitive 54) lib/screens/send/send_confirm_screen.dart:452 — _SendConfirmScreenState._signHotWallet has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (48 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UtxoCoinCardState.build (cognitive 54) · ×1
  • _UtxoCoinCardState.build (cognitive 54) lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:471 — _UtxoCoinCardState.build has cognitive complexity 54 (threshold 15). Drivers by points: ternaries 31 (47 pts), if/else 5, boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RealmDebugService.getDynamicQueryExamples (cognitive 51) · ×1
  • RealmDebugService.getDynamicQueryExamples (cognitive 51) lib/services/realm_debug_service.dart:278 — RealmDebugService.getDynamicQueryExamples has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (48 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputOutputDetailRow.getRowProperty (cognitive 51) · ×1
  • InputOutputDetailRow.getRowProperty (cognitive 51) lib/widgets/features/transaction/row/input_output_detail_row.dart:143 — InputOutputDetailRow.getRowProperty has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (46 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletItemCard._buildWalletItemContent (cognitive 50) · ×1
  • WalletItemCard._buildWalletItemContent (cognitive 50) lib/widgets/features/wallet/card/wallet_item_card.dart:117 — WalletItemCard._buildWalletItemContent has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 16 (33 pts), if/else 11 (16 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BroadcastingViewModel.setTxInfo (cognitive 48) · ×1
  • BroadcastingViewModel.setTxInfo (cognitive 48) lib/providers/view_model/send/broadcasting_view_model.dart:375 — BroadcastingViewModel.setTxInfo has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (31 pts), loops 6 (12 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _BroadcastingScreenState._broadcast (cognitive 48) · ×1
  • _BroadcastingScreenState._broadcast (cognitive 48) lib/screens/send/broadcasting_screen.dart:113 — _BroadcastingScreenState._broadcast has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (42 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _PinSettingScreenState._onKeyTap (cognitive 48) · ×1
  • _PinSettingScreenState._onKeyTap (cognitive 48) lib/screens/settings/pin_setting_screen.dart:108 — _PinSettingScreenState._onKeyTap has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (40 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SeedQrDecoder._getUsefulBits (cognitive 48) · ×1
  • SeedQrDecoder._getUsefulBits (cognitive 48) lib/utils/seed_qr_decoder.dart:105 — SeedQrDecoder._getUsefulBits has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 38, if/else 5 (7 pts), loops 2 (3 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _SendTransactionFlowCardState._buildOutputNodesForReceiving (cognitive 45) · ×1
  • _SendTransactionFlowCardState._buildOutputNodesForReceiving (cognitive 45) lib/widgets/features/send/send_transaction_flow_card.dart:355 — _SendTransactionFlowCardState._buildOutputNodesForReceiving has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 7 (20 pts), loops 4 (9 pts), boolean chains 8, if/else 5 (8 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionBuilder._createSingleWhenFeeSubtractedFromAmount (cognitive 44) · ×1
  • TransactionBuilder._createSingleWhenFeeSubtractedFromAmount (cognitive 44) lib/core/transaction/transaction_builder.dart:269 — TransactionBuilder._createSingleWhenFeeSubtractedFromAmount has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (37 pts), error handling 3 (6 pts), loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeItemsViewState._updatePreview (cognitive 44) · ×1
  • HomeItemsViewState._updatePreview (cognitive 44) lib/widgets/features/home/home_items_view.dart:285 — HomeItemsViewState._updatePreview has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 26, if/else 10 (13 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · IsolateManager._handleIsolateManagerMessage (cognitive 43) · ×1
  • IsolateManager._handleIsolateManagerMessage (cognitive 43) lib/providers/node_provider/isolate/isolate_manager.dart:215 — IsolateManager._handleIsolateManagerMessage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 3 (10 pts), ternaries 2 (6 pts), boolean chains 5, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionBuilder._createBatchWhenFeeSubtractedFromAmount (cognitive 42) · ×1
  • TransactionBuilder._createBatchWhenFeeSubtractedFromAmount (cognitive 42) lib/core/transaction/transaction_builder.dart:378 — TransactionBuilder._createBatchWhenFeeSubtractedFromAmount has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (37 pts), error handling 2 (4 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CoconutTextFieldState.build (cognitive 42) · ×1
  • _CoconutTextFieldState.build (cognitive 42) lib/ui/coconut/coconut_text_field.dart:614 — _CoconutTextFieldState.build has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 18 (24 pts), if/else 9 (10 pts), boolean chains 8 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TrezorMethodHandler.connectToDevice (cognitive 40) · ×1
  • TrezorMethodHandler.connectToDevice (cognitive 40) android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:435 — TrezorMethodHandler.connectToDevice has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 7, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _BroadcastingScreenState.build (cognitive 39) · ×1
  • _BroadcastingScreenState.build (cognitive 39) lib/screens/send/broadcasting_screen.dart:285 — _BroadcastingScreenState.build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 5 (9 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SocketManager._extractJsonObjects (cognitive 38) · ×1
  • SocketManager._extractJsonObjects (cognitive 38) lib/services/network/socket/socket_manager.dart:200 — SocketManager._extractJsonObjects has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (29 pts), error handling 1 (5 pts), boolean chains 3, loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SendTransactionFlowCardState._buildOutputNodesDefault (cognitive 38) · ×1
  • _SendTransactionFlowCardState._buildOutputNodesDefault (cognitive 38) lib/widgets/features/send/send_transaction_flow_card.dart:442 — _SendTransactionFlowCardState._buildOutputNodesDefault has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 9 (19 pts), boolean chains 12, if/else 5, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrezorBleConnectViewModel.connect (cognitive 37) · ×1
  • TrezorBleConnectViewModel.connect (cognitive 37) lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:135 — TrezorBleConnectViewModel.connect has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (28 pts), error handling 4, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HotWalletRestoreViewState._performRestore (cognitive 37) · ×1
  • _HotWalletRestoreViewState._performRestore (cognitive 37) lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:1261 — _HotWalletRestoreViewState._performRestore has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 3, error handling 2, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoSplitTransactionBuilder.buildFixedAmountSplit (cognitive 36) · ×1
  • UtxoSplitTransactionBuilder.buildFixedAmountSplit (cognitive 36) lib/core/transaction/utxo_split_transaction_builder.dart:320 — UtxoSplitTransactionBuilder.buildFixedAmountSplit has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (35 pts), error handling 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NodeProvider.initialize (cognitive 36) · ×1
  • NodeProvider.initialize (cognitive 36) lib/providers/node_provider/node_provider.dart:417 — NodeProvider.initialize has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (25 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NfkdUtil._encodeNormalized (cognitive 36) · ×1
  • NfkdUtil._encodeNormalized (cognitive 36) lib/utils/nfkd_util.dart:48 — NfkdUtil._encodeNormalized has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 4 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeItemsViewState.build (cognitive 36) · ×1
  • HomeItemsViewState.build (cognitive 36) lib/widgets/features/home/home_items_view.dart:423 — HomeItemsViewState.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 11, ternaries 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FlowNodeTileState._resolveTextColor (cognitive 36) · ×1
  • _FlowNodeTileState._resolveTextColor (cognitive 36) lib/widgets/features/send/send_transaction_flow_card.dart:725 — _FlowNodeTileState._resolveTextColor has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 11, ternaries 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SendViewModel.onKeyTap (cognitive 35) · ×1
  • SendViewModel.onKeyTap (cognitive 35) lib/providers/view_model/send/send_view_model.dart:888 — SendViewModel.onKeyTap has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoRepository.addUtxosToTags (cognitive 34) · ×1
  • UtxoRepository.addUtxosToTags (cognitive 34) lib/repository/realm/utxo_repository.dart:258 — UtxoRepository.addUtxosToTags has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 6 (8 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppSettingsScreen._waitForSourceKeyboard (cognitive 34) · ×1
  • AppSettingsScreen._waitForSourceKeyboard (cognitive 34) lib/screens/settings/app_settings/app_settings_screen.dart:77 — AppSettingsScreen._waitForSourceKeyboard has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, if/else 12 (16 pts), ternaries 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppDelegate.configurePlatformChannels (cognitive 33) · ×1
  • AppDelegate.configurePlatformChannels (cognitive 33) ios/Runner/AppDelegate.swift:32 — AppDelegate.configurePlatformChannels has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (24 pts), error handling 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TrezorUsbConnectScreenState._buildPrimaryActionButton (cognitive 32) · ×1
  • _TrezorUsbConnectScreenState._buildPrimaryActionButton (cognitive 32) lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:472 — _TrezorUsbConnectScreenState._buildPrimaryActionButton has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 25, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _BroadcastingScreenState.initState (cognitive 31) · ×1
  • _BroadcastingScreenState.initState (cognitive 31) lib/screens/send/broadcasting_screen.dart:571 — _BroadcastingScreenState.initState has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (6 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CoinStackState.build (cognitive 31) · ×1
  • _CoinStackState.build (cognitive 31) lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:228 — _CoinStackState.build has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 9 (14 pts), boolean chains 7, if/else 5, loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolateManager._send (cognitive 30) · ×1
  • IsolateManager._send (cognitive 30) lib/providers/node_provider/isolate/isolate_manager.dart:421 — IsolateManager._send has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 2, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SendScreenState._buildRecipientPage (cognitive 30) · ×1
  • _SendScreenState._buildRecipientPage (cognitive 30) lib/screens/send/send_screen.dart:1967 — _SendScreenState._buildRecipientPage has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (14 pts), if/else 12 (13 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _UtxoOverviewScreenState._buildAmountViewBody (cognitive 30) · ×1
  • _UtxoOverviewScreenState._buildAmountViewBody (cognitive 30) lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:514 — _UtxoOverviewScreenState._buildAmountViewBody has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DeletableSettingsRowState.build (cognitive 30) · ×1
  • _DeletableSettingsRowState.build (cognitive 30) lib/widgets/common/bottom_sheet/deletable_settings_row.dart:125 — _DeletableSettingsRowState.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 5, ternaries 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _WalletInfoItemCardState.build (cognitive 30) · ×1
  • _WalletInfoItemCardState.build (cognitive 30) lib/widgets/features/wallet/card/wallet_info_item_card.dart:153 — _WalletInfoItemCardState.build has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 15 (24 pts), boolean chains 5, if/else 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SendScreenState.initState (cognitive 29) · ×1
  • _SendScreenState.initState (cognitive 29) lib/screens/send/send_screen.dart:211 — _SendScreenState.initState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _DonutChartPainter.paint (cognitive 29) · ×1
  • _DonutChartPainter.paint (cognitive 29) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:525 — _DonutChartPainter.paint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (9 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionBuilder._createTransaction (cognitive 28) · ×1
  • TransactionBuilder._createTransaction (cognitive 28) lib/core/transaction/transaction_builder.dart:205 — TransactionBuilder._createTransaction has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (15 pts), ternaries 3 (9 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeProvider._reconnect (cognitive 28) · ×1
  • NodeProvider._reconnect (cognitive 28) lib/providers/node_provider/node_provider.dart:774 — NodeProvider._reconnect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 3, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitBox02ConnectViewModel.connect (cognitive 28) · ×1
  • BitBox02ConnectViewModel.connect (cognitive 28) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:77 — BitBox02ConnectViewModel.connect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 5 (7 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoSyncService.createOutgoingUtxos (cognitive 27) · ×1
  • UtxoSyncService.createOutgoingUtxos (cognitive 27) lib/providers/node_provider/utxo_sync_service.dart:125 — UtxoSyncService.createOutgoingUtxos has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (5 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionDetailViewModel._transactionRecordFromMempoolResponse (cognitive 27) · ×1
  • TransactionDetailViewModel._transactionRecordFromMempoolResponse (cognitive 27) lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:418 — TransactionDetailViewModel._transactionRecordFromMempoolResponse has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (9 pts), loops 2 (4 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoDetailViewModel._transactionRecordFromMempoolResponse (cognitive 27) · ×1
  • UtxoDetailViewModel._transactionRecordFromMempoolResponse (cognitive 27) lib/providers/view_model/wallet_detail/utxo_detail_view_model.dart:160 — UtxoDetailViewModel._transactionRecordFromMempoolResponse has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (9 pts), loops 2 (4 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletAddScannerScreenState._handleClipboardImport (cognitive 27) · ×1
  • _WalletAddScannerScreenState._handleClipboardImport (cognitive 27) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:436 — _WalletAddScannerScreenState._handleClipboardImport has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NfkdUtil._utf8Runes (cognitive 27) · ×1
  • NfkdUtil._utf8Runes (cognitive 27) lib/utils/nfkd_util.dart:97 — NfkdUtil._utf8Runes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrezorMethodHandler.connect (cognitive 27) · ×1
  • TrezorMethodHandler.connect (cognitive 27) ios/Runner/TrezorMethodHandler.swift:71 — TrezorMethodHandler.connect has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 6, error handling 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeConnectionStatusViewModel._followRefresh (cognitive 26) · ×1
  • HomeConnectionStatusViewModel._followRefresh (cognitive 26) lib/providers/view_model/home/home_connection_status_view_model.dart:66 — HomeConnectionStatusViewModel._followRefresh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 10 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeConnectionStatusViewModel._refreshElectrumRecoveryNotice (cognitive 26) · ×1
  • HomeConnectionStatusViewModel._refreshElectrumRecoveryNotice (cognitive 26) lib/providers/view_model/home/home_connection_status_view_model.dart:206 — HomeConnectionStatusViewModel._refreshElectrumRecoveryNotice has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (13 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LabelImportViewModel._processRecord (cognitive 26) · ×1
  • LabelImportViewModel._processRecord (cognitive 26) lib/providers/view_model/settings/label_import_view_model.dart:86 — LabelImportViewModel._processRecord has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UnsignedTransactionQrScreenState._getGuideTextSpan (cognitive 26) · ×1
  • _UnsignedTransactionQrScreenState._getGuideTextSpan (cognitive 26) lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:222 — _UnsignedTransactionQrScreenState._getGuideTextSpan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 2 (6 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _TransactionDetailScreenState._buildTransactionFlowCard (cognitive 26) · ×1
  • _TransactionDetailScreenState._buildTransactionFlowCard (cognitive 26) lib/screens/wallet_detail/transaction_detail_screen.dart:840 — _TransactionDetailScreenState._buildTransactionFlowCard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CpfpBuilder.build (cognitive 25) · ×1
  • CpfpBuilder.build (cognitive 25) lib/core/transaction/fee_bumping/cpfp_builder.dart:252 — CpfpBuilder.build has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 1 (2 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RbfBuilder._tryWithSelfOutputReduction (cognitive 25) · ×1
  • RbfBuilder._tryWithSelfOutputReduction (cognitive 25) lib/core/transaction/fee_bumping/rbf_builder.dart:184 — RbfBuilder._tryWithSelfOutputReduction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RbfBuilder._buildRbf (cognitive 25) · ×1
  • RbfBuilder._buildRbf (cognitive 25) lib/core/transaction/fee_bumping/rbf_builder.dart:434 — RbfBuilder._buildRbf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 6 (12 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · P2PCalculatorViewModel._fetchPriceForFiat (cognitive 25) · ×1
  • P2PCalculatorViewModel._fetchPriceForFiat (cognitive 25) lib/providers/view_model/utility/p2p_calculator_view_model.dart:350 — P2PCalculatorViewModel._fetchPriceForFiat has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 2 (8 pts), boolean chains 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HotWalletRestoreViewState.build (cognitive 25) · ×1
  • _HotWalletRestoreViewState.build (cognitive 25) lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:362 — _HotWalletRestoreViewState.build has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 8, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _WalletBalanceHistoryScreenState._chart (cognitive 25) · ×1
  • _WalletBalanceHistoryScreenState._chart (cognitive 25) lib/screens/home/wallet_balance_history_screen.dart:330 — _WalletBalanceHistoryScreenState._chart has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 8, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _SendScreenState._buildAppBar (cognitive 25) · ×1
  • _SendScreenState._buildAppBar (cognitive 25) lib/screens/send/send_screen.dart:696 — _SendScreenState._buildAppBar has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 7 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ElectrumServerScreen._buildServerList (cognitive 25) · ×1
  • _ElectrumServerScreen._buildServerList (cognitive 25) lib/screens/settings/app_settings/network/electrum_server_screen.dart:404 — _ElectrumServerScreen._buildServerList has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 5 (9 pts), boolean chains 5, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletInfoScreenState._showTargetSettingBottomSheet (cognitive 25) · ×1
  • _WalletInfoScreenState._showTargetSettingBottomSheet (cognitive 25) lib/screens/wallet_detail/wallet_info/wallet_info_screen.dart:808 — _WalletInfoScreenState._showTargetSettingBottomSheet has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeGridLayout.reflow (cognitive 25) · ×1
  • HomeGridLayout.reflow (cognitive 25) lib/services/home/home_grid_layout.dart:18 — HomeGridLayout.reflow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 6 (8 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultisigNormalizer.signerBsmsFromUrResult (cognitive 24) · ×1
  • MultisigNormalizer.signerBsmsFromUrResult (cognitive 24) lib/core/bip/129/multisig_normalizer.dart:322 — MultisigNormalizer.signerBsmsFromUrResult has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletProvider._reconcileHotWalletLifecycle (cognitive 24) · ×1
  • WalletProvider._reconcileHotWalletLifecycle (cognitive 24) lib/providers/wallet_provider.dart:205 — WalletProvider._reconcileHotWalletLifecycle has cognitive complexity 24 (threshold 15). Drivers by points: error handling 4 (12 pts), if/else 3 (7 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectWalletBottomSheetState._buildSheet (cognitive 24) · ×1
  • _SelectWalletBottomSheetState._buildSheet (cognitive 24) lib/screens/send/select_wallet_bottom_sheet.dart:219 — _SelectWalletBottomSheetState._buildSheet has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 9, boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _UtxoTagGridSectionState._groupUtxosByTag (cognitive 24) · ×1
  • _UtxoTagGridSectionState._groupUtxosByTag (cognitive 24) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:701 — _UtxoTagGridSectionState._groupUtxosByTag has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 5 (9 pts), boolean chains 4 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · SocketManager._processJsonObject (cognitive 24) · ×1
  • SocketManager._processJsonObject (cognitive 24) lib/services/network/socket/socket_manager.dart:277 — SocketManager._processJsonObject has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (5 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ShrinkAnimationButtonState.build (cognitive 24) · ×1
  • _ShrinkAnimationButtonState.build (cognitive 24) lib/widgets/common/buttons/shrink_animation_button.dart:131 — _ShrinkAnimationButtonState.build has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 19, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TransactionSyncService._cleanupOrphanedUnconfirmedTransactions (cognitive 23) · ×1
  • TransactionSyncService._cleanupOrphanedUnconfirmedTransactions (cognitive 23) lib/providers/node_provider/transaction/transaction_sync_service.dart:355 — TransactionSyncService._cleanupOrphanedUnconfirmedTransactions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrezorBleConnectViewModel._retrieveXPub (cognitive 23) · ×1
  • TrezorBleConnectViewModel._retrieveXPub (cognitive 23) lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:238 — TrezorBleConnectViewModel._retrieveXPub has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionDetailViewModel._initTransactionList (cognitive 23) · ×1
  • TransactionDetailViewModel._initTransactionList (cognitive 23) lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:241 — TransactionDetailViewModel._initTransactionList has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletProvider._addHotWallet (cognitive 23) · ×1
  • WalletProvider._addHotWallet (cognitive 23) lib/providers/wallet_provider.dart:654 — WalletProvider._addHotWallet has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (11 pts), if/else 7 (9 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SendScreenState._addAddressField (cognitive 23) · ×1
  • _SendScreenState._addAddressField (cognitive 23) lib/screens/send/send_screen.dart:2819 — _SendScreenState._addAddressField has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LicenseBottomSheetState.build (cognitive 23) · ×1
  • _LicenseBottomSheetState.build (cognitive 23) lib/screens/settings/app_info_license_bottom_sheet.dart:58 — _LicenseBottomSheetState.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _P2PCalculatorScreenState._buildCalculatorCards (cognitive 23) · ×1
  • _P2PCalculatorScreenState._buildCalculatorCards (cognitive 23) lib/screens/settings/tools/p2p_calculator_screen.dart:1261 — _P2PCalculatorScreenState._buildCalculatorCards has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 6, if/else 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WebSocketService._onData (cognitive 23) · ×1
  • WebSocketService._onData (cognitive 23) lib/services/web_socket_service.dart:113 — WebSocketService._onData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RbfBuilder._tryWithAdditionalSpendable (cognitive 22) · ×1
  • RbfBuilder._tryWithAdditionalSpendable (cognitive 22) lib/core/transaction/fee_bumping/rbf_builder.dart:311 — RbfBuilder._tryWithAdditionalSpendable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrezorUsbConnectViewModel.connect (cognitive 22) · ×1
  • TrezorUsbConnectViewModel.connect (cognitive 22) lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart:77 — TrezorUsbConnectViewModel.connect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeGridLayout._exchangeWithWideRow (cognitive 22) · ×1
  • HomeGridLayout._exchangeWithWideRow (cognitive 22) lib/services/home/home_grid_layout.dart:186 — HomeGridLayout._exchangeWithWideRow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 3, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoconutOptionPicker.build (cognitive 22) · ×1
  • CoconutOptionPicker.build (cognitive 22) lib/ui/coconut/coconut_option_picker.dart:58 — CoconutOptionPicker.build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 9, boolean chains 2, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _CoconutQrScannerState._onDetect (cognitive 22) · ×1
  • _CoconutQrScannerState._onDetect (cognitive 22) lib/widgets/features/qr/animated_qr/coconut_qr_scanner.dart:94 — _CoconutQrScannerState._onDetect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CompactBalanceChart.build (cognitive 22) · ×1
  • _CompactBalanceChart.build (cognitive 22) lib/widgets/wallet_balance_history_chart.dart:124 — _CompactBalanceChart.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 5, if/else 5, loops 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UtxoSplitTransactionBuilder._spawnBuildTask (cognitive 21) · ×1
  • UtxoSplitTransactionBuilder._spawnBuildTask (cognitive 21) lib/core/transaction/utxo_split_transaction_builder.dart:744 — UtxoSplitTransactionBuilder._spawnBuildTask has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeProvider._updateCurrentBlock (cognitive 21) · ×1
  • NodeProvider._updateCurrentBlock (cognitive 21) lib/providers/node_provider/node_provider.dart:178 — NodeProvider._updateCurrentBlock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SendConfirmScreenState.build (cognitive 21) · ×1
  • _SendConfirmScreenState.build (cognitive 21) lib/screens/send/send_confirm_screen.dart:84 — _SendConfirmScreenState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _SendScreenState.syncAddressControllersWithRecipientList (cognitive 21) · ×1
  • _SendScreenState.syncAddressControllersWithRecipientList (cognitive 21) lib/screens/send/send_screen.dart:2940 — _SendScreenState.syncAddressControllersWithRecipientList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeGridLayout._flow (cognitive 21) · ×1
  • HomeGridLayout._flow (cognitive 21) lib/services/home/home_grid_layout.dart:296 — HomeGridLayout._flow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecentTransactionsView.build (cognitive 21) · ×1
  • RecentTransactionsView.build (cognitive 21) lib/widgets/features/home/widgets/activity_widget_views.dart:70 — RecentTransactionsView.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (8 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TransactionDraftCardState.build (cognitive 21) · ×1
  • _TransactionDraftCardState.build (cognitive 21) lib/widgets/features/transaction/card/transaction_draft_card.dart:145 — _TransactionDraftCardState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WatchOnlyWallet.isSupportedTaprootConfiguration (cognitive 20) · ×1
  • WatchOnlyWallet.isSupportedTaprootConfiguration (cognitive 20) lib/model/wallet/watch_only_wallet.dart:57 — WatchOnlyWallet.isSupportedTaprootConfiguration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScriptSyncService._processScriptStatus (cognitive 20) · ×1
  • ScriptSyncService._processScriptStatus (cognitive 20) lib/providers/node_provider/subscription/script_sync_service.dart:253 — ScriptSyncService._processScriptStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RbfService.detectIncomingRbfTransaction (cognitive 20) · ×1
  • RbfService.detectIncomingRbfTransaction (cognitive 20) lib/providers/node_provider/transaction/rbf_service.dart:97 — RbfService.detectIncomingRbfTransaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BroadcastingViewModel.prepareTagInheritance (cognitive 20) · ×1
  • BroadcastingViewModel.prepareTagInheritance (cognitive 20) lib/providers/view_model/send/broadcasting_view_model.dart:152 — BroadcastingViewModel.prepareTagInheritance has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AddressRepository.addAddressesWithGapLimit (cognitive 20) · ×1
  • AddressRepository.addAddressesWithGapLimit (cognitive 20) lib/repository/realm/address_repository.dart:691 — AddressRepository.addAddressesWithGapLimit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletAddScannerScreenState._getGuideTextSpan (cognitive 20) · ×1
  • _WalletAddScannerScreenState._getGuideTextSpan (cognitive 20) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:114 — _WalletAddScannerScreenState._getGuideTextSpan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _HotWalletCreateScreenState._onCreateWalletPressed (cognitive 20) · ×1
  • _HotWalletCreateScreenState._onCreateWalletPressed (cognitive 20) lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:640 — _HotWalletCreateScreenState._onCreateWalletPressed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HotWalletMnemonicBackupGuideScreenState.build (cognitive 20) · ×1
  • _HotWalletMnemonicBackupGuideScreenState.build (cognitive 20) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:118 — _HotWalletMnemonicBackupGuideScreenState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HotWalletMnemonicBackupGuideScreenState._startMnemonicBackupFlow (cognitive 20) · ×1
  • _HotWalletMnemonicBackupGuideScreenState._startMnemonicBackupFlow (cognitive 20) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:422 — _HotWalletMnemonicBackupGuideScreenState._startMnemonicBackupFlow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _BroadcastingScreenState._onBroadcastButtonClicked (cognitive 20) · ×1
  • _BroadcastingScreenState._onBroadcastButtonClicked (cognitive 20) lib/screens/send/broadcasting_screen.dart:521 — _BroadcastingScreenState._onBroadcastButtonClicked has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AddressListScreenState._nextLoad (cognitive 20) · ×1
  • _AddressListScreenState._nextLoad (cognitive 20) lib/screens/wallet_detail/address_list_screen.dart:553 — _AddressListScreenState._nextLoad has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UtxoMergeScreenState._buildStepOptionPicker (cognitive 20) · ×1
  • _UtxoMergeScreenState._buildStepOptionPicker (cognitive 20) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:1139 — _UtxoMergeScreenState._buildStepOptionPicker has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _DonutChartState._hitTestSegment (cognitive 20) · ×1
  • _DonutChartState._hitTestSegment (cognitive 20) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:287 — _DonutChartState._hitTestSegment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (6 pts), boolean chains 5, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Bip329Converter.generateRecordsForWallet (cognitive 19) · ×1
  • Bip329Converter.generateRecordsForWallet (cognitive 19) lib/core/bip/329/bip329_converter.dart:50 — Bip329Converter.generateRecordsForWallet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BalanceSyncService.fetchScriptBalanceBatch (cognitive 19) · ×1
  • BalanceSyncService.fetchScriptBalanceBatch (cognitive 19) lib/providers/node_provider/balance_sync_service.dart:72 — BalanceSyncService.fetchScriptBalanceBatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (6 pts), error handling 2 (4 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolateManager.closeIsolate (cognitive 19) · ×1
  • IsolateManager.closeIsolate (cognitive 19) lib/providers/node_provider/isolate/isolate_manager.dart:574 — IsolateManager.closeIsolate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 3 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletStackListScreenState._moveIndicator (cognitive 19) · ×1
  • _WalletStackListScreenState._moveIndicator (cognitive 19) lib/screens/home/wallet_stack_list_screen.dart:181 — _WalletStackListScreenState._moveIndicator has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _Bip39ListScreenState._queryWord (cognitive 19) · ×1
  • _Bip39ListScreenState._queryWord (cognitive 19) lib/screens/settings/tools/bip39_word_list_screen.dart:126 — _Bip39ListScreenState._queryWord has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UtxoListState._handleUtxoListChange (cognitive 19) · ×1
  • _UtxoListState._handleUtxoListChange (cognitive 19) lib/screens/wallet_detail/utxo_overview/utxo_list.dart:256 — _UtxoListState._handleUtxoListChange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 6, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UtxoOverviewScreenState._restoreStateAfterReturn (cognitive 19) · ×1
  • _UtxoOverviewScreenState._restoreStateAfterReturn (cognitive 19) lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:144 — _UtxoOverviewScreenState._restoreStateAfterReturn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletTabState.build (cognitive 19) · ×1
  • _WalletTabState.build (cognitive 19) lib/screens/wallet_detail/wallet_info/wallet_appearance_screen.dart:504 — _WalletTabState.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletAddService.createWalletFromJson (cognitive 19) · ×1
  • WalletAddService.createWalletFromJson (cognitive 19) lib/services/wallet_add_service.dart:130 — WalletAddService.createWalletFromJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CoconutPopupState.build (cognitive 19) · ×1
  • _CoconutPopupState.build (cognitive 19) lib/ui/coconut/coconut_overlays.dart:754 — _CoconutPopupState.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 13 (15 pts), if/else 2, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AddressValidator.validateAddress (cognitive 19) · ×1
  • AddressValidator.validateAddress (cognitive 19) lib/utils/address_util.dart:161 — AddressValidator.validateAddress has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FakeBalanceUtil.distributeFakeBalance (cognitive 19) · ×1
  • FakeBalanceUtil.distributeFakeBalance (cognitive 19) lib/utils/balance_format_util.dart:106 — FakeBalanceUtil.distributeFakeBalance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Logger.logLongString (cognitive 19) · ×1
  • Logger.logLongString (cognitive 19) lib/utils/logger.dart:92 — Logger.logLongString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeCubePagerState.peek (cognitive 19) · ×1
  • HomeCubePagerState.peek (cognitive 19) lib/widgets/features/home/home_cube_pager.dart:75 — HomeCubePagerState.peek has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletCarouselIndicatorState._moveIndicator (cognitive 19) · ×1
  • _WalletCarouselIndicatorState._moveIndicator (cognitive 19) lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:120 — _WalletCarouselIndicatorState._moveIndicator has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridge.BTCSignPSBT (cognitive 19) · ×1
  • bridge.BTCSignPSBT (cognitive 19) go/bridge.go:313 — bridge.BTCSignPSBT has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridge.normalizePsbtKeys (cognitive 19) · ×1
  • bridge.normalizePsbtKeys (cognitive 19) go/bridge.go:579 — bridge.normalizePsbtKeys has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, loops 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IsolateManager._setUpReceivePortListener (cognitive 18) · ×1
  • IsolateManager._setUpReceivePortListener (cognitive 18) lib/providers/node_provider/isolate/isolate_manager.dart:176 — IsolateManager._setUpReceivePortListener has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrezorSignViewModel.signTransaction (cognitive 18) · ×1
  • TrezorSignViewModel.signTransaction (cognitive 18) lib/providers/view_model/send/connected/trezor_sign_view_model.dart:116 — TrezorSignViewModel.signTransaction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AddressSearchViewModel.validateAddress (cognitive 18) · ×1
  • AddressSearchViewModel.validateAddress (cognitive 18) lib/providers/view_model/wallet_detail/address_search_view_model.dart:68 — AddressSearchViewModel.validateAddress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeeBumpingViewModel.isAdditionalInputRequired (cognitive 18) · ×1
  • FeeBumpingViewModel.isAdditionalInputRequired (cognitive 18) lib/providers/view_model/wallet_detail/fee_bumping_view_model.dart:153 — FeeBumpingViewModel.isAdditionalInputRequired has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoOverviewViewModel.updateSelectedUtxosStatus (cognitive 18) · ×1
  • UtxoOverviewViewModel.updateSelectedUtxosStatus (cognitive 18) lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:414 — UtxoOverviewViewModel.updateSelectedUtxosStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoSplitViewModel._onInputChanged (cognitive 18) · ×1
  • UtxoSplitViewModel._onInputChanged (cognitive 18) lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:320 — UtxoSplitViewModel._onInputChanged has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletRepository.getWalletItemList (cognitive 18) · ×1
  • WalletRepository.getWalletItemList (cognitive 18) lib/repository/realm/wallet_repository.dart:33 — WalletRepository.getWalletItemList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _BitBox02ConnectScreenState._buildPrimaryActionButton (cognitive 18) · ×1
  • _BitBox02ConnectScreenState._buildPrimaryActionButton (cognitive 18) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:338 — _BitBox02ConnectScreenState._buildPrimaryActionButton has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _TrezorBleConnectScreenState._buildPrimaryActionButton (cognitive 18) · ×1
  • _TrezorBleConnectScreenState._buildPrimaryActionButton (cognitive 18) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:553 — _TrezorBleConnectScreenState._buildPrimaryActionButton has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _SendScreenState._getScrollableHeight (cognitive 18) · ×1
  • _SendScreenState._getScrollableHeight (cognitive 18) lib/screens/send/send_screen.dart:2683 — _SendScreenState._getScrollableHeight has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LabelExportScreenState._onExportButtonPressed (cognitive 18) · ×1
  • _LabelExportScreenState._onExportButtonPressed (cognitive 18) lib/screens/settings/tools/bip329/label_export_screen.dart:469 — _LabelExportScreenState._onExportButtonPressed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletDetailCardCarouselState.build (cognitive 18) · ×1
  • _WalletDetailCardCarouselState.build (cognitive 18) lib/screens/wallet_detail/card_detail/wallet_detail_card_carousel.dart:155 — _WalletDetailCardCarouselState.build has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _ShowVaultSelectWalletBottomSheetState._selectWallet (cognitive 18) · ×1
  • _ShowVaultSelectWalletBottomSheetState._selectWallet (cognitive 18) lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:177 — _ShowVaultSelectWalletBottomSheetState._selectWallet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UtxoMergeScreenState._scheduleBottomSheetOpen (cognitive 18) · ×1
  • _UtxoMergeScreenState._scheduleBottomSheetOpen (cognitive 18) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:489 — _UtxoMergeScreenState._scheduleBottomSheetOpen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ManualSplitListItemState.build (cognitive 18) · ×1
  • _ManualSplitListItemState.build (cognitive 18) lib/screens/wallet_detail/utxo_split_screen.dart:2028 — _ManualSplitListItemState.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 4, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeGridLayout.moveToCell (cognitive 18) · ×1
  • HomeGridLayout.moveToCell (cognitive 18) lib/services/home/home_grid_layout.dart:155 — HomeGridLayout.moveToCell has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BbQrDecoder.receivePart (cognitive 18) · ×1
  • BbQrDecoder.receivePart (cognitive 18) lib/utils/bb_qr/bb_qr_decoder.dart:25 — BbQrDecoder.receivePart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionIntentValidator.validate (cognitive 18) · ×1
  • TransactionIntentValidator.validate (cognitive 18) lib/utils/transaction_intent_validator.dart:56 — TransactionIntentValidator.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainActivity.configureFlutterEngine (cognitive 18) · ×1
  • MainActivity.configureFlutterEngine (cognitive 18) android/app/src/main/kotlin/onl/coconut/wallet/MainActivity.kt:36 — MainActivity.configureFlutterEngine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CpfpBuilder.getBaselineTransaction (cognitive 17) · ×1
  • CpfpBuilder.getBaselineTransaction (cognitive 17) lib/core/transaction/fee_bumping/cpfp_builder.dart:138 — CpfpBuilder.getBaselineTransaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeProvider._refreshUntilSettled (cognitive 17) · ×1
  • NodeProvider._refreshUntilSettled (cognitive 17) lib/providers/node_provider/node_provider.dart:698 — NodeProvider._refreshUntilSettled has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionSyncService._processFetchedTransactionsAndUpdateUtxos (cognitive 17) · ×1
  • TransactionSyncService._processFetchedTransactionsAndUpdateUtxos (cognitive 17) lib/providers/node_provider/transaction/transaction_sync_service.dart:224 — TransactionSyncService._processFetchedTransactionsAndUpdateUtxos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PriceProvider.initWebSocketService (cognitive 17) · ×1
  • PriceProvider.initWebSocketService (cognitive 17) lib/providers/price_provider.dart:103 — PriceProvider.initWebSocketService has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeConnectionStatusViewModel.networkStatus (cognitive 17) · ×1
  • HomeConnectionStatusViewModel.networkStatus (cognitive 17) lib/providers/view_model/home/home_connection_status_view_model.dart:106 — HomeConnectionStatusViewModel.networkStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SelectWalletViewModel.toggleLayout (cognitive 17) · ×1
  • SelectWalletViewModel.toggleLayout (cognitive 17) lib/providers/view_model/send/select_wallet_view_model.dart:88 — SelectWalletViewModel.toggleLayout has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (5 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SendViewModel.toggleUnit (cognitive 17) · ×1
  • SendViewModel.toggleUnit (cognitive 17) lib/providers/view_model/send/send_view_model.dart:853 — SendViewModel.toggleUnit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitBox02ConnectViewModel.retrieveXPub (cognitive 17) · ×1
  • BitBox02ConnectViewModel.retrieveXPub (cognitive 17) lib/providers/view_model/wallet_add/connected/bitbox02_connect_viewmodel.dart:226 — BitBox02ConnectViewModel.retrieveXPub has cognitive complexity 17 (threshold 15). Drivers by points: error handling 2 (6 pts), ternaries 3 (6 pts), if/else 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HotWalletRestoreViewModel.restore (cognitive 17) · ×1
  • HotWalletRestoreViewModel.restore (cognitive 17) lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart:276 — HotWalletRestoreViewModel.restore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (5 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoMergeViewModel.mergeRecommendationLevelAndInfo (cognitive 17) · ×1
  • UtxoMergeViewModel.mergeRecommendationLevelAndInfo (cognitive 17) lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:603 — UtxoMergeViewModel.mergeRecommendationLevelAndInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoMergeViewModel.prepareMergeTransaction (cognitive 17) · ×1
  • UtxoMergeViewModel.prepareMergeTransaction (cognitive 17) lib/providers/view_model/wallet_detail/utxo_merge/utxo_merge_view_model.dart:796 — UtxoMergeViewModel.prepareMergeTransaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoSplitViewModel.isSplitValid (cognitive 17) · ×1
  • UtxoSplitViewModel.isSplitValid (cognitive 17) lib/providers/view_model/wallet_detail/utxo_split/utxo_split_view_model.dart:524 — UtxoSplitViewModel.isSplitValid has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PinCheckScreenState._verifyPin (cognitive 17) · ×1
  • _PinCheckScreenState._verifyPin (cognitive 17) lib/screens/common/pin_check_screen.dart:89 — _PinCheckScreenState._verifyPin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _QrWithCopyTextScreenState.build (cognitive 17) · ×1
  • _QrWithCopyTextScreenState.build (cognitive 17) lib/screens/common/qr_with_copy_text_screen.dart:216 — _QrWithCopyTextScreenState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 5, boolean chains 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · UtxoTagChart._computeTagSegmentsForDonut (cognitive 17) · ×1
  • UtxoTagChart._computeTagSegmentsForDonut (cognitive 17) lib/screens/wallet_detail/utxo_overview/utxo_tag_chart.dart:56 — UtxoTagChart._computeTagSegmentsForDonut has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UtxoSplitScreenState._syncHeaderAnimation (cognitive 17) · ×1
  • _UtxoSplitScreenState._syncHeaderAnimation (cognitive 17) lib/screens/wallet_detail/utxo_split_screen.dart:286 — _UtxoSplitScreenState._syncHeaderAnimation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _UtxoSplitScreenState._buildApplyButton (cognitive 17) · ×1
  • _UtxoSplitScreenState._buildApplyButton (cognitive 17) lib/screens/wallet_detail/utxo_split_screen.dart:643 — _UtxoSplitScreenState._buildApplyButton has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 3 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _WalletDetailScreenState._buildTargetCard (cognitive 17) · ×1
  • _WalletDetailScreenState._buildTargetCard (cognitive 17) lib/screens/wallet_detail/wallet_detail_screen.dart:296 — _WalletDetailScreenState._buildTargetCard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5, boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FiatAmountInputFormatter.formatEditUpdate (cognitive 17) · ×1
  • FiatAmountInputFormatter.formatEditUpdate (cognitive 17) lib/utils/numeric_input_formatters.dart:105 — FiatAmountInputFormatter.formatEditUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtxoSummaryView.build (cognitive 17) · ×1
  • UtxoSummaryView.build (cognitive 17) lib/widgets/features/home/widgets/utxo_summary_view.dart:34 — UtxoSummaryView.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LongPressedMenuWidgetState.didChangeDependencies (cognitive 17) · ×1
  • LongPressedMenuWidgetState.didChangeDependencies (cognitive 17) lib/widgets/features/wallet/menu/long_pressed_menu_widget.dart:166 — LongPressedMenuWidgetState.didChangeDependencies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultisigNormalizer.fromCoordinatorResult (cognitive 16) · ×1
  • MultisigNormalizer.fromCoordinatorResult (cognitive 16) lib/core/bip/129/multisig_normalizer.dart:9 — MultisigNormalizer.fromCoordinatorResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RbfBuilder._tryWithChangeOutput (cognitive 16) · ×1
  • RbfBuilder._tryWithChangeOutput (cognitive 16) lib/core/transaction/fee_bumping/rbf_builder.dart:384 — RbfBuilder._tryWithChangeOutput has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IsolateController.executeNetworkCommand (cognitive 16) · ×1
  • IsolateController.executeNetworkCommand (cognitive 16) lib/providers/node_provider/isolate/isolate_controller.dart:33 — IsolateController.executeNetworkCommand has cognitive complexity 16 (threshold 15). Drivers by points: loops 2 (6 pts), error handling 2 (4 pts), if/else 1 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HotWalletCreateViewModel.createWallet (cognitive 16) · ×1
  • HotWalletCreateViewModel.createWallet (cognitive 16) lib/providers/view_model/wallet_add/hot_wallet_create_view_model.dart:84 — HotWalletCreateViewModel.createWallet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 3 (6 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletInfoViewModel.getTaprootParticipants (cognitive 16) · ×1
  • WalletInfoViewModel.getTaprootParticipants (cognitive 16) lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:214 — WalletInfoViewModel.getTaprootParticipants has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · UtxoRepository.applyInheritedTags (cognitive 16) · ×1
  • UtxoRepository.applyInheritedTags (cognitive 16) lib/repository/realm/utxo_repository.dart:47 — UtxoRepository.applyInheritedTags has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HotWalletCreateScreenState._buildAdvancedSettings (cognitive 16) · ×1
  • _HotWalletCreateScreenState._buildAdvancedSettings (cognitive 16) lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:288 — _HotWalletCreateScreenState._buildAdvancedSettings has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 2, if/else 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _SendScreenState._buildFinalButton (cognitive 16) · ×1
  • _SendScreenState._buildFinalButton (cognitive 16) lib/screens/send/send_screen.dart:1217 — _SendScreenState._buildFinalButton has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AppSettingsScreen.build (cognitive 16) · ×1
  • _AppSettingsScreen.build (cognitive 16) lib/screens/settings/app_settings/app_settings_screen.dart:223 — _AppSettingsScreen.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2, boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _AddressListScreenState._showSegmentTooltip (cognitive 16) · ×1
  • _AddressListScreenState._showSegmentTooltip (cognitive 16) lib/screens/wallet_detail/address_list_screen.dart:383 — _AddressListScreenState._showSegmentTooltip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _TransactionDetailScreenState._pendingWidget (cognitive 16) · ×1
  • _TransactionDetailScreenState._pendingWidget (cognitive 16) lib/screens/wallet_detail/transaction_detail_screen.dart:410 — _TransactionDetailScreenState._pendingWidget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5, boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _TransactionFeeBumpingScreenState.build (cognitive 16) · ×1
  • _TransactionFeeBumpingScreenState.build (cognitive 16) lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:88 — _TransactionFeeBumpingScreenState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _UtxoListState._isListChanged (cognitive 16) · ×1
  • _UtxoListState._isListChanged (cognitive 16) lib/screens/wallet_detail/utxo_overview/utxo_list.dart:300 — _UtxoListState._isListChanged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoconutAppBar.build (cognitive 16) · ×1
  • CoconutAppBar.build (cognitive 16) lib/ui/coconut/coconut_app_bar.dart:16 — CoconutAppBar.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CoconutPulldownMenu.build (cognitive 16) · ×1
  • CoconutPulldownMenu.build (cognitive 16) lib/ui/coconut/coconut_pulldown_menu.dart:91 — CoconutPulldownMenu.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BbQrEncoder.encode (cognitive 16) · ×1
  • BbQrEncoder.encode (cognitive 16) lib/utils/bb_qr/bb_qr_encoder.dart:37 — BbQrEncoder.encode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BtcAmountInputFormatter.formatEditUpdate (cognitive 16) · ×1
  • BtcAmountInputFormatter.formatEditUpdate (cognitive 16) lib/utils/numeric_input_formatters.dart:49 — BtcAmountInputFormatter.formatEditUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RateInputFormatter.formatEditUpdate (cognitive 16) · ×1
  • RateInputFormatter.formatEditUpdate (cognitive 16) lib/utils/numeric_input_formatters.dart:156 — RateInputFormatter.formatEditUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BalanceByWalletView.build (cognitive 16) · ×1
  • BalanceByWalletView.build (cognitive 16) lib/widgets/features/home/widgets/wallet_widget_views.dart:472 — BalanceByWalletView.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), loops 4, match/switch 1 (2 pts), boolean chains 1, if/else 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DonutPainter.paint (cognitive 16) · ×1
  • _DonutPainter.paint (cognitive 16) lib/widgets/features/home/widgets/wallet_widget_views.dart:669 — _DonutPainter.paint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BbQrScanDataHandler.joinData (cognitive 16) · ×1
  • BbQrScanDataHandler.joinData (cognitive 16) lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:35 — BbQrScanDataHandler.joinData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TransactionInputOutputCard.build (cognitive 16) · ×1
  • _TransactionInputOutputCard.build (cognitive 16) lib/widgets/features/transaction/card/transaction_input_output_card.dart:176 — _TransactionInputOutputCard.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (92 shared lines) · ×1
  • Near-duplicate member pair (92 shared lines) lib/screens/send/connected/bitbox02_sign_screen.dart:149 — lib/screens/send/connected/bitbox02_sign_screen.dart:149-279 | lib/screens/send/connected/trezor_sign_screen.dart:166-292 — These two members are variants of one another: 92 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) lib/screens/send/send_confirm_screen.dart:452 — lib/screens/send/send_confirm_screen.dart:452-574 | lib/screens/send/send_screen.dart:926-1045 — These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (32 shared lines) · ×1
  • Near-duplicate member pair (32 shared lines) lib/utils/numeric_input_formatters.dart:49 — lib/utils/numeric_input_formatters.dart:49-93 | lib/utils/numeric_input_formatters.dart:105-144 — These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:449 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:449-488 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:419-455 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (21 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (21 members, 50+ identical tokens) ios/Runner/Bitbox02MethodHandler.swift:121 — ios/Runner/Bitbox02MethodHandler.swift:121-138 | ios/Runner/Bitbox02MethodHandler.swift:140-168 | ios/Runner/Bitbox02MethodHandler.swift:189-220 | ios/Runner/Bitbox02MethodHandler.swift:222-239 | ios/Runner/Bitbox02MethodHandler.swift:241-262 | ios/Runner/Bitbox02MethodHandler.swift:264-285 | ios/Runner/Bitbox02MethodHandler.swift:287-315 | ios/Runner/Bitbox02MethodHandler.swift:317-330 | ios/Runner/Bitbox02MethodHandler.swift:358-371 | ios/Runner/Bitbox02MethodHandler.swift:373-387 | ios/Runner/Bitbox02MethodHandler.swift:389-404 | ios/Runner/Bitbox02MethodHandler.swift:406-424 | ios/Runner/Bitbox02MethodHandler.swift:426-440 | ios/Runner/Bitbox02MethodHandler.swift:442-459 | ios/Runner/Bitbox02MethodHandler.swift:461-479 | ios/Runner/TrezorMethodHandler.swift:153-177 | ios/Runner/TrezorMethodHandler.swift:180-202 | ios/Runner/TrezorMethodHandler.swift:205-229 | ios/Runner/TrezorMethodHandler.swift:232-255 | ios/Runner/TrezorMethodHandler.swift:285-307 | ios/Runner/TrezorMethodHandler.swift:343-359 — These 21 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 21 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 21 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) ios/Runner/TrezorMethodHandler.swift:153 — ios/Runner/TrezorMethodHandler.swift:153-177 | ios/Runner/TrezorMethodHandler.swift:180-202 | ios/Runner/TrezorMethodHandler.swift:205-229 | ios/Runner/TrezorMethodHandler.swift:232-255 | ios/Runner/TrezorMethodHandler.swift:258-282 | ios/Runner/TrezorMethodHandler.swift:285-307 | ios/Runner/TrezorMethodHandler.swift:310-340 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lib/screens/settings/tools/bip329/label_export_screen.dart:404 — lib/screens/settings/tools/bip329/label_export_screen.dart:404-424 | lib/screens/settings/tools/bip329/label_import_screen.dart:264-284 | lib/screens/settings/tools/bip329/label_management_screen.dart:136-170 | lib/screens/settings/tools/bip329/label_management_screen.dart:255-305 | lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:164-204 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/ccos/coconut_open_store_build_scene.dart:62 — lib/screens/ccos/coconut_open_store_build_scene.dart:62-208 | lib/screens/ccos/coconut_open_store_contribute_screen.dart:323-347 | lib/screens/ccos/coconut_open_store_discover_screen.dart:432-462 | lib/screens/ccos/coconut_open_store_idea_scene.dart:395-419 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (161 corresponding lines) · ×1
  • Edited copy of a member (161 corresponding lines) lib/design_system/tokens/coconut_colors.dart:801 — lib/design_system/tokens/coconut_colors.dart:801-961 | lib/design_system/tokens/coconut_colors.dart:963-1124 — These two members are one piece of code written twice and then edited apart: 161 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (108 corresponding lines) · ×1
  • Edited copy of a member (108 corresponding lines) lib/core/transaction/transaction_builder.dart:269 — lib/core/transaction/transaction_builder.dart:269-376 | lib/core/transaction/transaction_builder.dart:378-488 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (97 corresponding lines) · ×1
  • Edited copy of a member (97 corresponding lines) lib/widgets/features/utxo/card/locked_utxo_item_card.dart:33 — lib/widgets/features/utxo/card/locked_utxo_item_card.dart:33-129 | lib/widgets/features/utxo/card/selectable_utxo_item_card.dart:46-169 — These two members are one piece of code written twice and then edited apart: 97 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 75+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 75+ corresponding lines) lib/screens/home/wallet_list_user_experience_survey_bottom_sheet.dart:17 — lib/screens/home/wallet_list_user_experience_survey_bottom_sheet.dart:17-108 | lib/screens/review/negative_feedback_screen.dart:31-105 | lib/screens/review/positive_feedback_screen.dart:28-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 75 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) lib/screens/home/wallet_stack_list_screen.dart:556 — lib/screens/home/wallet_stack_list_screen.dart:556-620 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:179-246 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (71 corresponding lines) · ×1
  • Edited copy of a member (71 corresponding lines) lib/screens/settings/app_settings/network/electrum_server_screen.dart:555 — lib/screens/settings/app_settings/network/electrum_server_screen.dart:555-631 | lib/screens/settings/app_settings/network/electrum_server_screen.dart:633-703 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:338 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:338-399 | lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:553-623 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (81 corresponding lines) · ×1
  • Edited copy of a member (81 corresponding lines) lib/screens/ccos/coconut_open_store_contribute_screen.dart:57 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:57-137 | lib/screens/ccos/coconut_open_store_idea_scene.dart:39-120 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:302 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:302-367 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:267-332 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) lib/screens/send/send_screen.dart:1401 — lib/screens/send/send_screen.dart:1401-1456 | lib/widgets/features/utxo/bottom_sheet/estimated_fee_bottom_sheet.dart:235-295 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:45 — lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:45-89 | lib/screens/wallet_detail/move_to_vault_bottom_sheets.dart:96-145 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) lib/screens/wallet_detail/transaction_list_screen.dart:505 — lib/screens/wallet_detail/transaction_list_screen.dart:505-548 | lib/screens/wallet_detail/utxo_overview/utxo_list.dart:256-295 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) lib/core/bip/129/multisig_normalizer.dart:171 — lib/core/bip/129/multisig_normalizer.dart:171-212 | lib/core/bip/129/multisig_normalizer.dart:214-250 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) lib/screens/ccos/coconut_open_store_intro_screen.dart:263 — lib/screens/ccos/coconut_open_store_intro_screen.dart:263-314 | lib/screens/ccos/coconut_open_store_intro_screen.dart:316-345 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) lib/screens/ccos/coconut_open_store_intro_screen.dart:119 — lib/screens/ccos/coconut_open_store_intro_screen.dart:119-153 | lib/screens/settings/theme_bottom_sheet.dart:93-130 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:951 — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:951-989 | lib/screens/wallet_detail/wallet_detail_screen.dart:820-857 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 41+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 41+ corresponding lines) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:117 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:117-157 | lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:258-300 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:202-249 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 37+ corresponding lines) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:159 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:159-198 | lib/screens/send/connected/bitbox02_sign_screen.dart:96-132 | lib/screens/send/connected/trezor_sign_screen.dart:112-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) lib/screens/settings/tools/bip329/label_management_screen.dart:172 — lib/screens/settings/tools/bip329/label_management_screen.dart:172-196 | lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:430-454 | lib/screens/wallet_detail/utxo_detail_screen.dart:246-270 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:300 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:300-313 | lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:527-551 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:457-470 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) lib/screens/wallet_detail/transaction_list_screen.dart:231 — lib/screens/wallet_detail/transaction_list_screen.dart:231-257 | lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:298-323 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) go/bridge.go:249 — go/bridge.go:249-278 | go/bridge.go:281-310 | go/bridge.go:404-435 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:148 — lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:148-164 | lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:166-180 | lib/providers/view_model/wallet_detail/coordinator_bsms_qr_view_model.dart:182-196 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) lib/repository/realm/wallet_preferences_repository.dart:17 — lib/repository/realm/wallet_preferences_repository.dart:17-30 | lib/repository/realm/wallet_preferences_repository.dart:37-49 | lib/repository/realm/wallet_preferences_repository.dart:56-68 | lib/repository/realm/wallet_preferences_repository.dart:76-89 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 15+ corresponding lines) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:232 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:232-246 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:248-262 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:364-378 | android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:695-712 | android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:717-733 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 14+ corresponding lines) android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:164 — android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:164-177 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:179-192 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:194-207 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:217-230 | android/app/src/main/kotlin/onl/coconut/wallet/Bitbox02MethodHandler.kt:380-395 | android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:675-690 | android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:766-781 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) lib/services/hardware_wallet/bitbox02_device.dart:113 — lib/services/hardware_wallet/bitbox02_device.dart:113-123 | lib/services/hardware_wallet/bitbox02_device.dart:285-295 | lib/services/hardware_wallet/trezor_device.dart:229-239 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) lib/core/bip/129/multisig_normalizer.dart:387 — lib/core/bip/129/multisig_normalizer.dart:387-394 | lib/model/wallet/taproot_script_path_seed_info.dart:29-35 | lib/screens/wallet_detail/transaction_list_screen.dart:495-503 | lib/widgets/features/home/widgets/home_widget_parts.dart:622-628 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:107 — lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:107-118 | lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:120-131 | lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:133-148 | lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:150-159 | lib/providers/view_model/wallet_add/air-gapped/wallet_add_scanner_view_model.dart:161-168 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) lib/providers/view_model/home/home_widgets_view_model.dart:375 — lib/providers/view_model/home/home_widgets_view_model.dart:375-379 | lib/providers/view_model/home/wallet_stack_list_view_model.dart:73-77 | lib/providers/view_model/wallet_detail/wallet_info_view_model.dart:173-177 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) lib/screens/ccos/coconut_open_store_first_pow_scene.dart:1758 — lib/screens/ccos/coconut_open_store_first_pow_scene.dart:1758-1767 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1481-1489 | lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:43-51 | lib/widgets/features/home/all_features_hint.dart:43-51 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) lib/screens/ccos/coconut_open_store_contribute_screen.dart:225 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:225-228 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:582-585 | lib/screens/ccos/coconut_open_store_intro_screen.dart:1114-1117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 5+ corresponding lines) lib/screens/wallet_detail/wallet_detail_screen.dart:1148 — lib/screens/wallet_detail/wallet_detail_screen.dart:1148-1153 | lib/widgets/common/text/animated_dots_text.dart:16-20 | lib/widgets/features/wallet/address/address_list_address_item_card.dart:126-130 | lib/widgets/wallet_balance_history_chart.dart:63-67 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:418 — lib/providers/view_model/wallet_detail/transaction_detail_view_model.dart:418-493 | lib/providers/view_model/wallet_detail/utxo_detail_view_model.dart:160-235 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) lib/screens/send/connected/bitbox02_sign_screen.dart:222 — lib/screens/send/connected/bitbox02_sign_screen.dart:222-279 | lib/screens/send/connected/trezor_sign_screen.dart:235-292 — before extracting anything, compare `lib/screens/send/connected/bitbox02_sign_screen.dart` and `lib/screens/send/connected/trezor_sign_screen.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/send/connected/bitbox02_sign_screen.dart:222` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `BitBox02SignViewModel` in one and `TrezorSignViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:671 — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:671-709 | lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:717-754 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:671` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) lib/widgets/features/utxo/card/locked_utxo_item_card.dart:88 — lib/widgets/features/utxo/card/locked_utxo_item_card.dart:88-119 | lib/widgets/features/utxo/card/selectable_utxo_item_card.dart:126-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/utxo/card/locked_utxo_item_card.dart:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) lib/providers/view_model/send/utxo_selection_view_model.dart:226 — lib/providers/view_model/send/utxo_selection_view_model.dart:226-254 | lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart:272-300 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:494 — lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:494-519 | lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:536-564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/ccos/card/coconut_open_store_intro_card.dart:494` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:452 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:452-477 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:421-446 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `vm` to `TrezorBleConnectViewModel` in one and `TrezorUsbConnectViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) lib/core/bip/129/multisig_normalizer.dart:91 — lib/core/bip/129/multisig_normalizer.dart:91-112 | lib/core/bip/129/multisig_normalizer.dart:183-204 | lib/core/bip/129/multisig_normalizer.dart:222-243 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/core/bip/129/multisig_normalizer.dart:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:530 — lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:530-550 | lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:561-580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_bucket_card_row.dart:530` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:138 — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:138-157 | lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:281-300 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:230-249 — before extracting anything, compare `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:138` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:302 — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:302-321 | lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart:267-286 — before extracting anything, compare `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart` and `lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) lib/screens/ccos/coconut_open_store_contribute_screen.dart:330 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:330-347 | lib/screens/ccos/coconut_open_store_discover_screen.dart:445-462 | lib/screens/ccos/coconut_open_store_idea_scene.dart:402-419 — before extracting anything, compare `lib/screens/ccos/coconut_open_store_contribute_screen.dart` and `lib/screens/ccos/coconut_open_store_idea_scene.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_contribute_screen.dart:330` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) lib/screens/ccos/coconut_open_store_intro_screen.dart:122 — lib/screens/ccos/coconut_open_store_intro_screen.dart:122-139 | lib/screens/settings/theme_bottom_sheet.dart:97-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_intro_screen.dart:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) lib/screens/common/qr_with_copy_text_screen.dart:280 — lib/screens/common/qr_with_copy_text_screen.dart:280-294 | lib/screens/settings/tools/p2p_calculator_screen.dart:468-483 | lib/screens/wallet_detail/wallet_detail_receive_address_screen.dart:144-158 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/common/qr_with_copy_text_screen.dart:280` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:284 — lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:284-298 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:325-339 | lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:366-380 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart:284` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) lib/widgets/features/utxo/card/locked_utxo_item_card.dart:40 — lib/widgets/features/utxo/card/locked_utxo_item_card.dart:40-53 | lib/widgets/features/utxo/card/selectable_utxo_item_card.dart:83-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/utxo/card/locked_utxo_item_card.dart:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:639 — lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:639-652 | lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:750-762 | lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:1065-1078 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/wallet_detail/utxo_overview/utxo_overview_screen.dart:639` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 3) · ×1
  • Duplicated block (11–13 lines × 3) lib/screens/settings/tools/bip329/label_export_screen.dart:408 — lib/screens/settings/tools/bip329/label_export_screen.dart:408-418 | lib/screens/settings/tools/bip329/label_import_screen.dart:268-278 | lib/screens/settings/tools/bip329/label_management_screen.dart:138-150 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_export_screen.dart` and `lib/screens/settings/tools/bip329/label_import_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/bip329/label_export_screen.dart:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) lib/utils/numeric_input_formatters.dart:63 — lib/utils/numeric_input_formatters.dart:63-75 | lib/utils/numeric_input_formatters.dart:118-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/utils/numeric_input_formatters.dart:63` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) lib/screens/ccos/coconut_open_store_first_pow_scene.dart:660 — lib/screens/ccos/coconut_open_store_first_pow_scene.dart:660-671 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:1196-1207 | lib/screens/ccos/coconut_open_store_first_pow_scene.dart:1279-1290 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_first_pow_scene.dart:660` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–11 lines × 4) · ×1
  • Duplicated block (8–11 lines × 4) lib/screens/ccos/coconut_open_store_contribute_screen.dart:76 — lib/screens/ccos/coconut_open_store_contribute_screen.dart:76-83 | lib/screens/ccos/coconut_open_store_contribute_screen.dart:84-94 | lib/screens/ccos/coconut_open_store_contribute_screen.dart:95-105 | lib/screens/ccos/coconut_open_store_contribute_screen.dart:107-117 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_contribute_screen.dart:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 5) · ×1
  • Duplicated block (9–10 lines × 5) lib/screens/settings/tools/bip329/label_export_screen.dart:408 — lib/screens/settings/tools/bip329/label_export_screen.dart:408-416 | lib/screens/settings/tools/bip329/label_import_screen.dart:268-276 | lib/screens/settings/tools/bip329/label_management_screen.dart:138-146 | lib/screens/settings/tools/bip329/label_management_screen.dart:262-271 | lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:167-175 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_export_screen.dart` and `lib/screens/settings/tools/bip329/label_import_screen.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/bip329/label_export_screen.dart:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:239 — lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:239-248 | lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:408-416 | lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:468-477 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/wallet/connect/wallet_connect_widgets.dart:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) lib/screens/settings/tools/glossary_screen.dart:370 — lib/screens/settings/tools/glossary_screen.dart:370-378 | lib/screens/settings/tools/glossary_screen.dart:384-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/glossary_screen.dart:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) lib/screens/ccos/coconut_open_store_build_scene.dart:138 — lib/screens/ccos/coconut_open_store_build_scene.dart:138-146 | lib/screens/ccos/coconut_open_store_build_scene.dart:176-184 | lib/screens/ccos/coconut_open_store_contribute_screen.dart:331-339 | lib/screens/ccos/coconut_open_store_discover_screen.dart:446-454 | lib/screens/ccos/coconut_open_store_idea_scene.dart:403-411 — before extracting anything, compare `lib/screens/ccos/coconut_open_store_contribute_screen.dart` and `lib/screens/ccos/coconut_open_store_idea_scene.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/ccos/coconut_open_store_build_scene.dart:138` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) lib/screens/common/tag_apply_bottom_sheet.dart:435 — lib/screens/common/tag_apply_bottom_sheet.dart:435-443 | lib/screens/common/tag_select_bottom_sheet.dart:196-202 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/common/tag_apply_bottom_sheet.dart:435` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:524 — lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:524-531 | lib/screens/send/air-gapped/signed_psbt_scanner_screen.dart:232-239 | lib/screens/send/air-gapped/unsigned_transaction_qr_screen.dart:207-214 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_add/air-gapped/airgap_wallet_add_scanner_screen.dart:524` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–8 lines × 3) · ×1
  • Duplicated block (6–8 lines × 3) lib/widgets/features/home/widgets/activity_widget_views.dart:419 — lib/widgets/features/home/widgets/activity_widget_views.dart:419-426 | lib/widgets/features/home/widgets/activity_widget_views.dart:428-435 | lib/widgets/features/home/widgets/activity_widget_views.dart:436-441 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/home/widgets/activity_widget_views.dart:419` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/widgets/features/home/widgets/activity_widget_views.dart:419` calls `round` and `lib/widgets/features/home/widgets/activity_widget_views.dart:436` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) lib/widgets/features/home/widgets/home_widget_parts.dart:82 — lib/widgets/features/home/widgets/home_widget_parts.dart:82-89 | lib/widgets/features/home/widgets/home_widget_parts.dart:141-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/widgets/features/home/widgets/home_widget_parts.dart:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) lib/screens/settings/tools/bip329/label_management_screen.dart:182 — lib/screens/settings/tools/bip329/label_management_screen.dart:182-188 | lib/screens/wallet_detail/transaction_fee_bumping_screen.dart:440-446 | lib/screens/wallet_detail/utxo_detail_screen.dart:256-262 — before extracting anything, compare `lib/screens/settings/tools/bip329/label_management_screen.dart` and `lib/screens/wallet_detail/transaction_fee_bumping_screen.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/settings/tools/bip329/label_management_screen.dart:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) lib/screens/home/wallet_stack_list_screen.dart:571 — lib/screens/home/wallet_stack_list_screen.dart:571-576 | lib/widgets/features/wallet/card/wallet_carousel_indicator.dart:196-202 — before extracting anything, compare `lib/screens/home/wallet_stack_list_screen.dart` and `lib/widgets/features/wallet/card/wallet_carousel_indicator.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/screens/home/wallet_stack_list_screen.dart:571` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) ios/Runner/Bitbox02MethodHandler.swift:149 — ios/Runner/Bitbox02MethodHandler.swift:149-168 | ios/Runner/Bitbox02MethodHandler.swift:198-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ios/Runner/Bitbox02MethodHandler.swift:149` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 7) · ×1
  • Duplicated block (11 lines × 7) ios/Runner/TrezorMethodHandler.swift:167 — ios/Runner/TrezorMethodHandler.swift:167-177 | ios/Runner/TrezorMethodHandler.swift:192-202 | ios/Runner/TrezorMethodHandler.swift:219-229 | ios/Runner/TrezorMethodHandler.swift:245-255 | ios/Runner/TrezorMethodHandler.swift:272-282 | ios/Runner/TrezorMethodHandler.swift:297-307 | ios/Runner/TrezorMethodHandler.swift:330-340 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ios/Runner/TrezorMethodHandler.swift:167` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 8) · ×1
  • Duplicated block (6–7 lines × 8) ios/Runner/Bitbox02MethodHandler.swift:122 — ios/Runner/Bitbox02MethodHandler.swift:122-127 | ios/Runner/Bitbox02MethodHandler.swift:141-146 | ios/Runner/Bitbox02MethodHandler.swift:190-195 | ios/Runner/Bitbox02MethodHandler.swift:223-228 | ios/Runner/Bitbox02MethodHandler.swift:443-448 | ios/Runner/TrezorMethodHandler.swift:181-187 | ios/Runner/TrezorMethodHandler.swift:286-292 | ios/Runner/TrezorMethodHandler.swift:344-349 — there are 8 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ios/Runner/Bitbox02MethodHandler.swift:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 21) · ×1
  • Duplicated block (5 lines × 21) ios/Runner/Bitbox02MethodHandler.swift:122 — ios/Runner/Bitbox02MethodHandler.swift:122-126 | ios/Runner/Bitbox02MethodHandler.swift:141-145 | ios/Runner/Bitbox02MethodHandler.swift:190-194 | ios/Runner/Bitbox02MethodHandler.swift:223-227 | ios/Runner/Bitbox02MethodHandler.swift:242-246 | ios/Runner/Bitbox02MethodHandler.swift:265-269 | ios/Runner/Bitbox02MethodHandler.swift:288-292 | ios/Runner/Bitbox02MethodHandler.swift:318-322 | ios/Runner/Bitbox02MethodHandler.swift:359-363 | ios/Runner/Bitbox02MethodHandler.swift:374-378 | ios/Runner/Bitbox02MethodHandler.swift:390-394 | ios/Runner/Bitbox02MethodHandler.swift:407-411 | ios/Runner/Bitbox02MethodHandler.swift:427-431 | ios/Runner/Bitbox02MethodHandler.swift:443-447 | ios/Runner/Bitbox02MethodHandler.swift:462-466 | ios/Runner/TrezorMethodHandler.swift:154-158 | ios/Runner/TrezorMethodHandler.swift:181-185 | ios/Runner/TrezorMethodHandler.swift:206-210 | ios/Runner/TrezorMethodHandler.swift:233-237 | ios/Runner/TrezorMethodHandler.swift:286-290 | ios/Runner/TrezorMethodHandler.swift:344-348 — there are 21 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 21 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) rust/trezor-bridge/src/lib.rs:105 — rust/trezor-bridge/src/lib.rs:105-130 | rust/trezor-bridge/src/lib.rs:158-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rust/trezor-bridge/src/lib.rs:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) rust/trezor-bridge/src/lib.rs:549 — rust/trezor-bridge/src/lib.rs:549-561 | rust/trezor-bridge/src/lib.rs:647-658 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity web/index.html:42 — `https://cdn.jsdelivr.net/npm/jsqr@1.3.1/dist/jsQR.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session.
Minor — 78 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:395 — `!(widget.connectionMode == HardwareWalletConnectMode.reconnect && isPaired && !hasXpub) && !_isAddingWallet && !vm.isConnecting` appears character-identically in 2 files — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart, lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/send/send_screen.dart:1341 — `!MediaQuery.disableAnimationsOf(context) && !MediaQuery.accessibleNavigationOf(context)` appears character-identically in 2 files — lib/screens/send/send_screen.dart, lib/widgets/features/wallet/connect/wallet_connect_widgets.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/widgets/features/home/widgets/wallet_widget_views.dart:144 — `!_controller.hasClients || _pageCount < 2` appears character-identically in 2 files — lib/widgets/features/home/widgets/wallet_widget_views.dart, lib/widgets/features/wallet/card/wallet_carousel_indicator.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_stack_list_screen.dart:161 — `!_indicatorAutoMode && !_canRepeatIndicator` appears character-identically in 2 files — lib/screens/home/wallet_stack_list_screen.dart, lib/widgets/features/wallet/card/wallet_carousel_indicator.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart:143 — `!_needsRevalidation || !mounted || !widget.isActive` appears character-identically in 2 files — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen.dart, lib/screens/wallet_detail/utxo_split_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_add/wallet_add_dialog.dart:322 — `!await WalletAddActions.prepareHotWallet(context, restore: restore) || !context.mounted` appears character-identically in 3 files — lib/screens/home/wallet_add/wallet_add_dialog.dart, lib/services/feature/builtin_features.dart, lib/widgets/features/wallet/add/wallet_add_options.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart:140 — `!mounted || !_scrollController.hasClients` appears character-identically in 4 files — lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart, lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart, lib/screens/wallet_detail/transaction_list_screen.dart, lib/widgets/features/send/vault_receiving_address_field.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/settings/tools/bip329/label_export_screen.dart:548 — `!mounted || _successCardHeight == size.height` appears character-identically in 2 files — lib/screens/settings/tools/bip329/label_export_screen.dart, lib/screens/settings/tools/bip329/label_import_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart:917 — `!mounted || receivingVaultWalletId == null` appears character-identically in 2 files — lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart, lib/screens/wallet_detail/wallet_detail_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/common/qr_with_copy_text_screen.dart:270 — `!mounted || result == null || !result.didEdit` appears character-identically in 2 files — lib/screens/common/qr_with_copy_text_screen.dart, lib/screens/wallet_detail/wallet_detail_receive_address_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_animations.dart:64 — `!mounted || token != _headerAnimationNonce` appears character-identically in 2 files — lib/screens/wallet_detail/utxo_merge/utxo_merge_screen_animations.dart, lib/screens/wallet_detail/utxo_split_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart:48 — `!receivePartResult && validateFormat(data)` appears character-identically in 2 files — lib/widgets/features/qr/animated_qr/scan_data_handler/bb_qr_scan_data_handler.dart, lib/widgets/features/qr/animated_qr/scan_data_handler/bc_ur_qr_scan_data_handler.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart:249 — `(widget.connectionMode != HardwareWalletConnectMode.addWallet) && hasXpub && _isWalletMismatch(vm)` appears character-identically in 3 files — lib/screens/home/wallet_add/connected/bitbox02_connect_screen.dart, lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart, lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/app.dart:222 — `MediaQuery.disableAnimationsOf(context) || MediaQuery.accessibleNavigationOf(context)` appears character-identically in 21 files — lib/app.dart, lib/screens/ccos/coconut_open_store_build_scene.dart, lib/screens/ccos/coconut_open_store_first_pow_scene.dart, lib/screens/ccos/coconut_open_store_intro_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:146 — `_disposed || attempt != _connectionAttempt` appears character-identically in 2 files — lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart, lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:126 — `_disposed || device == null || cachedXpub == null || cachedXpub.isEmpty` appears character-identically in 2 files — lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart, lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_stack_list_screen.dart:183 — `_indicatorAutoMode || _canRepeatIndicator` appears character-identically in 2 files — lib/screens/home/wallet_stack_list_screen.dart, lib/widgets/features/wallet/card/wallet_carousel_indicator.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_stack_list_screen.dart:182 — `_indicatorDragDistance == null || !_controller.hasClients || movement == 0` appears character-identically in 2 files — lib/screens/home/wallet_stack_list_screen.dart, lib/widgets/features/wallet/card/wallet_carousel_indicator.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart:97 — `_pairingCodeCompleter != null && !_pairingCodeCompleter!.isCompleted` appears character-identically in 2 files — lib/providers/view_model/wallet_add/connected/trezor_ble_connect_view_model.dart, lib/providers/view_model/wallet_add/connected/trezor_usb_connect_view_model.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/send/broadcasting_screen.dart:116 — `_scrollController.hasClients && _scrollController.offset > 0` appears character-identically in 2 files — lib/screens/send/broadcasting_screen.dart, lib/screens/send/send_confirm_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart:316 — `_usePassphrase && _enterPassphraseWhenSigning` appears character-identically in 2 files — lib/providers/view_model/wallet_add/hot_wallet_restore_view_model.dart, lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart:116 — `_viewModel.isPairingCodeWrong && mounted` appears character-identically in 2 files — lib/screens/home/wallet_add/connected/trezor_ble_connect_screen.dart, lib/screens/home/wallet_add/connected/trezor_usb_connect_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/providers/view_model/send/utxo_selection_view_model.dart:233 — `a.status == UtxoStatus.locked && b.status == UtxoStatus.unspent` appears character-identically in 2 files — lib/providers/view_model/send/utxo_selection_view_model.dart, lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/providers/view_model/send/utxo_selection_view_model.dart:231 — `a.status == UtxoStatus.unspent && b.status == UtxoStatus.locked` appears character-identically in 2 files — lib/providers/view_model/send/utxo_selection_view_model.dart, lib/providers/view_model/wallet_detail/utxo_overview_view_model.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/home/wallet_balance_history_screen.dart:142 — `animation == null || animation.status == AnimationStatus.completed` appears character-identically in 2 files — lib/screens/home/wallet_balance_history_screen.dart, lib/screens/wallet_detail/card_detail/wallet_card_detail_screen.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×7
  • Orphaned file lib/screens/settings/realm_debug_screen.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/providers/view_model/settings/realm_debug_view_model.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/services/model/request/electrum_request_types.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/model/wallet/transaction_record.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/providers/view_model/wallet_detail/address_search_view_model.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file go/config.go:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/providers/transaction_provider.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X7 · Silent fallback defaults · Silent fallback default in catch · ×7
  • Silent fallback default in catch android/app/src/main/kotlin/onl/coconut/wallet/TcpTransport.kt:42 — `write` swallows every exception into `-1` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:924 — `requestPin` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch android/app/src/main/kotlin/onl/coconut/wallet/TrezorMethodHandler.kt:943 — `requestPassphrase` swallows every exception into `"{\"type\":\"cancel\"}"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch lib/ccos/ccos_feature_runtime.dart:121 — `loadActivatedFeatureIds` turns every thrown error into `{}` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/ccos/ccos_feature_runtime.dart:160 — `loadEntitlements` turns every thrown error into `{}` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/repository/shared_preference/wallet_appearance_repository.dart:53 — `_readMap` turns every thrown error into `{}` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/widgets/features/wallet/card/wallet_info_item_card.dart:82 — `_getAccountIndex` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×5
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 21 significant file(s) lose their only recent owner: lib/utils/nfkd_util.dart, lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart, lib/screens/home/wallet_add/hot_wallet/hot_wallet_create_screen.dart, lib/screens/home/wallet_add/hot_wallet/hot_wallet_mnemonic_backup_guide_screen.dart, lib/screens/wallet_detail/transaction_list_screen.dart, lib/widgets/wallet_balance_history_chart.dart, lib/repository/secure_storage/hot_wallet_secret_repository.dart, lib/extensions/widget_animation_extensions.dart (+13 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 19 significant file(s) lose their only recent owner: lib/screens/home/widget_configure_sheet.dart, lib/screens/settings/tools/glossary_screen.dart, lib/providers/view_model/home/home_connection_status_view_model.dart, lib/widgets/features/utxo/card/utxo_list_item_card.dart, lib/ccos/ccos_feature_runtime.dart, lib/widgets/features/home/wallet_onboarding_view.dart, lib/widgets/features/utxo/card/utxo_selection_card.dart, lib/providers/node_provider/resync/wallet_resync_service.dart (+11 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 13 significant file(s) lose their only recent owner: rust/trezor-connect-rs/src/connected_device.rs, rust/trezor-connect-rs/src/transport/callback.rs, rust/trezor-connect-rs/src/transport/bluetooth.rs, rust/trezor-connect-rs/src/transport/usb.rs, rust/trezor-bridge/src/lib.rs, lib/core/transaction/fee_bumping/rbf_builder.dart, lib/providers/view_model/send/connected/trezor_sign_view_model.dart, android/app/src/main/kotlin/onl/coconut/wallet/TrezorUsbManager.kt (+5 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 8 significant file(s) lose their only recent owner: lib/screens/settings/tools/bip329/label_export_screen.dart, lib/screens/settings/tools/bip329/label_import_screen.dart, lib/providers/view_model/settings/label_import_view_model.dart, lib/services/label_file_service.dart, lib/core/bip/329/bip329_converter.dart, lib/providers/view_model/settings/label_export_view_model.dart, lib/widgets/features/bip329/checkbox_card.dart, lib/widgets/features/wallet/taproot/role_description_card.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: lib/services/home/home_grid_layout.dart, lib/widgets/features/home/home_item_draggable.dart, lib/widgets/features/send/tag_inheritance_dialog.dart, lib/analytics/analytics_screen_observer.dart, lib/screens/common/feature_search_focus.dart. Pair on, review, or document these before any departure.
X7 · Silent fallback defaults · Silent fallback default on Err · ×4
  • Silent fallback default on Err rust/trezor-bridge/src/lib.rs:91 — `load_creds_file` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err rust/trezor-bridge/src/lib.rs:149 — `load_creds_file` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err rust/trezor-connect-rs/src/transport/usb.rs:194 — `find_devices` turns every `Err` into `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err rust/trezor-connect-rs/src/transport/mod.rs:33 — `decode_failure_detail` turns every `Err` into `"undecodable Failure".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found rust/trezor-bridge/Cargo.toml:40 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `rust/trezor-bridge/Cargo.toml` makes this repository a deployable product (line 40).
D21 · Naming Consistency · `_setQRViewController` spells `QR` where 15 names in the project spell it `Qr` · ×1
  • `_setQRViewController` spells `QR` where 15 names in the project spell it `Qr` lib/screens/send/air-gapped/signed_psbt_scanner_screen.dart:224 — 15 of 16 names in project repository.screens spell the token `Qr` (15 of 16; unit: names in project repository.screens containing `Qr`). Peers: QrWithCopyTextScreen.showQrEmbedImage (lib/screens/common/qr_with_copy_text_screen.dart:55); QrWithCopyTextScreen.QrWithCopyTextScreen(showQrEmbedImage) (lib/screens/common/qr_with_copy_text_screen.dart:61); _QrWithCopyTextScreenState._currentQrData (lib/screens/common/qr_with_copy_text_screen.dart:125); _HotWalletRestoreViewState._seedQrKey (lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:153); _HotWalletRestoreViewState._seedQrScannerController (lib/screens/home/wallet_add/hot_wallet/hot_wallet_restore_screen.dart:154). Rename to `_setQrViewController`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion Gemfile:1 — `(repository root)` (161228 LoC, 1040 module-visible types across 161 directories) overshoots its size bounds. 1 of 11 build unit(s) (Bundler, Cargo, Go, Gradle, SwiftPM, Xcode, pub) overshoot their size bounds, lowering Project Cohesion to 8.2/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 7 of 524 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 524 of the 862 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: lib/screens/settings/realm_debug_screen.dart, lib/providers/view_model/settings/realm_debug_view_model.dart, lib/services/model/request/electrum_request_types.dart, lib/model/wallet/transaction_record.dart, lib/providers/view_model/wallet_detail/address_search_view_model.dart, lib/providers/transaction_provider.dart, go/config.go. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P1 · CI/CD gates · CI build step not evidenced · ×1
  • CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 4/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `ios`, `macos`, `rust/trezor-bridge`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:4 — No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation REDACTED:5 — `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
X2 · Cancellation propagation · Not all functions that make a request accept a CancelToken · ×1
  • Not all functions that make a request accept a CancelToken — Only 1/11 functions that make a cancellable request (Dio, AbortableRequest) accept a CancelToken or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. Take a `CancelToken? cancelToken` and hand it to the request as `cancelToken:` (or hold one and cancel it in `dispose`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Minor — 2 finding(s)
D12 · Dependency Hygiene · Outdated · ×2
  • Outdated: github.com/btcsuite/btcd — `github.com/btcsuite/btcd` is required at v0.24.2 in REDACTED, but v0.27.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd@v0.27.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd/btcutil/psbt — `github.com/btcsuite/btcd/btcutil/psbt` is required at v1.1.10 in REDACTED, but v1.2.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd/btcutil/psbt@v1.2.0 && go mod tidy` and commit the updated REDACTED and go.sum.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-28493a3cef1e4880a24d4756e8bc83db/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-28493a3cef1e4880a24d4756e8bc83db/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-28493a3cef1e4880a24d4756e8bc83db/history-2.json --exit-code 0 --source .6artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=502" --report-format json --report-path /tmp/watchdog-gitleaks-28493a3cef1e4880a24d4756e8bc83db/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-28493a3cef1e4880a24d4756e8bc83db/tree.json --exit-code 0 --source .6artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude bridge --exclude rust/trezor-connect-rs/src/protos .3artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-b91a6a6f65944bde8a786945cdbb8fe42artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude bridge --exclude rust/trezor-connect-rs/src/protos .1artifacts/raw/semgrep-gdpr.json
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-b91a6a6f65944bde8a786945cdbb8fe40artifacts/raw/osv-scanner.json

Run 01a1e54f-6007-76ea-be7e-5177db7d5c62 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md