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

@@ -459,14 +459,17 @@ namespace BTCPayServer.Controllers
}
}
if (ix is null) continue;
var labels = _labelService.CreateTransactionTagModels(ix, Request);
var input = vm.Inputs.First(model => model.Index == inputToObject.Key);
input.Labels = ix.LabelColors;
input.Labels = labels;
}
foreach (var outputToObject in outputToObjects)
{
if (!labelInfo.TryGetValue(outputToObject.Value.Id, out var ix)) continue;
var labels = _labelService.CreateTransactionTagModels(ix, Request);
var destination = vm.Destinations.First(model => model.Destination == outputToObject.Key);
destination.Labels = ix.LabelColors;
destination.Labels = labels;
}
}