We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 434e085 commit 3713285Copy full SHA for 3713285
1 file changed
lwk_bindings/src/desc.rs
@@ -34,6 +34,10 @@ impl WolletDescriptor {
34
let inner = lwk_wollet::WolletDescriptor::from_str(descriptor)?;
35
Ok(Arc::new(WolletDescriptor { inner }))
36
}
37
+
38
+ pub fn is_mainnet(&self) -> bool {
39
+ self.inner.is_mainnet()
40
+ }
41
42
43
impl fmt::Display for WolletDescriptor {
@@ -62,5 +66,7 @@ mod tests {
62
66
let wollet_desc = lwk_wollet::WolletDescriptor::from_str(exp).unwrap();
63
67
let desc: WolletDescriptor = wollet_desc.into();
64
68
assert_eq!(desc.to_string(), exp);
69
70
+ assert!(!desc.is_mainnet());
65
71
72
0 commit comments