-
Notifications
You must be signed in to change notification settings - Fork 296
Description
This is a rather subtle bug and I'm not surprised that your testing hasn't caught it yet.
It took me quite a few weeks of noticing it, being puzzled about it, until I figured out what is going on.
Here is how to reproduce the issue:
- Use a NWC string in Damus from a NWC provider who supports the
get_info
action:
https://github.com/nostr-protocol/nips/blob/master/47.md#get_info
(For example, any NWC string from https://rizful.com/ will work.)
-
You should find that the NWC service in Damus works as expected. You will be able to send zaps,
list_transactions
, etc. -
Now use the same NWC code simultaneously in A DIFFERENT NWC client. For my testing purposes, I'm using the Alby browser extension: https://chromewebstore.google.com/detail/alby-bitcoin-wallet-for-l/iokeahhehimjnekafflcihljlcjccdbe?hl=en
-
Open the Alby browser extension to the default page, which will call
get_info
andlist_transactions
to the NWC service. -
Look back at Damus, and you should see:

- Click "copy technical information" in Damus. You should see:
Failed to decode NWC Wallet response JSON. Error: typeMismatch(damus.WalletConnect.Response.Result.ResultType, Swift.DecodingError.Context(codingPath: [], debugDescription: "result_type get_info is unknown", underlyingError: nil))
So. I think what is happening is that Damus is unable to handle the get_info
response.
The tricky thing here is that it's not Damus who made the get_info
request... BUT... Damus is listening to the NWC relay, so it gets the get_info
response if a different NWC client made that request!
I believe the solution is either to support and use the get_info
response, or just gracefully ignore it.