Make wallet able to send to multiple destinations (#847)

* Make wallet able to send to multiple destinations

* fix tests

* update e2e tests

* fix e2e part 2

* make headless again

* pr changes

* make wallet look exactly as old one when only 1 dest
This commit is contained in:
Andrew Camilleri
2019-05-21 08:10:07 +00:00
committed by Nicolas Dorier
parent 3d436c3b0e
commit 88c931ec13
11 changed files with 304 additions and 98 deletions

View File

@@ -8,22 +8,27 @@ namespace BTCPayServer.Models.WalletViewModels
{
public class WalletSendModel
{
[Required]
public string Destination { get; set; }
public List<TransactionOutput> Outputs { get; set; } = new List<TransactionOutput>();
[Range(0.0, double.MaxValue)]
[Required]
public decimal? Amount { get; set; }
public class TransactionOutput
{
[Display(Name = "Destination Address")]
[Required]
public string DestinationAddress { get; set; }
[Display(Name = "Amount")] [Required] [Range(0.0, double.MaxValue)]public decimal? Amount { get; set; }
[Display(Name = "Subtract fees from this output amount")]
public bool SubtractFeesFromOutput { get; set; }
}
public decimal CurrentBalance { get; set; }
public string CryptoCode { get; set; }
public int RecommendedSatoshiPerByte { get; set; }
[Display(Name = "Subtract fees from amount")]
public bool SubstractFees { get; set; }
[Range(1, int.MaxValue)]
[Display(Name = "Fee rate (satoshi per byte)")]
[Required]