mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-13 11:35:51 +01:00
Old Payout labels weren't displayed properly
This commit is contained in:
parent
4bee8e9bfe
commit
b7ea128132
1 changed files with 7 additions and 1 deletions
|
@ -15,7 +15,7 @@ namespace BTCPayServer.Services.Labels
|
|||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
static void FixLegacy(JObject jObj, ReferenceLabel refLabel)
|
||||
{
|
||||
if (refLabel.Reference is null && jObj.ContainsKey("id"))
|
||||
|
@ -29,6 +29,12 @@ namespace BTCPayServer.Services.Labels
|
|||
var pullPaymentId = jObj["pullPaymentId"]?.Value<string>() ?? string.Empty;
|
||||
payoutLabel.PullPaymentPayouts.Add(pullPaymentId, new List<string>() { jObj["id"].Value<string>() });
|
||||
}
|
||||
else if (jObj.ContainsKey("payoutId") && jObj.ContainsKey("pullPaymentId"))
|
||||
{
|
||||
var pullPaymentId = jObj["pullPaymentId"]?.Value<string>() ?? string.Empty;
|
||||
var payoutId = jObj["payoutId"]?.Value<string>() ?? string.Empty;
|
||||
payoutLabel.PullPaymentPayouts.Add(pullPaymentId, new List<string>() { payoutId });
|
||||
}
|
||||
FixLegacy(jObj, (Label)payoutLabel);
|
||||
}
|
||||
static void FixLegacy(JObject jObj, Label label)
|
||||
|
|
Loading…
Add table
Reference in a new issue