core-lightning/tests
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
..
data pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
fuzz fuzz: initial sha256 seeds 2023-07-10 14:56:50 +09:30
plugins libplugin: support wildcard subscriptions. 2023-07-13 18:59:37 +09:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py tests: add marker for v1/v2 channel opens 2021-05-12 11:25:41 +09:30
db.py test-db-provider: if postgres in tests, startup a bookkeeper db 2022-07-28 12:08:18 +09:30
fixtures.py pyln.testing: remove Throttler. 2023-04-06 09:10:53 +09:30
rkls_github_canned_server.py pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
test_bookkeeper.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
test_cln_rs.py pyln: Create a dedicated pyln-grpc-proto package 2023-07-10 13:47:38 +09:30
test_closing.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
test_connection.py multifundchannel: use excess_as_change flag to simplify logic. 2023-06-29 11:28:47 -04:00
test_db.py wallet: fix up PSBTs as a migration. 2023-03-31 09:16:25 +10:30
test_gossip.py pytest: fix flake in test_routing_gossip. 2023-07-10 13:37:22 +02:00
test_invoices.py pay: don't require description for hashdesc invoices (i.e. undeprecate). 2023-06-22 13:23:21 +09:30
test_misc.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
test_mkfunding.py pytest: add tests for devtools/mkfunding 2023-01-09 14:50:30 -06:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py pytest: test for emergency minimum fund violations. 2023-06-29 11:28:47 -04:00
test_pay.py fix(jsonrpc): trim the lightning: prefix from invoice 2023-07-14 15:04:26 +09:30
test_plugin.py plugins: fix shutdown notification to contain object. 2023-07-13 18:59:37 +09:30
test_reckless.py pytest: ignore pip warning 2023-04-24 13:08:15 -07:00
test_wallet.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
utils.py Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30