bc050c71f322d50cfa024a79a8760ce305227add refactor(config): remove redundant wallet field from WalletConfigInner (Jennycj)
Pull request description:
### Description
Removes the redundant `wallet` field from `WalletConfigInner`. The wallet name was being stored twice: once as the key in `WalletConfig::wallets`, and once inside each entry as `wallet: String`. The `wallets` command's JSON/TOML output showed both.
For example:
```json
{
"my_wallet": {
"wallet": "my_wallet",
"network": "testnet",
...
}
}
```
The `"wallet"` field inside the entry is gone and the name is still available as the map key.
Fixes #332
### Notes to the reviewers
- `TryFrom<&WalletConfigInner> for WalletOpts` needed to be removed because it only receives the struct. It is now replaced with a private `try_to_wallet_opts(&self, wallet_name: &str)` that takes the name from the caller instead.
- Backward compatible: old config.toml files with the stray `wallet = "..."` line still load (serde ignores unknown fields). This is covered by`test_load_tolerates_legacy_wallet_field`.
- CHANGELOG updated under `[Unreleased]`.
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
tvpeter:
ACK
bc050c71f322d50cfa024a79a8760ce305227add
vadim-anfv:
ACK
bc050c71f322d50cfa024a79a8760ce305227add; successfully ran local tests; thanks!
Tree-SHA512: f78404289fcf6ada3ae8128cb6c99eba76718683c309031cbcee632bccfafdd902007a0102ab5c294e1b3a6c24e6241060e7c70f8954b87dad3f450027e0a360