From 96938ce30e3ff210a5634f2bb5b955d50b96119c Mon Sep 17 00:00:00 2001 From: Erick Cestari Date: Wed, 13 Aug 2025 10:37:54 -0300 Subject: [PATCH] bolt12: Add test vector for missing offer_amount with offer_currency Adds a test case to verify that offers with offer_currency set but offer_amount missing are correctly rejected, as required by BOLT 12 specification section "Requirements For Offers": "if `offer_currency` is set and `offer_amount` is not set: - MUST NOT respond to the offer." --- bolt12/offers-test.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bolt12/offers-test.json b/bolt12/offers-test.json index a032d9418..e6a39ba64 100644 --- a/bolt12/offers-test.json +++ b/bolt12/offers-test.json @@ -573,6 +573,11 @@ "valid": false, "bolt12": "lno1pqpzwyqkyypwa3eyt44h6txtxquqh7lz5djge4afgfjn7k4rgrkuag0jsd5xvxg" }, + { + "description": "Missing offer_amount with offer_currency", + "valid": false, + "bolt12": "lno1qcp4256ypgx9getnwss8vetrw3hhyuckyypwa3eyt44h6txtxquqh7lz5djge4afgfjn7k4rgrkuag0jsd5xvxg" + }, { "description": "Missing offer_issuer_id and no offer_path", "valid": false,