We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73e6a69 commit dbaf996Copy full SHA for dbaf996
src/util/address.rs
@@ -693,10 +693,10 @@ impl Address {
693
694
/// Constructs an [`Address`] from an output script (`scriptPubkey`).
695
pub fn from_script(script: &script::Script, network: Network) -> Option<Address> {
696
- if script.is_witness_program() {
697
- if script.witness_version() == Some(WitnessVersion::V0) && !(script.is_v0_p2wpkh() || script.is_v0_p2wsh()) {
+ if script.is_witness_program()
+ && script.witness_version() == Some(WitnessVersion::V0)
698
+ && !(script.is_v0_p2wpkh() || script.is_v0_p2wsh()) {
699
return None
- }
700
}
701
702
Some(Address {
0 commit comments