Refactor Payouts and PullPayments DB models (#6173)

This commit is contained in:
Nicolas Dorier
2024-08-28 18:52:08 +09:00
committed by GitHub
parent 3c40dc1f49
commit 1dd37c5020
33 changed files with 389 additions and 261 deletions

View File

@@ -22,15 +22,15 @@ namespace BTCPayServer.Models
Id = data.Id;
StoreId = data.StoreId;
var blob = data.GetBlob();
PayoutMethodIds = blob.SupportedPaymentMethods;
BitcoinOnly = blob.SupportedPaymentMethods.All(p => p == PayoutTypes.CHAIN.GetPayoutMethodId("BTC") || p == PayoutTypes.LN.GetPayoutMethodId("BTC"));
PayoutMethodIds = blob.SupportedPayoutMethods;
BitcoinOnly = blob.SupportedPayoutMethods.All(p => p == PayoutTypes.CHAIN.GetPayoutMethodId("BTC") || p == PayoutTypes.LN.GetPayoutMethodId("BTC"));
SelectedPayoutMethod = PayoutMethodIds.First().ToString();
Archived = data.Archived;
AutoApprove = blob.AutoApproveClaims;
Title = blob.View.Title;
Description = blob.View.Description;
Amount = blob.Limit;
Currency = blob.Currency;
Amount = data.Limit;
Currency = data.Currency;
Description = blob.View.Description;
ExpiryDate = data.EndDate is DateTimeOffset dt ? (DateTime?)dt.UtcDateTime : null;
Email = blob.View.Email;