Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add response valid error to check getalby connection #6

Merged

Conversation

karliatto
Copy link
Member

GetAlby has changed their default LNDHub string to point to a different URL and it has some differences in the responses.

Previously the lndhub string provided by GetAbly was like:

"lndhub://:@https://ln.getalby.com"

Now they are like:
"lndhub://:@https://getalby.com/lndhub/"

The new one when not finding a route to a node it responds:

{"payment_hash":{"type":"Buffer","data":[]},"payment_request":"<bolt11-invoice>","pay_req":""<bolt11-invoice>","num_satoshis":100,"description":null,"description_hash":"","payment_error":"","payment_preimage":{"type":"Buffer","data":[]},"payment_route":null}

Instead of the previous one (that is still alive so it is valid):

{"code":10,"error":true,"message":"Payment failed. Does the receiver have enough inbound capacity? (no_route)"}

So adding '"payment_route":null',to the checkMethodErrorMessages in GetAlby fixes the issue.

@karliatto karliatto requested a review from chill117 June 4, 2024 17:45
@chill117 chill117 merged commit 59cec05 into bleskomat:master Jun 5, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants