-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
[bug] Nostr zaps: currently display as 0-amount payments instead of their actual amounts #2763
Comments
Could this potentially be a bug with CLN? I see new payments sent to bolt11 invoices returning 0 for |
This is not true for all payments though. I have some from as recent as two days ago returning both values correctly. Query in question fwiw https://github.com/ZeusLN/zeus/blob/master/backends/CLNRest.ts#L254 |
Yes, and as I already mentioned, RTL displays everything just fine, so perhaps they are querying differently? |
Oh whoa, you're using the |
I believe the It appears these payments in question all have |
ah, the sql route was done for perf purposes. see #2298 |
ok this is the result i get
This displays as a 0 in Zeus, even though the |
According to core lightning docs for sendpay it looks like Zeus appears to use It doesn't appear to me that this issue is specific to CLNRest. I believe models/Payment.ts has had both I'm not sure how to properly handle amount_sat being null. But the simplest option seems like it would be to adjust the function |
I suck at writing JS, but I believe this would fix the issue.
could be modified to:
|
Perhaps @ShahanaFarooqui can comment on when/why CLN returns |
I believe the |
It seems like Zeus is attempting to calculate the fees, does this mean that for some invoices the fees are impossible to calculate? |
Hi @chrisguida, After spending 370 sats, I found out that My CLN node is running on Below is my node's response from the query you referenced in comment:
But at least Zeus's bug is resolved by updating the |
@ShahanaFarooqui hmm, very odd! I guess this is a problem unique to the invoices Primal and Amethyst are generating for Nostr zaps? here is a sample zap invoice from Amethyst, does anything jump out at you that would cause
|
@chrisguida, Nope, nothing seems out of ordinary. I just tested a zap payment (created on Primal) and
RTL received successful payment response as:
And the response from
Now you owe me 370 + 21 = 391 Sats 😄!!! |
@ShahanaFarooqui very odd indeed! I wonder if this has to do with the fact that I'm using https://github.com/gudnuf/cln_nwc, though I'm not sure how that would make a difference, it's just forwarding the invoice to CLN to pay afaik... maybe this is an issue on CLN 24.11 and not 24.08? Should I upgrade to 24.11.1? Does the newer version have any changes related to this? PS send me an invoice or a Nostr profile and I'll be sure to zap you back! :) |
Yeah, sure enough,
|
I suppose clients could extract the amount_msat from the bolt11, but that seems suboptimal. |
I am not familiar with cln_nwc but can it be related to |
Ah yeah, it could! I should upgrade to 24.11.1 and see if that fixes it |
Ok so it looks like 24.11.1 actually does fix this!
Zeus looking great too! So the moral of the story is, don't use xpay on 24.11, and Zeus haha |
Ah yeah, shoulda read item 2 on the release xD https://github.com/ElementsProject/lightning/releases/tag/v24.11.1 |
Describe the bug
I've recently hooked up my CLN node to Nostr and I'm starting to send and receive zaps, which tend to be small payments <100sat.
In RTL, the amounts display correctly:
However in Zeus, the amounts just say 0:
Even when clicking on details, the amounts still all say 0:
Reproduce
Follow steps above
ZEUS version
v0.9.4
Node interface
Core Lightning (CLNRest)
Network
Clearnet
Device
Android Pixel 8a
Device operating system
Android 15
Log output
The text was updated successfully, but these errors were encountered: