mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Fix build warning (#5355)
Removes unused `string payoutSource` and shortens return with to ternary operator.
This commit is contained in:
parent
e5a2aeb145
commit
ef03497350
1 changed files with 3 additions and 10 deletions
|
@ -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<string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return ppBlob?.Name ?? data.PullPaymentDataId;
|
||||
}
|
||||
return payoutBlob.Metadata?.TryGetValue("source", StringComparison.InvariantCultureIgnoreCase, out var source) is true
|
||||
? source.Value<string>()
|
||||
: ppBlob?.Name ?? data.PullPaymentDataId;
|
||||
}
|
||||
|
||||
public static PayoutBlob GetBlob(this PayoutData data, BTCPayNetworkJsonSerializerSettings serializers)
|
||||
|
|
Loading…
Add table
Reference in a new issue