Skip to content

Commit 96938ce

Browse files
committed
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."
1 parent 6c5968a commit 96938ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bolt12/offers-test.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@
573573
"valid": false,
574574
"bolt12": "lno1pqpzwyqkyypwa3eyt44h6txtxquqh7lz5djge4afgfjn7k4rgrkuag0jsd5xvxg"
575575
},
576+
{
577+
"description": "Missing offer_amount with offer_currency",
578+
"valid": false,
579+
"bolt12": "lno1qcp4256ypgx9getnwss8vetrw3hhyuckyypwa3eyt44h6txtxquqh7lz5djge4afgfjn7k4rgrkuag0jsd5xvxg"
580+
},
576581
{
577582
"description": "Missing offer_issuer_id and no offer_path",
578583
"valid": false,

0 commit comments

Comments
 (0)