(node_factory)
| 959 | |
| 960 | |
| 961 | def test_xpay_offer(node_factory): |
| 962 | l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True) |
| 963 | |
| 964 | offer1 = l3.rpc.offer('any')['bolt12'] |
| 965 | offer2 = l3.rpc.offer('5sat', "5sat donation")['bolt12'] |
| 966 | |
| 967 | with pytest.raises(RpcError, match=r"Must specify amount for this offer"): |
| 968 | l1.rpc.xpay(offer1) |
| 969 | |
| 970 | l1.rpc.xpay(offer1, 100) |
| 971 | |
| 972 | with pytest.raises(RpcError, match=r"Offer amount is 5000msat, you tried to pay 1000msat"): |
| 973 | l1.rpc.xpay(offer2, 1000) |
| 974 | |
| 975 | l1.rpc.xpay(offer2) |
| 976 | l1.rpc.xpay(offer2, 5000) |
| 977 | |
| 978 | |
| 979 | def test_xpay_offer_invoice_amount_mismatch(node_factory): |
nothing calls this directly
no test coverage detected