Fix tests

This commit is contained in:
nicolas.dorier
2023-04-10 13:30:38 +09:00
parent ac25fef555
commit 24b8ec16f1
2 changed files with 3 additions and 3 deletions

View File

@@ -2070,7 +2070,8 @@ namespace BTCPayServer.Tests
var res = await s.Server.CustomerLightningD.Pay(lnurlResponse.Pr); var res = await s.Server.CustomerLightningD.Pay(lnurlResponse.Pr);
Assert.Equal(PayResult.Error, res.Result); Assert.Equal(PayResult.Error, res.Result);
await s.Server.CustomerLightningD.Pay(lnurlResponse2.Pr); res = await s.Server.CustomerLightningD.Pay(lnurlResponse2.Pr);
Assert.Equal(PayResult.Ok, res.Result);
await TestUtils.EventuallyAsync(async () => await TestUtils.EventuallyAsync(async () =>
{ {
var inv = await s.Server.PayTester.InvoiceRepository.GetInvoice(i); var inv = await s.Server.PayTester.InvoiceRepository.GetInvoice(i);

View File

@@ -641,8 +641,7 @@ namespace BTCPayServer
try try
{ {
var expiry = i.ExpirationTime.ToUniversalTime() - DateTimeOffset.UtcNow; var expiry = i.ExpirationTime.ToUniversalTime() - DateTimeOffset.UtcNow;
var metadata = JsonConvert.SerializeObject(lnurlPayRequest.Metadata); var description = (await _pluginHookService.ApplyFilter("modify-lnurlp-description", lnurlPayRequest.Metadata)) as string;
var description = (await _pluginHookService.ApplyFilter("modify-lnurlp-description", metadata)) as string;
if (description is null) if (description is null)
return NotFound(); return NotFound();