Refactor: Dot not make LNURLPaymentMethodDetails depends on BTCPayInvoiceId (#4864)

* Refactor: Dot not make LNURLPaymentMethodDetails depends on BTCPayInvoiceId

* Abstract PaymentProof

* fix bug

* Make the selenium container resolves the btcpay host name
This commit is contained in:
Nicolas Dorier
2023-04-10 16:38:49 +09:00
committed by GitHub
parent a4d72d5bbc
commit 516efe56f4
22 changed files with 78 additions and 40 deletions

View File

@@ -238,7 +238,7 @@ namespace BTCPayServer.Controllers
Link = link,
Id = txId,
Destination = paymentData.GetDestination(),
PaymentProof = GetPaymentProof(paymentData),
PaymentProof = paymentData.GetPaymentProof(),
PaymentType = paymentData.GetPaymentType()
};
})
@@ -252,16 +252,6 @@ namespace BTCPayServer.Controllers
return View(vm);
}
private string? GetPaymentProof(CryptoPaymentData paymentData)
{
return paymentData switch
{
BitcoinLikePaymentData b => b.Outpoint.ToString(),
LightningLikePaymentData l => l.Preimage?.ToString(),
_ => null
};
}
private string? GetTransactionLink(PaymentMethodId paymentMethodId, string txId)
{
var network = _NetworkProvider.GetNetwork(paymentMethodId.CryptoCode);