From b470fe22f16b26348c70371539b29524c2bcd5e5 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 16 Oct 2024 16:39:48 +0900 Subject: [PATCH] Remove potential NRE --- .../Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml | 3 ++- .../Views/Shared/Zcash/ViewZcashLikePaymentData.cshtml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml index 4b1c3b5d5..5219b0a09 100644 --- a/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml @@ -28,7 +28,8 @@ m.TransactionId = onChainPaymentData.TransactionId; m.ReceivedTime = payment.ReceivedTime; - m.TransactionLink = TransactionLinkProviders.GetTransactionLink(m.PaymentMethodId, onChainPaymentData.TransactionId); + if (onChainPaymentData.TransactionId != null) + m.TransactionLink = TransactionLinkProviders.GetTransactionLink(m.PaymentMethodId, onChainPaymentData.TransactionId); m.Currency = payment.Currency; return m; }).Where(c => c != null).ToList(); diff --git a/BTCPayServer/Views/Shared/Zcash/ViewZcashLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Zcash/ViewZcashLikePaymentData.cshtml index 8ba854779..41d291edf 100644 --- a/BTCPayServer/Views/Shared/Zcash/ViewZcashLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/Zcash/ViewZcashLikePaymentData.cshtml @@ -29,7 +29,8 @@ m.TransactionId = onChainPaymentData.TransactionId; m.ReceivedTime = payment.ReceivedTime; - m.TransactionLink = TransactionLinkProviders.GetTransactionLink(m.PaymentMethodId, onChainPaymentData.TransactionId); + if (onChainPaymentData.TransactionId != null) + m.TransactionLink = TransactionLinkProviders.GetTransactionLink(m.PaymentMethodId, onChainPaymentData.TransactionId); m.Currency = payment.Currency; return m; }).Where(c => c != null).ToList();