core-lightning/lightningd/test
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
..
Makefile wire/Makefile: fix missing wire/bolt12_exp_wiregen.c in ALL_C_SOURCES. 2022-10-26 11:29:06 +10:30
run-find_my_abspath.c lightningd: switch parsing to common/configvar 2023-06-03 10:50:29 +09:30
run-invoice-select-inchan.c fix(jsonrpc): trim the lightning: prefix from invoice 2023-07-14 15:04:26 +09:30
run-jsonrpc.c lightningd: remove deprecated_apis global, put into lightningd. 2023-07-09 16:49:48 +09:30
run-log-pruning.c jsonrpc: make error codes an enum. 2022-09-19 10:18:55 +09:30
run-shuffle_fds.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00