diff --git a/BTCPayServer/Data/Payouts/PayoutExtensions.cs b/BTCPayServer/Data/Payouts/PayoutExtensions.cs index de2291e4c..c85bb1657 100644 --- a/BTCPayServer/Data/Payouts/PayoutExtensions.cs +++ b/BTCPayServer/Data/Payouts/PayoutExtensions.cs @@ -37,16 +37,9 @@ namespace BTCPayServer.Data { var ppBlob = data.PullPaymentData?.GetBlob(); var payoutBlob = data.GetBlob(jsonSerializerSettings); - string payoutSource; - if (payoutBlob.Metadata?.TryGetValue("source", StringComparison.InvariantCultureIgnoreCase, - out var source) is true) - { - return source.Value(); - } - else - { - return ppBlob?.Name ?? data.PullPaymentDataId; - } + return payoutBlob.Metadata?.TryGetValue("source", StringComparison.InvariantCultureIgnoreCase, out var source) is true + ? source.Value() + : ppBlob?.Name ?? data.PullPaymentDataId; } public static PayoutBlob GetBlob(this PayoutData data, BTCPayNetworkJsonSerializerSettings serializers)