From 36582f89f270f017320165ffddc7dab4e94f5dcc Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 9 Dec 2024 15:19:51 -0500 Subject: [PATCH] Add `pj_endpoint` method to `PjUri` types. `pj_endpoint` is used as the `Sender` id for persistent storage. --- src/uri.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/uri.rs b/src/uri.rs index a3ef2a3..bb15e26 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -86,6 +86,11 @@ impl PjUri { pub fn amount_sats(&self) -> Option { self.0.clone().amount.map(|e| e.to_sat()) } + + pub fn pj_endpoint(&self) -> String { + self.0.extras.endpoint().to_string() + } + pub fn as_string(&self) -> String { self.0.clone().to_string() }