mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
18 lines
638 B
C#
18 lines
638 B
C#
#nullable enable
|
|
using System.Linq;
|
|
using BTCPayServer.Data;
|
|
|
|
namespace BTCPayServer
|
|
{
|
|
public static class StoreExtensions
|
|
{
|
|
public static DerivationSchemeSettings? GetDerivationSchemeSettings(this StoreData store, BTCPayNetworkProvider networkProvider, string cryptoCode)
|
|
{
|
|
var paymentMethod = store
|
|
.GetSupportedPaymentMethods(networkProvider)
|
|
.OfType<DerivationSchemeSettings>()
|
|
.FirstOrDefault(p => p.PaymentId.PaymentType == Payments.PaymentTypes.BTCLike && p.PaymentId.CryptoCode == cryptoCode);
|
|
return paymentMethod;
|
|
}
|
|
}
|
|
}
|