Wallets like cashu.me include multiple relays in their NWC connection string. We currently only use the first relay.
Describe the solution you'd like
Parse all relays from NWC connection in parseNwcUrl using url.searchParams.getAll('relay') instead of url.searchParams.get('relay') and use all of them to publish requests and listen for responses.
Logging would become very noisy if we log all events for every relay individually like we do now for the single relay. We should consider to remove all logs inside the nwcCall function if they aren't needed. NWC is the only wallet that uses the logger inside its own functions. So maybe it's indeed not needed and we can simply rely on general wallet logs?
Describe the problem you're trying to solve
Wallets like cashu.me include multiple relays in their NWC connection string. We currently only use the first relay.
Describe the solution you'd like
Parse all relays from NWC connection in
parseNwcUrl
usingurl.searchParams.getAll('relay')
instead ofurl.searchParams.get('relay')
and use all of them to publish requests and listen for responses.https://github.com/stackernews/stacker.news/blob/4cc3780eca1f1390bdd331f0e418b9a7efd4347e/lib/url.js#L190-L214
Describe alternatives you've considered
No response
Additional context
Logging would become very noisy if we log all events for every relay individually like we do now for the single relay. We should consider to remove all logs inside the
nwcCall
function if they aren't needed. NWC is the only wallet that uses thelogger
inside its own functions. So maybe it's indeed not needed and we can simply rely on general wallet logs?