-
Notifications
You must be signed in to change notification settings - Fork 912
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
spark-wallet able to detect whether xpay-handle-pay is true or false #7953
Comments
Solved it in spark-wallet: src/cmd.js:
as far as I understand it, there are extra parameters that can't be handled by |
As of 24.11.1 xpay as pay will handle There is another detail, RPC parameters can arrive either as an array or values or a dictionary kind object. In your case I guess xpay is receiving a dictionary of parameters, but with null values on those parameters that |
I think this could break your wallet for the case in which the invoice has no amount and the user specifies a custom amount. |
It's our fault. Consider the case we accept the array of params, but one of them is null. eg: ["lnbcrt1u1pn...", null] |
You are right! I I thought I've tested it also for an invoice without an amount and thought it worked but now I see it doesn't ( |
@Lagrang3 You can change the title if you want |
#7958 solved it for me! Reversed the above changes in spark-wallet and paying invoices without an amount is (of course) no problem anymore. This issue has been resolved (spark-wallet behaves the same with xpay-handle-pay true or false) 🥇 |
|
@Lagrang3 Between 24.11 and 24.11.1 the feature metnioned above when xpay falls back to 2024-12-27T21:53:22+00:00 2024-12-27T21:53:22.800Z INFO plugin-cln-xpay: Not redirecting pay (only handle 1 or 2 args): {"rpc_command":{"jsonrpc":"2.0","method":"pay","params":["LNBC52990N1PNK7GVMPP5LEQRW496LLWQWUF8JLQELVDAPP4Z0GQKPSM9E48PU4ZDPC35MC8SDQQCQZZSXQYZ5VQSP5XEATTJHXRWH454NQN6QSMHSXQMENN3PTDD7K92X0H875TZV3CD2Q9P4GQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQPQYSGQPMYF509JQKTCT46VG75UFNR24H5E97FX3Q8VQGGGA3A5PSEMV998VMKAZRQ9RKJ5YZ4DEJU0U6KGCKWJ8AS8VQ0QQ7N9GZT5S8TYSRGPY49VQC",null,null,null,"5.0",null,null,null,null,null,null,null],"id":"39"}} On 24.11 this just worked. On 24.11.1 notice the message that (Using the new Start9 CLN package version 24.11.1~1) |
@chrisguida and I tested it further and we discovered the problem was actually C-Lightning-Rest, updating to CLNRest fixed the issue on both 24.11 and 24.11.1. Apologies for the confusion, everything works now :) |
"version": "v24.11-18-g2c8d9d0" (master)
Main spark-wallet wallet offer: lno1pgp79x4pzcssxxtelekwpe57eekenf9uffanpmfz4r9cwq7a0hfdltmpncr3ylst
Test spark-wallet tries to pay some msats to main wallet
When I use (my version of) spark-wallet to pay, something still doesn't work well:
If
xpay-handle-pay=false
, the payment goes through but after I setxpay-handle-pay=true
I get"Invalid parameter amount_msat (should be a millisatoshi amount): token 'null'"
.I don't understand how this can happen. I know one could say it's a spark-wallet thingy but spark-wallet does the same thing, it doesn't know that pay is being redirected to xpay.
If I do it all on the command line everything works just fine.
How is it possible that spark-wallet is able to detect whether
xpay-handle-pay
isfalse
ortrue
?Maybe someone has an idea?
Older version example (what happens on the test (paying) lightning node) but it's still that way (starts with
xpay-handle-pay=true
):Fun fact: I bought a Royal Club tonic at Bitcoin Amsterdam with renepay (from the command line): photo
The text was updated successfully, but these errors were encountered: