Remove potential NRE

This commit is contained in:
nicolas.dorier 2024-10-16 16:39:48 +09:00
parent 5b2560ddf7
commit b470fe22f1
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
2 changed files with 4 additions and 2 deletions

View File

@ -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();

View File

@ -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();