Commit d8bcbeb8 authored by Jeremy Bokobza's avatar Jeremy Bokobza

Fixed formatting

parent 6a9a322b
...@@ -4,48 +4,48 @@ using System.ComponentModel.DataAnnotations; ...@@ -4,48 +4,48 @@ using System.ComponentModel.DataAnnotations;
namespace Breeze.Wallet.Models namespace Breeze.Wallet.Models
{ {
/// <summary> /// <summary>
/// Object used to create a new wallet /// Object used to create a new wallet
/// </summary> /// </summary>
public class WalletCreationRequest public class WalletCreationRequest
{ {
[Required(ErrorMessage = "A password is required.")] [Required(ErrorMessage = "A password is required.")]
public string Password { get; set; } public string Password { get; set; }
public string Network { get; set; } public string Network { get; set; }
public string FolderPath { get; set; } public string FolderPath { get; set; }
[Required(ErrorMessage = "The name of the wallet to create is missing.")] [Required(ErrorMessage = "The name of the wallet to create is missing.")]
public string Name { get; set; } public string Name { get; set; }
} }
public class WalletLoadRequest public class WalletLoadRequest
{ {
[Required(ErrorMessage = "A password is required.")] [Required(ErrorMessage = "A password is required.")]
public string Password { get; set; } public string Password { get; set; }
public string FolderPath { get; set; } public string FolderPath { get; set; }
[Required(ErrorMessage = "The name of the wallet is missing.")] [Required(ErrorMessage = "The name of the wallet is missing.")]
public string Name { get; set; } public string Name { get; set; }
} }
public class WalletRecoveryRequest public class WalletRecoveryRequest
{ {
[Required(ErrorMessage = "A mnemonic is required.")] [Required(ErrorMessage = "A mnemonic is required.")]
public string Mnemonic { get; set; } public string Mnemonic { get; set; }
[Required(ErrorMessage = "A password is required.")] [Required(ErrorMessage = "A password is required.")]
public string Password { get; set; } public string Password { get; set; }
public string FolderPath { get; set; } public string FolderPath { get; set; }
[Required(ErrorMessage = "The name of the wallet is missing.")] [Required(ErrorMessage = "The name of the wallet is missing.")]
public string Name { get; set; } public string Name { get; set; }
public string Network { get; set; } public string Network { get; set; }
} }
public class WalletHistoryRequest public class WalletHistoryRequest
{ {
...@@ -57,32 +57,32 @@ namespace Breeze.Wallet.Models ...@@ -57,32 +57,32 @@ namespace Breeze.Wallet.Models
} }
public class WalletName public class WalletName
{ {
[Required(ErrorMessage = "The name of the wallet is missing.")] [Required(ErrorMessage = "The name of the wallet is missing.")]
public string Name { get; set; } public string Name { get; set; }
} }
public class BuildTransactionRequest public class BuildTransactionRequest
{ {
[Required(ErrorMessage = "A password is required.")] [Required(ErrorMessage = "A password is required.")]
public string Password { get; set; } public string Password { get; set; }
[Required(ErrorMessage = "A destination address is required.")] [Required(ErrorMessage = "A destination address is required.")]
public string Address { get; set; } public string Address { get; set; }
[Required(ErrorMessage = "An amount is required.")] [Required(ErrorMessage = "An amount is required.")]
public string Amount { get; set; } public string Amount { get; set; }
[Required(ErrorMessage = "A fee type is required. It can be 'low', 'medium' or 'high'.")] [Required(ErrorMessage = "A fee type is required. It can be 'low', 'medium' or 'high'.")]
public string FeeType { get; set; } public string FeeType { get; set; }
public bool AllowUnconfirmed { get; set; } public bool AllowUnconfirmed { get; set; }
} }
public class SendTransactionRequest public class SendTransactionRequest
{ {
[Required(ErrorMessage = "A transaction in hexadecimal format is required.")] [Required(ErrorMessage = "A transaction in hexadecimal format is required.")]
public string Hex { get; set; } public string Hex { get; set; }
} }
} }
...@@ -9,30 +9,30 @@ namespace Breeze.Wallet.Models ...@@ -9,30 +9,30 @@ namespace Breeze.Wallet.Models
{ {
public class WalletHistoryModel public class WalletHistoryModel
{ {
[JsonProperty(PropertyName = "transactions")] [JsonProperty(PropertyName = "transactions")]
public List<TransactionItem> Transactions { get; set; } public List<TransactionItem> Transactions { get; set; }
} }
public class TransactionItem public class TransactionItem
{ {
/// <summary> /// <summary>
/// The Base58 representation of this address. /// The Base58 representation of this address.
/// </summary> /// </summary>
[JsonProperty(PropertyName = "address")] [JsonProperty(PropertyName = "address")]
public string Address { get; set; } public string Address { get; set; }
[JsonProperty(PropertyName = "txId")] [JsonProperty(PropertyName = "txId")]
[JsonConverter(typeof(UInt256JsonConverter))] [JsonConverter(typeof(UInt256JsonConverter))]
public uint256 TransactionId { get; set; } public uint256 TransactionId { get; set; }
[JsonProperty(PropertyName = "amount")] [JsonProperty(PropertyName = "amount")]
public Money Amount { get; set; } public Money Amount { get; set; }
[JsonProperty(PropertyName = "confirmed")] [JsonProperty(PropertyName = "confirmed")]
public bool Confirmed { get; set; } public bool Confirmed { get; set; }
[JsonProperty(PropertyName = "timestamp")] [JsonProperty(PropertyName = "timestamp")]
[JsonConverter(typeof(DateTimeOffsetConverter))] [JsonConverter(typeof(DateTimeOffsetConverter))]
public DateTimeOffset Timestamp { get; set; } public DateTimeOffset Timestamp { get; set; }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment