re-add nostr connect

This commit is contained in:
2026-07-24 10:42:24 +07:00
parent f1e4428109
commit d79d03b30e
4 changed files with 70 additions and 21 deletions

View File

@@ -282,10 +282,11 @@ impl NostrRegistry {
}));
}
fn get_master_key(&mut self, cx: &mut Context<Self>) -> Task<Keys> {
/// Get the master key that used for Nostr Connect
pub fn get_master_key(&self, cx: &App) -> Task<Keys> {
let task = cx.read_credentials(MASTER_KEYRING);
cx.spawn(async move |_, cx| {
cx.spawn(async move |cx| {
let (keys, new_key) = match task.await {
Ok(Some((_user, secret))) => match SecretKey::from_slice(&secret) {
Ok(secret_key) => (Keys::new(secret_key), false),