mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
18 lines
620 B
C#
18 lines
620 B
C#
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|