Skip to content

Commit 2b92f7d

Browse files
committed
pytest: check xpay sets the invoice_request BIP353 fields correctly (it does!).
Signed-off-by: Rusty Russell <[email protected]>
1 parent 491ae90 commit 2b92f7d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_xpay.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,3 +1010,10 @@ def test_xpay_bip353(node_factory):
10101010

10111011
node_factory.join_nodes([l2, l1])
10121012
l2.rpc.xpay('[email protected]', 100)
1013+
1014+
# BOLT #12:
1015+
# - if it received the offer from which it constructed this `invoice_request` using BIP 353 resolution:
1016+
# - MUST include `invreq_bip_353_name` with,
1017+
# - `name` set to the post-₿, pre-@ part of the BIP 353 HRN,
1018+
# - `domain` set to the post-@ part of the BIP 353 HRN.
1019+
assert l1.rpc.decode(only_one(l1.rpc.listinvoices()['invoices'])['bolt12'])['invreq_bip_353_name'] == {'name': 'fake', 'domain': 'fake.com'}

0 commit comments

Comments
 (0)