Do not process NWC responses not meant for the user
Soon after tightening error handling around NWC, it was noticed that Damus was trying to process NWC responses meant for other people, which caused a failure around the decryption process and a spam of errors. This commit modifies the relay filter to include only responses destined to the user, and also guards the NWC response processing logic to ignore responses meant for other users. Changelog-Changed: Improved handling around NWC responses Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
1 parent
fe52381d63
commit
eb4e3b692b
2 files changed
+6
No files matched your search
@@ -20,6 +20,7 @@ extension WalletConnect {
|
||||
static func subscribe(url: WalletConnectURL, pool: RelayPool) {
|
||||
var filter = NostrFilter(kinds: [.nwc_response])
|
||||
filter.authors = [url.pubkey]
|
||||
filter.pubkeys = [url.keypair.pubkey]
|
||||
filter.limit = 0
|
||||
let sub = NostrSubscribe(filters: [filter], sub_id: "nwc")
|
||||
|
||||
|
||||
Reference in new issue
Block a user