mirror of
https://github.com/aljazceru/bitcoin-waila.git
synced 2025-12-17 04:54:18 +01:00
Add is lnurl-auth
This commit is contained in:
@@ -67,4 +67,9 @@ impl PaymentParams {
|
||||
pub fn lnurl(&self) -> Option<String> {
|
||||
self.params.lnurl().map(|lnurl| lnurl.to_string())
|
||||
}
|
||||
|
||||
#[wasm_bindgen(getter)]
|
||||
pub fn is_lnurl_auth(&self) -> bool {
|
||||
self.params.is_lnurl_auth()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +141,12 @@ impl PaymentParams<'_> {
|
||||
PaymentParams::LightningAddress(ln_addr) => Some(LnUrl::from_url(ln_addr.lnurlp_url())),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_lnurl_auth(&self) -> bool {
|
||||
self.lnurl()
|
||||
.map(|lnurl| lnurl.is_lnurl_auth())
|
||||
.unwrap_or(false)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for PaymentParams<'_> {
|
||||
|
||||
Reference in New Issue
Block a user