diff --git a/mutiny-core/src/lib.rs b/mutiny-core/src/lib.rs index b6136b776..690cbf7bc 100644 --- a/mutiny-core/src/lib.rs +++ b/mutiny-core/src/lib.rs @@ -1940,7 +1940,7 @@ impl InvoiceHandler for MutinyWallet { } async fn get_outbound_payment_status(&self, payment_hash: &[u8; 32]) -> Option { - self.get_invoice_by_hash(&sha256::Hash::hash(payment_hash)) + self.get_invoice_by_hash(&sha256::Hash::from_inner(*payment_hash)) .await .ok() .map(|p| p.status) diff --git a/mutiny-core/src/nostr/mod.rs b/mutiny-core/src/nostr/mod.rs index 803593da4..78ef4f905 100644 --- a/mutiny-core/src/nostr/mod.rs +++ b/mutiny-core/src/nostr/mod.rs @@ -140,7 +140,7 @@ impl NostrManager { self.storage.set_nwc_sync_time(now.as_u64())?; now } - Some(time) => Timestamp::from(time), + Some(time) => Timestamp::from(time + 1), // add one so we get only new events }; let vec = self @@ -168,7 +168,7 @@ impl NostrManager { self.storage.set_dm_sync_time(now.as_u64())?; now } - Some(time) => Timestamp::from(time), + Some(time) => Timestamp::from(time + 1), // add one so we get only new events }; let received_dm_filter = Filter::new() @@ -509,7 +509,10 @@ impl NostrManager { ) -> Result { let profile = self.create_new_profile(profile_type, spending_conditions, tag)?; // add relay if needed - self.client.add_relay(profile.relay.as_str()).await?; + let needs_connect = self.client.add_relay(profile.relay.as_str()).await?; + if needs_connect { + self.client.connect_relay(profile.relay.as_str()).await?; + } let info_event = self.nwc.read().unwrap().iter().find_map(|nwc| { if nwc.profile.index == profile.index {