upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/key_handling/users.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-03-22 15:51:36 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-03-22 15:51:36 +0000
commit9a450f2ce740da08843a541d230c43194b934f5f (patch)
tree77505c28638e7fbc610d23c7844d3a1f260bac7a /src/key_handling/users.rs
parent0d7a8383d7d54e64bb0e1d5f4e06110c1e6a818b (diff)
replace XOnlyPublicKey with wrapper PublicKey
to reflect new name in rust-nostr
Diffstat (limited to 'src/key_handling/users.rs')
-rw-r--r--src/key_handling/users.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/key_handling/users.rs b/src/key_handling/users.rs
index c061cd3..751c577 100644
--- a/src/key_handling/users.rs
+++ b/src/key_handling/users.rs
@@ -32,13 +32,13 @@ pub trait UserManagement {
32 &self, 32 &self,
33 #[cfg(test)] client: &MockConnect, 33 #[cfg(test)] client: &MockConnect,
34 #[cfg(not(test))] client: &Client, 34 #[cfg(not(test))] client: &Client,
35 public_key: &XOnlyPublicKey, 35 public_key: &PublicKey,
36 after: u64, 36 after: u64,
37 ) -> Result<UserRef>; 37 ) -> Result<UserRef>;
38 fn get_user_from_cache(&self, public_key: &XOnlyPublicKey) -> Result<UserRef>; 38 fn get_user_from_cache(&self, public_key: &PublicKey) -> Result<UserRef>;
39 fn add_user_to_config( 39 fn add_user_to_config(
40 &self, 40 &self,
41 public_key: XOnlyPublicKey, 41 public_key: PublicKey,
42 encrypted_secret_key: Option<String>, 42 encrypted_secret_key: Option<String>,
43 overwrite: bool, 43 overwrite: bool,
44 ) -> Result<()>; 44 ) -> Result<()>;
@@ -99,7 +99,7 @@ impl UserManagement for UserManager {
99 99
100 fn add_user_to_config( 100 fn add_user_to_config(
101 &self, 101 &self,
102 public_key: XOnlyPublicKey, 102 public_key: PublicKey,
103 encrypted_secret_key: Option<String>, 103 encrypted_secret_key: Option<String>,
104 overwrite: bool, 104 overwrite: bool,
105 ) -> Result<()> { 105 ) -> Result<()> {
@@ -129,7 +129,7 @@ impl UserManagement for UserManager {
129 .context("failed to save application configuration with new user details in") 129 .context("failed to save application configuration with new user details in")
130 } 130 }
131 131
132 fn get_user_from_cache(&self, public_key: &XOnlyPublicKey) -> Result<UserRef> { 132 fn get_user_from_cache(&self, public_key: &PublicKey) -> Result<UserRef> {
133 let cfg = self 133 let cfg = self
134 .config_manager 134 .config_manager
135 .load() 135 .load()
@@ -148,7 +148,7 @@ impl UserManagement for UserManager {
148 &self, 148 &self,
149 #[cfg(test)] client: &MockConnect, 149 #[cfg(test)] client: &MockConnect,
150 #[cfg(not(test))] client: &Client, 150 #[cfg(not(test))] client: &Client,
151 public_key: &XOnlyPublicKey, 151 public_key: &PublicKey,
152 use_cache_unless_checked_more_than_x_secs_ago: u64, 152 use_cache_unless_checked_more_than_x_secs_ago: u64,
153 ) -> Result<UserRef> { 153 ) -> Result<UserRef> {
154 let cfg = self 154 let cfg = self