btcpayserver/BTCPayServer/Data/Payouts/BitcoinLike/PayoutTransactionOnChainBlob.cs
d11n d5d0be5824
Code formatting updates (#4502)
* 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
2023-01-06 22:18:07 +09:00

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(); } }
}
}