mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-31 20:54:31 +01:00
Fix potential NRE in polling
This commit is contained in:
@@ -218,7 +218,7 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||
}
|
||||
async Task<InvoiceEntity> UpdatePaymentStates(BTCPayWallet wallet, InvoiceEntity invoice)
|
||||
{
|
||||
|
||||
|
||||
List<PaymentEntity> updatedPaymentEntities = new List<PaymentEntity>();
|
||||
var transactions = await wallet.GetTransactions(invoice.GetAllBitcoinPaymentData()
|
||||
.Select(p => p.Outpoint.Hash)
|
||||
@@ -371,7 +371,7 @@ namespace BTCPayServer.Payments.Bitcoin
|
||||
var address = network.NBXplorerNetwork.CreateAddress(strategy, coin.KeyPath, coin.ScriptPubKey);
|
||||
|
||||
var paymentData = new BitcoinLikePaymentData(address, coin.Value, coin.OutPoint,
|
||||
transaction.Transaction.RBF, coin.KeyPath);
|
||||
transaction.Transaction is null ? true : transaction.Transaction.RBF, coin.KeyPath);
|
||||
|
||||
var payment = await _InvoiceRepository.AddPayment(invoice.Id, coin.Timestamp, paymentData, network).ConfigureAwait(false);
|
||||
alreadyAccounted.Add(coin.OutPoint);
|
||||
|
||||
Reference in New Issue
Block a user