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

When pay is xpay: listsendpays needs amount_msat too, just like listpays #7934

Closed
hMsats opened this issue Dec 11, 2024 · 3 comments · Fixed by #7938
Closed

When pay is xpay: listsendpays needs amount_msat too, just like listpays #7934

hMsats opened this issue Dec 11, 2024 · 3 comments · Fixed by #7938
Milestone

Comments

@hMsats
Copy link
Contributor

hMsats commented Dec 11, 2024

v24.11

First (558) paid with xpay, second (559) with pay.

Output from listsendpays

      {
         "created_index": 558,
         "id": 558,
         "payment_hash": "492d22ec7a5b13bcf8b8c3097bd0be6bf21c8c094f587cc525ed9ee56109dad0",
         "groupid": 1831353814669324182,
         "updated_index": 479,
         "partid": 1,
         "amount_sent_msat": 103000,
         "created_at": 1733897213,
         "completed_at": 1733897214,
         "status": "complete",
         "payment_preimage": "b13b6dc35925bc5b5ce7124ed696f335fefc4f2f67902e3919ef32963beddca0",
         "bolt12": "lni1qqgtats3z2r97tkll5mpzpx5cmdx293pqvvhnlnvurnfanndnxjtcjnmxrkj92xtsupa6lwjm7hkr8s8zflqk5srqxf9skppqwe3sj083ylgq2sgm5hxpv70fsd4eyy4ufnqcfkpkksa2ytsycrr4gycqvvhnlnvurnfanndnxjtcjnmxrkj92xtsupa6lwjm7hkr8s8zflqkq3yd5rgcnms4rqgmcn70hj2wa03dv4akrwcucqjhsa8qzpgl3gwcyqs840946nxhqnkjv6t6khfr4slnv4xfp6e5zza4p8zds8res6g9dd6qqe9fujxz34fumv0tksgga5dd4a6zv5grvxkq7ex7ue8f8ya7ztjwflg23vstzcuf6eemuvmuk52hntwadx2y8qqqqqqqqqqqqqqqysqqqqqqqqqqqqp6f9jm7k9yqqqqqq2gpr8ty4l02pqfykj9mr6tvfme79ccvyhh597d0eperqffav8e3f9ak0w2cgfmtg25qcpjfvtqggrr9ulum8qu60vumve5j7y57esa5323ju8q0whm5kl4aseupcj0c9lqsy6s6a9ddqux8y77pyq5r42zhmssnvem4v5pcnw62dmkhp9vswwl7pm3ezcqktnhm3r33q79r327cpd5gkt393ps5n3l3wsuz046daaw"
      },
      {
         "created_index": 559,
         "id": 559,
         "payment_hash": "4efaa101fd27890870602adcfc3b3d0404af66cfcd83e1746ed2073b38711d11",
         "groupid": 1,
         "updated_index": 480,
         "destination": "031979fe6ce0e69ece6d99a4bc4a7b30ed22a8cb8703dd7dd2dfaf619e07127e0b",
         "amount_msat": 103000,
         "amount_sent_msat": 103000,
         "created_at": 1733897315,
         "completed_at": 1733897316,
         "status": "complete",
         "payment_preimage": "c1171033ebfd191e755a5d27c8f7168f57e3f5bff662924f4f6e2d14ebfeaaf0",
         "bolt12": "lni1qqgpupc8c5x35p6xtlrtjq4ygth6u93pqvvhnlnvurnfanndnxjtcjnmxrkj92xtsupa6lwjm7hkr8s8zflqk5srqxf9skppq2fu9sgdqn0ate02py8gexztdr4nz3uuvj33aprhjace4mdg904fagycqvvhnlnvurnfanndnxjtcjnmxrkj92xtsupa6lwjm7hkr8s8zflqkqn2tnd54jejfra0cf7hf09s73zwxk57t5qaf352u3rkd2ysrp7ljsqsxmummea4us5e28txl9h47y9gxzpfuk2s86ze9jxdfymaxrzjx7jfqqe2erzp0kwwnq2pu3xnzclt3krlseay03h2ljdy24mzmhp2qt88au6j205dgpltgz9hkw4cw5r0er65wqe2y8qqqqqqqqqqqqqqqysqqqqqqqqqqqqp6f9jm7k9yqqqqqq2gpr8tyk9a2pqfma2zq0ay7yssurq9tw0cweaqsz27ek0ekp7zarw6grnkwr3r5g65qcpjfvtqggrr9ulum8qu60vumve5j7y57esa5323ju8q0whm5kl4aseupcj0c9lqsp0gdrl34806esu2rau9zg7kdnkzswp2pej9sngna05dwywe34nl6m7se4pz8smmycvsjk4dznn3kxncu37l394hvw7uarq9wn0c0x7w"
      }

@hMsats hMsats changed the title listsendpays needs amount_msat too just like listpays listsendpays needs amount_msat too, just like listpays Dec 11, 2024
@hMsats
Copy link
Contributor Author

hMsats commented Dec 11, 2024

For now I put in pay.c:

/*
        if (amount_msat_greater(t->msatoshi, AMOUNT_MSAT(0)))
                json_add_amount_msat(response, "amount_msat", t->msatoshi);
*/
        json_add_amount_msat(response, "amount_msat", t->msatoshi_sent);

because t->msatoshi is 0 for some reason when pay is xpay and that made spark-wallet great again

@hMsats hMsats changed the title listsendpays needs amount_msat too, just like listpays When pay is xoay: listsendpays needs amount_msat too, just like listpays Dec 12, 2024
@hMsats hMsats changed the title When pay is xoay: listsendpays needs amount_msat too, just like listpays When pay is xpay: listsendpays needs amount_msat too, just like listpays Dec 12, 2024
@rustyrussell
Copy link
Contributor

This is similar to #7881

@hMsats
Copy link
Contributor Author

hMsats commented Dec 16, 2024

Solved via #7941

@hMsats hMsats closed this as completed Dec 16, 2024
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 a pull request may close this issue.

3 participants
@rustyrussell @hMsats and others