e8a96389bac78961220cbc095c820a551ce4dacf fix(wallet): improve safety on finaize psbt (f3r10)
Pull request description:
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
fix #1711
### Description
This PR replaces how currently potentially bug-prone PSBT's input access is done using a more carefully approach.
### Notes to the reviewers
<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
of the PR were done in a specific way -->
### Changelog notice
<!-- Notice the release manager should include in the release tag message changelog -->
<!-- See https://keepachangelog.com/en/1.0.0/ for examples -->
### 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
ACKs for top commit:
rustaceanrob:
ACK
e8a96389bac78961220cbc095c820a551ce4dacf
evanlinjin:
ACK
e8a96389bac78961220cbc095c820a551ce4dacf
Tree-SHA512: ad25a9d5d47cbdc41b11ea4ce57b30c6855ea391c0f053dffbee0c3dd1b06c6b227e056ede69eee6026e8b72915fe06c366d0a4e2fd6a1d454fc8dafed80b74a