refactor: lndrest get_payment_status and pay_invoice use api v2 (#3470)

Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
dni ⚡ 2025-11-10 16:26:14 +01:00 committed by GitHub
parent b4eccb9e5d
commit e038ceb9be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 81 additions and 87 deletions

View file

@ -1092,7 +1092,7 @@
},
"lndrest": {
"pay_invoice_endpoint": {
"uri": "/v1/channels/transactions",
"uri": "/v2/router/send",
"headers": {
"Grpc-Metadata-macaroon": "eNcRyPtEdMaCaRoOn",
"User-Agent": "LNbits/Tests"
@ -1204,11 +1204,12 @@
},
"response_type": "json",
"response": {
"payment_hash": "41UmpD0E6YVZTA36uEiBT1JLHHhlmOyaY77dstcmrJY=",
"payment_route": {
"total_fees_msat": 30000
},
"payment_preimage": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
"result": {
"status": "SUCCEEDED",
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
"fee_msat": 30000,
"payment_preimage": "0000000000000000000000000000000000000000000000000000000000000000"
}
}
}
]
@ -2625,16 +2626,6 @@
"status": "FAILED"
}
}
},
{
"description": "error code 5",
"response_type": "stream",
"response": {
"error": {
"code": 5,
"message": "payment isn't initiated"
}
}
}
]
},