This commit is contained in:
2026-07-28 16:28:05 +07:00
parent 0ae38d38d4
commit 5ddae637f6
3 changed files with 31 additions and 27 deletions

View File

@@ -222,6 +222,7 @@ impl NostrRegistry {
}
/// Check the user's credential and set the signer if valid
#[cfg(not(target_arch = "wasm32"))]
fn get_user_credential(&mut self, cx: &mut Context<Self>) {
let user_keyring = cx.read_credentials(USER_KEYRING);
let master_keyring = self.get_master_key(cx);
@@ -269,6 +270,10 @@ impl NostrRegistry {
/// Get the master key that used for Nostr Connect
pub fn get_master_key(&self, cx: &App) -> Task<Keys> {
if cfg!(target_arch = "wasm32") {
return cx.background_spawn(async move { Keys::generate() });
}
let task = cx.read_credentials(MASTER_KEYRING);
cx.spawn(async move |cx| {