mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using NBitcoin;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Data
|
|
{
|
|
public class PayoutTransactionOnChainBlob : IPayoutProof
|
|
{
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
|
|
public uint256 TransactionId { get; set; }
|
|
[JsonProperty(ItemConverterType = typeof(NBitcoin.JsonConverters.UInt256JsonConverter), NullValueHandling = NullValueHandling.Ignore)]
|
|
public HashSet<uint256> Candidates { get; set; } = new HashSet<uint256>();
|
|
|
|
[JsonIgnore] public string LinkTemplate { get; set; }
|
|
public string ProofType { get; } = Type;
|
|
public const string Type = "PayoutTransactionOnChainBlob";
|
|
|
|
[JsonIgnore]
|
|
public string Link
|
|
{
|
|
get { return Id != null ? string.Format(CultureInfo.InvariantCulture, LinkTemplate, Id) : null; }
|
|
}
|
|
public bool? Accounted { get; set; }//nullable to be backwards compatible. if null, accounted is true
|
|
[JsonIgnore]
|
|
public string Id { get { return TransactionId?.ToString(); } }
|
|
}
|
|
}
|