lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.63k stars 2.07k forks source link

[bug]: Unable to pay AMP invoice with `amp` flag set to true #8728

Closed saubyk closed 4 months ago

saubyk commented 4 months ago

Background

Trying to pay an AMP invoice with payinvoice command and amp flag set to true throws an error the AMP flag (--amp or SendPaymentRequest.Amp) must be set to pay an AMP invoice

./lncli -n=regtest payinvoice lnbcrt1u1pnr0n3cpp5zy9t58wttquf8dwxm8dymt9xxe27r003nv4w4py5unu768gnhajqdq423jhxarfdenjqctdwqsrycqzzsxqyjw5qsp52zuqjsgrn0k4g7ka5zthszjcvydxcfgl6hvjqzvzkkfa20ff3djq9q8pqqqsgq4w8ye3jxl30v6ez8c9h2mwyn65flu2qgdsclxkkh2cm5umsq6vezqf34sjx8jz4yc3m3h7uuuzgy95r5xkvt9pawpalnyv6hg3lzszspxkxkmw --amp=1
Payment hash: 110aba1dcb583893b5c6d9da4daca63655e1bdf19b2aea8494e4f9ed1d13bf64
Description: Testing amp 2
Amount (in satoshis): 100
Fee limit (in satoshis): 100
Destination: 02f31d2b3830e8afaf8621044460fa1ad6165aa0071601f8b26168a985c4d1cc08
Confirm payment (yes/no): yes
[lncli] rpc error: code = Unknown desc = the AMP flag (--amp or SendPaymentRequest.Amp) must be set to pay an AMP invoice
 ./lncli -n=regtest decodepayreq lnbcrt1u1pnr0n3cpp5zy9t58wttquf8dwxm8dymt9xxe27r003nv4w4py5unu768gnhajqdq423jhxarfdenjqctdwqsrycqzzsxqyjw5qsp52zuqjsgrn0k4g7ka5zthszjcvydxcfgl6hvjqzvzkkfa20ff3djq9q8pqqqsgq4w8ye3jxl30v6ez8c9h2mwyn65flu2qgdsclxkkh2cm5umsq6vezqf34sjx8jz4yc3m3h7uuuzgy95r5xkvt9pawpalnyv6hg3lzszspxkxkmw
{
    "destination": "02f31d2b3830e8afaf8621044460fa1ad6165aa0071601f8b26168a985c4d1cc08",
    "payment_hash": "110aba1dcb583893b5c6d9da4daca63655e1bdf19b2aea8494e4f9ed1d13bf64",
    "num_satoshis": "100",
    "timestamp": "1714933304",
    "expiry": "604800",
    "description": "Testing amp 2",
    "description_hash": "",
    "fallback_addr": "",
    "cltv_expiry": "80",
    "route_hints": [],
    "payment_addr": "50b80941039bed547adda097780a58611a6c251fd5d9200982b593d53d298b64",
    "num_msat": "100000",
    "features": {
        "8": {
            "name": "tlv-onion",
            "is_required": true,
            "is_known": true
        },
        "14": {
            "name": "payment-addr",
            "is_required": true,
            "is_known": true
        },
        "30": {
            "name": "amp",
            "is_required": true,
            "is_known": true
        }
    }
}

Your environment

Steps to reproduce

Expected behaviour

Should be able to pay the invoice if the amp flag is set to true

Actual behaviour

Throws a rpc error