Skip to content

chore: backport hotfixes from main - #2491

Merged
ethicnology merged 3 commits into
developfrom
backport/hotfixes-6.12.x
Jul 21, 2026
Merged

chore: backport hotfixes from main#2491
ethicnology merged 3 commits into
developfrom
backport/hotfixes-6.12.x

Conversation

@ethicnology

Copy link
Copy Markdown
Member

No description provided.

@ethicnology ethicnology self-assigned this Jul 21, 2026
@ethicnology
ethicnology merged commit fc51004 into develop Jul 21, 2026
2 of 3 checks passed
@claude

claude Bot commented Jul 21, 2026

Copy link
Copy Markdown

Claude finished @ethicnology's task in 3m 23s —— View job


Code review — backport of 3 hotfixes (already merged)

  • Gather context (diff vs base, read changed files and callers)
  • Review for correctness bugs, security issues, regressions
  • Post review summary

Note: I can't post formal inline review comments (GitHub App limitation), so all findings are collected here with file/line references.

Summary

I reviewed all three backported commits and found no bugs, security issues, or regressions. Both fixes are correct and I verified the surrounding call sites. Two minor, non-blocking observations below.

lib/core/wallet/data/datasources/lwk_facade.dartFileDirectory fix is correct

The LWK cache path (documents/<hexId>) is a directory, so the old File(dbPath).exists() always returned false and delete() unconditionally threw WalletError.notFound — meaning the UpdateOnDifferentStatus self-heal in lwk_wallet_datasource.dart:63-66 and :94-96 never actually wiped the corrupt cache. The fix restores that heal path. I also verified the recursive delete is safely scoped: BDK uses a distinct <hexId>_bdk_dart path (bdk_facade.dart:196) and nothing else in the app writes under documents/<hexId>.

lib/core/wallet/domain/entities/wallet_transaction.dartdestinationOutput null-safety fix is correct

Previously outputs.firstWhere(...) without orElse threw a StateError when ownership flags disagreed with the direction heuristic, which crashed CSV export. Now matches.firstOrNull degrades to null, and all consumers already handle it: csv_transaction_export_formatter.dart:249 (tx.toAddress ?? '') and transaction_details_table.dart:128 (if (toAddress != null)).

ios/Runner/Info.plist — purpose string addition is fine

NSLocationAlwaysAndWhenInUseUsageDescription mirrors the existing when-in-use string; no duplicate keys, and declaring the key alone doesn't grant or request always-on location.

Minor observations (non-blocking)

  1. Unused dev dependencypath_provider_platform_interface was added to pubspec.yaml:159 as a direct dev dependency, but nothing in lib/ or test/ imports it (on this branch or on main). It looks like a leftover from a test that never landed with the lwk_facade fix. Consider removing it or adding the test that needed it. Fix this →
  2. Heal path can mask the original error — in lwk_wallet_datasource.dart:65 and :95, await delete(wallet: wallet) runs inside the catch before throw e.msg. If the cache directory is already gone (e.g., two concurrent syncs both hit UpdateOnDifferentStatus and the first one wins), delete throws WalletError.notFound, which propagates instead of the original UpdateOnDifferentStatus message. Wrapping the heal-delete in its own try/catch would keep the original error surfaced. This behavior predates this PR and is only now reachable because delete works, so it's fine as a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants