.
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user