clean up
This commit is contained in:
@@ -133,14 +133,7 @@ impl NostrRegistry {
|
||||
.signer(signer.clone())
|
||||
.database(lmdb)
|
||||
.gossip(NostrGossipMemory::unbounded())
|
||||
.gossip_config(
|
||||
GossipConfig::default()
|
||||
.no_background_refresh()
|
||||
.sync_idle_timeout(Duration::from_secs(TIMEOUT))
|
||||
.sync_initial_timeout(Duration::from_millis(600)),
|
||||
)
|
||||
.automatic_authentication(false)
|
||||
.verify_subscriptions(true)
|
||||
.connect_timeout(Duration::from_secs(10))
|
||||
.sleep_when_idle(SleepWhenIdle::Enabled {
|
||||
timeout: Duration::from_secs(600),
|
||||
@@ -280,7 +273,7 @@ impl NostrRegistry {
|
||||
let app_keys = self.app_keys.clone();
|
||||
|
||||
if let Ok(payload) = std::fs::read_to_string(key_path) {
|
||||
if payload.starts_with("nsec1") || payload.starts_with("bunker://") {
|
||||
if !payload.is_empty() {
|
||||
cx.background_spawn(async move {
|
||||
let decrypted = app_keys.nip44_decrypt(&public_key, &payload).await?;
|
||||
let secret = SecretKey::parse(&decrypted)?;
|
||||
@@ -435,11 +428,7 @@ impl NostrRegistry {
|
||||
let event = EventBuilder::nip17_relay_list(relays).sign(&signer).await?;
|
||||
|
||||
// Publish messaging relay list event
|
||||
client
|
||||
.send_event(&event)
|
||||
.to_nip65()
|
||||
.ack_policy(AckPolicy::none())
|
||||
.await?;
|
||||
client.send_event(&event).to_nip65().await?;
|
||||
|
||||
// Write user's credentials to the system keyring
|
||||
write_secret.await?;
|
||||
|
||||
Reference in New Issue
Block a user