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

keysend payments show up in listpays with the bolt11 field set to the string "(null)" #3921

Closed
shesek opened this issue Aug 10, 2020 · 6 comments
Assignees
Labels
state::fixed These issues should have been addressed. Pending confirmation by OP, will close soon otherwise

Comments

@shesek
Copy link
Contributor

shesek commented Aug 10, 2020

{
   "pays": [
      {
         "bolt11": "(null)",
         "status": "complete",
         "preimage": "ac73f925be48cebeb1e3f6c7662a05caec1688680842594f1275ce5ece8fede3",
         "amount_msat": "500msat",
         "amount_sent_msat": "500msat"
      }
   ]
}

This trips up spark, which attempts to parse it and fails. (shesek/spark-wallet#151)

@shesek shesek changed the title keysend payments show up in listpays with the bolt11 field set to the string "(null)" keysend payments show up in listpays with the bolt11 field set to the string "(null)" Aug 10, 2020
shesek added a commit to shesek/spark-wallet that referenced this issue Aug 10, 2020
@vincenzopalazzo
Copy link
Collaborator

Fiexd here

Now the listpays return the destination value when the payment is made with keysend and return a bolt11 when the payment is made with pay plugin. In addition, the response contains the pyments_hash in both cases

@ZmnSCPxj
Copy link
Collaborator

Since keysend does not involve a BOLT11 invoice, there is nothing we can print in a bolt11 field anyway. Even the "fix" just involves not including a bolt11 field, and if spark cannot handle the nonexistence of the bolt11 field it would still crash.

@shesek
Copy link
Contributor Author

shesek commented Aug 11, 2020

@ZmnSCPxj I filed this issue to report that the bolt11 field is returned as a "(null)" string instead of an actual null, not to have it included. Spark does ignore listpays entries with no bolt11 field, it was just getting confused by the "(null)" string value (the fix in was to treat these null strings the same as having no field at all).

@vincenzopalazzo Thanks! The addition of destination and payment_hash are pretty useful too. (I'm currently hashing the preimage to arrive at the payment_hash, would be nice if I didn't have to)

@ZmnSCPxj
Copy link
Collaborator

As mentioned #3888 should have fixed this, @shesek can you confirm?

@cdecker cdecker added the state::fixed These issues should have been addressed. Pending confirmation by OP, will close soon otherwise label Aug 11, 2020
@cdecker cdecker self-assigned this Aug 11, 2020
@cdecker
Copy link
Member

cdecker commented Aug 11, 2020

fwiw, I'm in the process of releasing a hotfix release that includes #3888, #3908 and #3909, which I'm sorry @shesek had to work around temporarily, my bad ☹️

@shesek
Copy link
Contributor Author

shesek commented Aug 17, 2020

Can confirm, #3888 fixed this.

@shesek shesek closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state::fixed These issues should have been addressed. Pending confirmation by OP, will close soon otherwise
Projects
None yet
Development

No branches or pull requests

4 participants