-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(hwi,wallet): enhance hardware wallet integration and testing #1492
Conversation
b8ea85a
to
8f19aa3
Compare
Thanks for this PR. I haven't had the opportunity to review this properly yet, however I am wondering if there is a particular reason why |
Also, can you please remove the merge commit and do a rebase instead? Thank you |
1193348
to
8f19aa3
Compare
OK.
|
8f19aa3
to
c335f35
Compare
Reorganized and moved Ready for review. Please take a look. |
It seems that the HWI emulator is disabled, which caused the HWI-related tests to fail. Therefore, I have added it (add HWI emulator setup). |
I appreciate what is accomplished in this PR. I'm somewhat ambivalent toward having this change. Main concern is bringing python dependency back to CI considering the age of this emulator software and that the nano s hasn't seen a firmware update since 2021 which amounts to more of a maintenance burden than I think is warranted. Other folks might have different opinions. In any case if you decide to continue work on this branch, we'd like if you also signed commits, although for the record I realized that policy isn't well documented. |
6e27d25
to
d817537
Compare
Thank you for your feedback. I've updated the emulator model used for the firmware to a more recent version. Additionally, I've resubmitted the commits with signatures. Thanks! |
Thanks for working on this! However, after #1561 the Feel free to open a PR in |
b0dc3dd feat(wallet)!: make `seen_at` mandatory for `Wallet::apply_update_at` (志宇) 00c568d revert(wallet)!: rm `Wallet::unbroadcast_transactions` (志宇) 200a16d fix(wallet)!: delete method `insert_tx` (valued mammal) ab27884 test(wallet): improve usage of test utils (valued mammal) 9bdf4cb chore: fix imports (valued mammal) 28d8061 test(wallet): fix test descriptor getters (valued mammal) 3135e29 test(wallet): add helpers to `test_utils` (valued mammal) 823bb39 feat(wallet): add module `test_utils` (valued mammal) 297bd9a test(wallet): refactor helper `insert_anchor_from_conf` (valued mammal) Pull request description: Follow up to #1643, refactor `insert_anchor_from_conf` to just insert an anchor of type `ConfirmationBlockTime` ### Notes to the reviewers The PR introduces a public `test_utils` module and "test-utils" cargo feature that exposes common helpers such as `get_funded_wallet`. Credit to #1492 for inspiring that idea. Usage of test utilities is enhanced overall, and tests are less dependent on problematic APIs that may be removed in the future. ### Changelog notice - `bdk_wallet`: Added "test-utils" feature flag that exposes common helpers for testing and development - Removed methods `Wallet::insert_tx`, `Wallet::insert_checkpoint`, `Wallet::unbroadcast_transactions` ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing * [x] I've added docs for the new feature * [x] This pull request breaks the existing API Top commit has no ACKs. Tree-SHA512: 561757595c65b4531dbf8b81f44387af6ac60114ecca493693cd975188741b5ff7b75a0dcf1dafc9d5750566baad81c644e7463c3c412a8331ad73de29601016
Overview
This PR introduces enhancements to the hardware wallet integration within the
hwi
crate and improves the testing utilities in thewallet
crate.Changes
test-util
FeatureThe
bdk_wallet
dependency in thehwi
crate now includes thetest-util
feature, allowing the use of additional testing utilities provided by thebdk_wallet
crate.TransactionSigner
implementationThe previously disabled hardware wallet signer test has been re-enabled and updated to use the
test-util
feature. This includes improvements to the test structure and error handling, ensuring robust and comprehensive testing.test-util
insidewallet
crateA new
test-util
module has been added to thewallet
crate to organize and provide utilities for testing. This promotes code reuse and maintainability across different tests.