Fix issue where a NWC connection would not work unless restarting the app

Changelog-Fixed: Fixed issue where app would need a restart for new NWC wallets to work
Closes: https://github.com/damus-io/damus/issues/2859
Closes: https://github.com/damus-io/damus/issues/1135
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-02-19 15:21:35 -08:00
parent b2ee44c0ab
commit 98f83769bd

View File

@@ -370,6 +370,8 @@ struct ContentView: View {
self.confirm_mute = true self.confirm_mute = true
} }
.onReceive(handle_notify(.attached_wallet)) { nwc in .onReceive(handle_notify(.attached_wallet)) { nwc in
try? damus_state.pool.add_relay(.nwc(url: nwc.relay))
// update the lightning address on our profile when we attach a // update the lightning address on our profile when we attach a
// wallet with an associated // wallet with an associated
guard let ds = self.damus_state, guard let ds = self.damus_state,