feat(key-wallet): add downgrade_to_external_signable method to wallets#782
Conversation
📝 WalkthroughWalkthroughThe PR adds a new public method ChangesWallet External Signable Downgrade
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@key-wallet/src/wallet/mod.rs`:
- Around line 129-131: Add a unit test that constructs a Wallet (use the same
constructor used in tests) initialized to a non-external-signable type, calls
wallet.downgrade_to_external_signable(), then asserts the wallet.wallet_type
flipped to WalletType::ExternalSignable and that wallet.is_external_signable()
returns true while wallet.can_sign() returns false (or the expected downstream
behavior). Put the test in the same module tests block (or #[cfg(test)] mod
tests) alongside other wallet tests and name it e.g.
test_downgrade_to_external_signable to clearly cover the new API.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 394430c4-7a12-4aa7-9a43-8d055df263a4
📒 Files selected for processing (1)
key-wallet/src/wallet/mod.rs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #782 +/- ##
==========================================
+ Coverage 72.17% 72.26% +0.09%
==========================================
Files 321 321
Lines 70367 70370 +3
==========================================
+ Hits 50790 50856 +66
+ Misses 19577 19514 -63
|
Summary by CodeRabbit
New Features