upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-27 17:04:08 +0530
committerYour Name <you@example.com>2026-05-27 17:04:08 +0530
commited07956521a0edc25cc44b73fbd267fc2763fdac (patch)
tree224bcaec06d214e966a64a1e967addf3695a3d84
parentcd7d6dd7975eff18b49665f6ebcabee78b204f76 (diff)
Fix remaining compile errors: to_secret_hex, double-Result unwrap, unused imports
-rw-r--r--src/config.rs2
-rw-r--r--src/health.rs2
-rw-r--r--src/nip46.rs10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/config.rs b/src/config.rs
index 4117507..2016aab 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,5 +1,5 @@
1use anyhow::{Context, Result}; 1use anyhow::{Context, Result};
2use nostr::{FromBech32, PublicKey, ToBech32}; 2use nostr::{FromBech32, PublicKey};
3use serde::Deserialize; 3use serde::Deserialize;
4use std::path::PathBuf; 4use std::path::PathBuf;
5 5
diff --git a/src/health.rs b/src/health.rs
index 2853239..0c01db6 100644
--- a/src/health.rs
+++ b/src/health.rs
@@ -1,4 +1,4 @@
1use anyhow::{Context, Result}; 1use anyhow::Result;
2use serde::{Deserialize, Serialize}; 2use serde::{Deserialize, Serialize};
3use std::collections::HashMap; 3use std::collections::HashMap;
4 4
diff --git a/src/nip46.rs b/src/nip46.rs
index e115df6..04e3036 100644
--- a/src/nip46.rs
+++ b/src/nip46.rs
@@ -1,7 +1,7 @@
1use crate::db::MirrorDb; 1use crate::db::MirrorDb;
2use anyhow::{Context, Result}; 2use anyhow::{Context, Result};
3use nostr::nips::nip04; 3use nostr::nips::nip04;
4use nostr::nips::nip46::{Message, NostrConnectURI, NostrConnectMetadata, Request, ResponseResult}; 4use nostr::nips::nip46::{Message, NostrConnectURI, Request, ResponseResult};
5use nostr_sdk::prelude::*; 5use nostr_sdk::prelude::*;
6use std::collections::HashMap; 6use std::collections::HashMap;
7use std::sync::Arc; 7use std::sync::Arc;
@@ -95,7 +95,7 @@ impl Nip46Client {
95 let pairing_uri = Self::build_pairing_uri(&client_keys, &self.relays); 95 let pairing_uri = Self::build_pairing_uri(&client_keys, &self.relays);
96 96
97 self.db 97 self.db
98 .upsert_nip46_session(&pk_hex, &client_keys.secret_key().to_hex(), None, false) 98 .upsert_nip46_session(&pk_hex, &client_keys.secret_key().to_secret_hex(), None, false)
99 .await?; 99 .await?;
100 100
101 Session { 101 Session {
@@ -232,7 +232,7 @@ impl Nip46Client {
232 let _ = db 232 let _ = db
233 .upsert_nip46_session( 233 .upsert_nip46_session(
234 &pk_hex, 234 &pk_hex,
235 &session.client_keys.secret_key().to_hex(), 235 &session.client_keys.secret_key().to_secret_hex(),
236 Some(&signer_hex), 236 Some(&signer_hex),
237 true, 237 true,
238 ) 238 )
@@ -344,14 +344,14 @@ impl Nip46Client {
344 pending.remove(&request_id); 344 pending.remove(&request_id);
345 } 345 }
346 346
347 result.map_err(|_| { 347 let inner = result.map_err(|_| {
348 anyhow::anyhow!( 348 anyhow::anyhow!(
349 "NIP-46 signing request timed out after {}s", 349 "NIP-46 signing request timed out after {}s",
350 timeout.as_secs() 350 timeout.as_secs()
351 ) 351 )
352 })??; 352 })??;
353 353
354 Ok(result) 354 Ok(inner)
355 } 355 }
356 356
357 pub async fn get_status(&self) -> Vec<Nip46Status> { 357 pub async fn get_status(&self) -> Vec<Nip46Status> {