Improve Labeling further (#4849)

* If loading addresses into the send wallet page using bip21 or address,  (or clicking on "Send selected payouts"  from the payotus page), existing labels will be pre-populated.
*  Add the payout label to the address when the payoutis created instead of to the transaction when it is paid.
*  Add the label attachments when adding labels from an address to the transaction.
This commit is contained in:
Andrew Camilleri
2023-04-07 08:58:41 +02:00
committed by GitHub
parent 91faf5756d
commit 892b3e273f
10 changed files with 87 additions and 37 deletions

View File

@@ -16,7 +16,7 @@ namespace BTCPayServer.Models.WalletViewModels
public bool Positive { get; set; }
public string Destination { get; set; }
public string Balance { get; set; }
public Dictionary<string, string> Labels { get; set; } = new();
public IEnumerable<TransactionTagModel> Labels { get; set; } = new List<TransactionTagModel>();
}
public class InputViewModel
@@ -25,7 +25,7 @@ namespace BTCPayServer.Models.WalletViewModels
public string Error { get; set; }
public bool Positive { get; set; }
public string BalanceChange { get; set; }
public Dictionary<string, string> Labels { get; set; } = new();
public IEnumerable<TransactionTagModel> Labels { get; set; } = new List<TransactionTagModel>();
}
public bool HasErrors => Inputs.Count == 0 || Inputs.Any(i => !string.IsNullOrEmpty(i.Error));
public string BalanceChange { get; set; }