mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user