Cleanup useless code

This commit is contained in:
nicolas.dorier
2024-10-16 16:25:16 +09:00
parent 65fd537200
commit be429c527c
7 changed files with 5 additions and 47 deletions

View File

@@ -226,8 +226,7 @@ namespace BTCPayServer.Models.PaymentRequestViewModels
PaymentMethod = paymentMethodId.ToString(), PaymentMethod = paymentMethodId.ToString(),
Link = link, Link = link,
Id = txId, Id = txId,
Destination = paymentEntity.Destination, Destination = paymentEntity.Destination
//PaymentProof = paymentData.GetPaymentProof()
}; };
}) })
.Where(payment => payment != null) .Where(payment => payment != null)

View File

@@ -7,7 +7,7 @@ using Newtonsoft.Json;
namespace BTCPayServer.Payments.Bitcoin namespace BTCPayServer.Payments.Bitcoin
{ {
public class BitcoinLikePaymentData : CryptoPaymentData public class BitcoinLikePaymentData
{ {
public BitcoinLikePaymentData() public BitcoinLikePaymentData()
{ {
@@ -31,11 +31,6 @@ namespace BTCPayServer.Payments.Bitcoin
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public PayjoinInformation PayjoinInformation { get; set; } public PayjoinInformation PayjoinInformation { get; set; }
string CryptoPaymentData.GetPaymentProof()
{
return Outpoint?.ToString();
}
} }

View File

@@ -7,7 +7,7 @@ using Newtonsoft.Json;
namespace BTCPayServer.Payments.Lightning namespace BTCPayServer.Payments.Lightning
{ {
public class LightningLikePaymentData : CryptoPaymentData public class LightningLikePaymentData
{ {
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))] [JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
@@ -15,10 +15,5 @@ namespace BTCPayServer.Payments.Lightning
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))] [JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
public uint256 Preimage { get; set; } public uint256 Preimage { get; set; }
public string GetPaymentProof()
{
return Preimage?.ToString();
}
} }
} }

View File

@@ -6,7 +6,7 @@ using BTCPayServer.Services.Invoices;
namespace BTCPayServer.Services.Altcoins.Monero.Payments namespace BTCPayServer.Services.Altcoins.Monero.Payments
{ {
public class MoneroLikePaymentData : CryptoPaymentData public class MoneroLikePaymentData
{ {
public long SubaddressIndex { get; set; } public long SubaddressIndex { get; set; }
public long SubaccountIndex { get; set; } public long SubaccountIndex { get; set; }
@@ -16,9 +16,5 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments
public long? InvoiceSettledConfirmationThreshold { get; set; } public long? InvoiceSettledConfirmationThreshold { get; set; }
public long LockTime { get; set; } = 0; public long LockTime { get; set; } = 0;
public string GetPaymentProof()
{
return null;
}
} }
} }

View File

@@ -6,16 +6,12 @@ using BTCPayServer.Services.Invoices;
namespace BTCPayServer.Services.Altcoins.Zcash.Payments namespace BTCPayServer.Services.Altcoins.Zcash.Payments
{ {
public class ZcashLikePaymentData : CryptoPaymentData public class ZcashLikePaymentData
{ {
public long SubaddressIndex { get; set; } public long SubaddressIndex { get; set; }
public long SubaccountIndex { get; set; } public long SubaccountIndex { get; set; }
public long BlockHeight { get; set; } public long BlockHeight { get; set; }
public long ConfirmationCount { get; set; } public long ConfirmationCount { get; set; }
public string TransactionId { get; set; } public string TransactionId { get; set; }
public string GetPaymentProof()
{
return null;
}
} }
} }

View File

@@ -1021,12 +1021,4 @@ namespace BTCPayServer.Services.Invoices
}; };
} }
} }
/// <summary>
/// A record of a payment
/// </summary>
public interface CryptoPaymentData
{
string GetPaymentProof();
}
} }

View File

@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
namespace BTCPayServer.Services.Invoices
{
public class PaymentCreation
{
public DateTimeOffset Date { get; set; }
public string PaymentId { get; set; }
public HashSet<string> SearchTerms { get; } = new HashSet<string>();
public bool Accounted { get; set; }
public CryptoPaymentData Details { get; set; }
}
}