Fix str match for key and addr decoding
This commit is contained in:
parent
ec5d3a647f
commit
34fe78bd0c
|
@ -79,7 +79,7 @@ impl std::str::FromStr for Address {
|
|||
network: match hrp.as_str() {
|
||||
human_readable_parts::MAINNET => Network::Mainnet,
|
||||
human_readable_parts::TESTNET => Network::Testnet,
|
||||
_ => Err(SerializationError::Parse("unknown network")),
|
||||
_ => return Err(SerializationError::Parse("unknown network")),
|
||||
},
|
||||
diversifier: keys::Diversifier::from(diversifier_bytes),
|
||||
transmission_key: keys::TransmissionKey::from(transmission_key_bytes),
|
||||
|
|
|
@ -186,7 +186,7 @@ impl FromStr for SpendingKey {
|
|||
network: match hrp.as_str() {
|
||||
sk_hrp::MAINNET => Network::Mainnet,
|
||||
sk_hrp::TESTNET => Network::Testnet,
|
||||
_ => Err(SerializationError::Parse("unknown network")),
|
||||
_ => return Err(SerializationError::Parse("unknown network")),
|
||||
},
|
||||
bytes: decoded_bytes,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue