Greenfield: Fix missing payment data (#4233)

* Greenfield: Fix missing payment data

Fixes #4229.

* Client: Return payment data from PayLightningInvoice

* Add test for PayLightningInvoice response
This commit is contained in:
d11n
2022-10-27 01:56:24 +02:00
committed by GitHub
parent 8b79212a6e
commit 57557748e2
4 changed files with 35 additions and 9 deletions

View File

@@ -381,10 +381,11 @@ namespace BTCPayServer.Controllers.Greenfield
await GetController<GreenfieldStoreLightningNodeApiController>().GetDepositAddress(cryptoCode, token));
}
public override async Task PayLightningInvoice(string storeId, string cryptoCode,
public override async Task<LightningPaymentData> PayLightningInvoice(string storeId, string cryptoCode,
PayLightningInvoiceRequest request, CancellationToken token = default)
{
HandleActionResult(await GetController<GreenfieldStoreLightningNodeApiController>().PayInvoice(cryptoCode, request, token));
return GetFromActionResult<LightningPaymentData>(
await GetController<GreenfieldStoreLightningNodeApiController>().PayInvoice(cryptoCode, request, token));
}
public override async Task<LightningInvoiceData> GetLightningInvoice(string storeId, string cryptoCode,