From 84bbbcbe107538a7d5e598ba7f1e187bf6556180 Mon Sep 17 00:00:00 2001 From: Umar Bolatov Date: Thu, 21 Nov 2019 18:47:10 -0800 Subject: [PATCH] [Wallet] Specify validation range for wallet send amount fix #1182 --- BTCPayServer/Models/WalletViewModels/WalletSendModel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs b/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs index 4c5569a52..c7a52b937 100644 --- a/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs +++ b/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs @@ -17,8 +17,10 @@ namespace BTCPayServer.Models.WalletViewModels [Required] public string DestinationAddress { get; set; } - [Display(Name = "Amount")] [Required] [Range(0.0, double.MaxValue)]public decimal? Amount { get; set; } - + [Display(Name = "Amount")] + [Required] + [Range(1E-08, 21E6)] + public decimal? Amount { get; set; } [Display(Name = "Subtract fees from amount")] public bool SubtractFeesFromOutput { get; set; }