The recipient should know how much was received by an amountless invoice.
(node_factory)
| 614 | |
| 615 | |
| 616 | def test_amountless_invoice(node_factory): |
| 617 | """The recipient should know how much was received by an amountless invoice. |
| 618 | """ |
| 619 | l1, l2 = node_factory.line_graph(2) |
| 620 | |
| 621 | inv = l2.rpc.invoice('any', 'lbl', 'desc')['bolt11'] |
| 622 | i = l2.rpc.listinvoices()['invoices'] |
| 623 | assert(len(i) == 1) |
| 624 | assert('amount_received_msat' not in i[0]) |
| 625 | assert(i[0]['status'] == 'unpaid') |
| 626 | details = l1.rpc.decode(inv) |
| 627 | assert('msatoshi' not in details) |
| 628 | |
| 629 | l1.rpc.xpay(inv, amount_msat=1337) |
| 630 | |
| 631 | i = l2.rpc.listinvoices()['invoices'] |
| 632 | assert(len(i) == 1) |
| 633 | assert(i[0]['amount_received_msat'] == Millisatoshi(1337)) |
| 634 | assert(i[0]['status'] == 'paid') |
| 635 | |
| 636 | |
| 637 | def test_listinvoices_filter(node_factory): |
nothing calls this directly
no test coverage detected