feat: expose Display trait on Amount and Psbt types#1045
Conversation
Signed-off-by: shivv23 <shivamkumar0423@gmail.com>
480f6f1 to
1fd3084
Compare
|
Nice small addition, and this seems consistent with the Display exports already used for types like FeeRate, Script, Address, and Transaction. One small question: should this PR add a focused test for the new binding-facing Display behavior? Since this exposes Display through UniFFI, it would be useful to assert that Amount and Psbt stringify as expected, especially because the PR checklist marks tests as added but the diff only changes bitcoin.rs. |
|
Hey @j-kon , I should have included tests with the initial commit. I've pushed test_amount_display and test_psbt_display to cover the new Display behavior for both types. Regarding the changelog label — I have changelog: added in the PR body but it seems the label itself needs to be applied by someone with triage access. Could you add it? Thanks for the review! |
Description
Add #[uniffi::export(Display)] and implement the Display trait on the Amount and Psbt types, exposing them to the FFI bindings (Kotlin, Swift, Python).
Notes to the reviewers
This follows the same pattern used by other types in the codebase (FeeRate, Script, Address, Transaction, WalletEvent, etc.) that already expose Display to bindings. Part of issue #1020.
Documentation
Changelog
changelog: added
Checklists
All Submissions:
New Features: