mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-16 03:34:28 +01:00
make sure entity state gets modified in payout processors
This commit is contained in:
@@ -14,6 +14,7 @@ using BTCPayServer.PayoutProcessors.Settings;
|
||||
using BTCPayServer.Services;
|
||||
using BTCPayServer.Services.Stores;
|
||||
using LNURL;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using PayoutData = BTCPayServer.Data.PayoutData;
|
||||
@@ -90,7 +91,7 @@ public class LightningAutomatedPayoutProcessor : BaseAutomatedPayoutProcessor<Au
|
||||
if (await TrypayBolt(client, blob, payoutData,
|
||||
lnurlResult.Item1))
|
||||
{
|
||||
ctx.Attach(payoutData);
|
||||
ctx.Attach(payoutData).State = EntityState.Modified;
|
||||
payoutData.State = PayoutState.Completed;
|
||||
}
|
||||
|
||||
@@ -99,7 +100,7 @@ public class LightningAutomatedPayoutProcessor : BaseAutomatedPayoutProcessor<Au
|
||||
case BoltInvoiceClaimDestination item1:
|
||||
if (await TrypayBolt(client, blob, payoutData, item1.PaymentRequest))
|
||||
{
|
||||
ctx.Attach(payoutData);
|
||||
ctx.Attach(payoutData).State = EntityState.Modified;
|
||||
payoutData.State = PayoutState.Completed;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ using BTCPayServer.PayoutProcessors.Settings;
|
||||
using BTCPayServer.Services;
|
||||
using BTCPayServer.Services.Stores;
|
||||
using BTCPayServer.Services.Wallets;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NBitcoin;
|
||||
using NBXplorer;
|
||||
@@ -146,7 +147,7 @@ namespace BTCPayServer.PayoutProcessors.OnChain
|
||||
var txHash = workingTx.GetHash();
|
||||
foreach (PayoutData payoutData in transfersProcessing)
|
||||
{
|
||||
context.Attach(payoutData);
|
||||
context.Attach(payoutData).State = EntityState.Modified;
|
||||
payoutData.State = PayoutState.InProgress;
|
||||
_bitcoinLikePayoutHandler.SetProofBlob(payoutData,
|
||||
new PayoutTransactionOnChainBlob()
|
||||
|
||||
Reference in New Issue
Block a user