core-lightning/plugins
Vincenzo Palazzo 5f6642a6ff fix(jsonrpc): trim the lightning: prefix from invoice
Previously, our code checked for the presence of the `lightning:`
prefix while decoding a bolt11 string. Although this prefix is valid
and accepted by the core lightning pay command, it was causing issues
with how we managed invoices. Specifically, we were skipping the prefix
when creating a copy of the invoice string and storing the raw invoice
(including the prefix) in the database, which caused inconsistencies
in the user experience.

To address this issue, we need to strip the `lightning:` prefix before
calling each core lightning command. In addition, we should
modify the invstring inside the db with the canonical one.

This commit fixes the issue by stripping the `lightning:` prefix
from the `listsendpays` function, which will improve the
user experience and ensure consistency in our invoice management (see
next commit).

Reported-by: @johngribbin
Link: ElementsProject#6207
Fixes: debbdc0
Changelog-Fixes: trim the `lightning:` prefix from invoice everywhere.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-07-14 15:04:26 +09:30
..
bkpr db: add generic warn/error function. 2023-07-09 16:49:48 +09:30
examples pytest: Highlight the re-entrancy issue for cln-plugin events 2023-04-13 18:13:28 -07:00
grpc-plugin grpc: The plugin needs to use the server feature on cln-grpc 2023-06-01 13:41:21 +09:30
spender Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
src cln-plugin: Remove unused nonnumericids field in Builder 2023-07-10 18:22:11 +02:00
test cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
.gitignore ignore sql binary plugin 2023-02-08 14:38:58 -06:00
autoclean.c autoclean: allow dynamic changes to autoclean-cycle. 2023-06-20 20:08:25 +09:30
bcli.c bcli: don't feed CLN massive feerates. 2023-07-10 13:37:22 +02:00
Cargo.toml rs: Bump version of cln-plugin 2023-06-02 14:47:13 +02:00
chanbackup.c chanbackup: even if they enable experimental-peer-storage, check peers 2023-03-08 18:46:21 -06:00
commando.c commando: integer command parameters can be compared with < and >. 2023-06-06 19:47:08 +09:30
fetchinvoice.c listconfigs: show plugin options in 'configs' with normal options. 2023-06-03 10:50:29 +09:30
funder.c plugins: update for new deprecation API where all fields are nicely wrapped. 2023-07-10 14:51:11 +09:30
funder_policy.c libplugin: make set callback for options take plugin ptr, check correct type. 2023-06-20 20:08:25 +09:30
funder_policy.h libplugin: make set callback for options take plugin ptr, check correct type. 2023-06-20 20:08:25 +09:30
keysend.c config: replace accept-htlc-tlv-types with accept-htlc-tlv-type 2023-06-03 10:50:29 +09:30
libplugin-pay.c plugins: initialize destination_reachable 2023-06-05 16:16:21 +02:00
libplugin-pay.h Makefile: update bolts to 60cfb5972ad4bec4c49ee0f9e729fb3352fcdc6a. 2023-04-07 21:22:56 +09:30
libplugin.c libplugin: support wildcard subscriptions. 2023-07-13 18:59:37 +09:30
libplugin.h libplugin: support wildcard subscriptions. 2023-07-13 18:59:37 +09:30
Makefile build: don't generate experimental variants of wire files. 2023-05-23 09:34:08 +09:30
offers.c listconfigs: show plugin options in 'configs' with normal options. 2023-06-03 10:50:29 +09:30
offers.h common: update to latest onion message spec. 2022-10-26 11:29:06 +10:30
offers_inv_hook.c lightningd: re-add 'offerout' functionality, as 'invoicerequest'. 2022-11-09 15:08:03 +01:00
offers_inv_hook.h lightningd: re-add 'offerout' functionality, as 'invoicerequest'. 2022-11-09 15:08:03 +01:00
offers_invreq_hook.c offers: fix pay where we are using deprecated apis. 2023-02-03 16:59:51 +01:00
offers_invreq_hook.h offers: create a real blinded path, if necessary. 2022-11-09 15:08:03 +01:00
offers_offer.c offers: enable label for invoicerequest 2023-03-09 06:56:06 -06:00
offers_offer.h lightningd: re-add 'offerout' functionality, as 'invoicerequest'. 2022-11-09 15:08:03 +01:00
pay.c fix(jsonrpc): trim the lightning: prefix from invoice 2023-07-14 15:04:26 +09:30
README.md doc: fix wording in plugins/README.md 2020-01-06 12:57:59 +01:00
sql.c libplugin: make set callback for options take plugin ptr, check correct type. 2023-06-20 20:08:25 +09:30
topology.c cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
txprepare.c Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30

Plugin Directory

Any file in this directory which is executable and whose name only consists of alphanumeric characters, space, '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).