Conversation
…ister_addresses params All 12 wallet functions that took `register_addresses: Option<&AppContext>` now require `&AppContext` unconditionally (placed first after `&mut self` per project convention). This eliminates silently skipped UTXO removal and address registration when callers forget to pass Some(...). For `identity_authentication_ecdsa_public_keys_data_map`, a separate `register_addresses: bool` flag controls whether addresses are registered in the DB, preserving the search-loop optimization in load_identity.rs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThis pull request refactors wallet method signatures to replace optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
All 12 wallet functions that accepted
register_addresses: Option<&AppContext>now require&AppContextunconditionally, placed first after&mut selfper project convention.Details
Some(...)except one search-loop optimization inload_identity.rsOptionwrapper masked silently skipped UTXO removal and address registrationidentity_authentication_ecdsa_public_keys_data_map, a separateregister_addresses: boolflag preserves the search-loop optimization (passfalseto skip DB registration)if let Some(app_context) = register_addressesguards removed — inner code now runs unconditionallyFiles modified
Signatures + bodies:
src/model/wallet/mod.rs— 6 functionssrc/model/wallet/asset_lock_transaction.rs— 6 functionsCallers:
src/backend_task/core/create_asset_lock.rssrc/backend_task/core/mod.rssrc/backend_task/identity/register_identity.rssrc/backend_task/identity/top_up_identity.rssrc/backend_task/identity/load_identity.rssrc/backend_task/identity/load_identity_from_wallet.rssrc/backend_task/wallet/fund_platform_address_from_wallet_utxos.rssrc/ui/identities/add_new_identity_screen/mod.rsTest plan
cargo build— cleancargo test --all-features --workspace— 42 passed, 0 failedcargo clippy --all-features --all-targets -- -D warnings— cleancargo +nightly fmt --all— clean🤖 Co-authored by Claudius the Magnificent AI Agent
Summary by CodeRabbit