Don't allow constructing unusable serai_client::bitcoin::Address es

This commit is contained in:
Luke Parker
2024-01-31 17:54:43 -05:00
parent 4913873b10
commit cc75b52a43
4 changed files with 73 additions and 56 deletions

View File

@@ -389,9 +389,9 @@ impl Wallet {
Wallet::Bitcoin { public_key, .. } => {
use bitcoin_serai::bitcoin::{Network, Address};
ExternalAddress::new(
networks::bitcoin::Address(Address::p2pkh(public_key, Network::Regtest))
.try_into()
.unwrap(),
networks::bitcoin::Address::new(Address::p2pkh(public_key, Network::Regtest))
.unwrap()
.into(),
)
.unwrap()
}