Remove redundant code from node

This commit is contained in:
CWX
2025-04-30 13:31:25 +01:00
parent 442011fef3
commit 309fffeab2
@@ -70,7 +70,7 @@ public class PaymentService(
{
// If the item is money, add its count to the currencyAmounts object.
// sometimes the currency can be in two parts, so it fails to tryadd the second part
if (!currencyAmounts.TryAdd(item.Template, currencyAmounts.GetValueOrDefault(item.Template, 0) + itemRequest.Count))
if (!currencyAmounts.TryAdd(item.Template, itemRequest.Count))
{
// if it fails, add the amount to the existing amount
currencyAmounts[item.Template] += itemRequest.Count;
@@ -83,7 +83,7 @@ public class PaymentService(
// Handle differently, `id` is the money type tpl
var currencyTpl = itemRequest.Id;
// sometimes the currency can be in two parts, so it fails to tryadd the second part
if (!currencyAmounts.TryAdd(currencyTpl, currencyAmounts.GetValueOrDefault(currencyTpl, 0) + itemRequest.Count))
if (!currencyAmounts.TryAdd(currencyTpl, itemRequest.Count))
{
// if it fails, add the amount to the existing amount
currencyAmounts[currencyTpl] += itemRequest.Count;