Fix build errors

This commit is contained in:
nicolas.dorier 2019-06-04 09:40:36 +09:00
parent 1f7097ef89
commit 292c188182
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
5 changed files with 8 additions and 11 deletions

View File

@ -67,17 +67,15 @@ namespace BTCPayServer.Data
}
public IEnumerable<ISupportedPaymentMethod> GetSupportedPaymentMethods(BTCPayNetworkProvider networks)
{
networks = networks.UnfilteredNetworks;
#pragma warning disable CS0618
bool btcReturned = false;
// Legacy stuff which should go away
if (!string.IsNullOrEmpty(DerivationStrategy))
{
if (networks.BTC != null)
{
btcReturned = true;
yield return DerivationSchemeSettings.Parse(DerivationStrategy, networks.BTC);
}
btcReturned = true;
yield return DerivationSchemeSettings.Parse(DerivationStrategy, networks.BTC);
}
@ -95,8 +93,7 @@ namespace BTCPayServer.Data
if (strat.Value.Type == JTokenType.Null)
continue;
yield return
PaymentMethodHandlerDictionary[paymentMethodId]
.DeserializeSupportedPaymentMethod(paymentMethodId, strat.Value);
paymentMethodId.PaymentType.DeserializeSupportedPaymentMethod(network, strat.Value);
}
}
}

View File

@ -81,7 +81,7 @@ namespace BTCPayServer
}
public static PaymentMethodId GetpaymentMethodId(this InvoiceCryptoInfo info)
{
return new PaymentMethodId(info.CryptoCode, Enum.Parse<PaymentTypes>(info.PaymentType));
return new PaymentMethodId(info.CryptoCode, PaymentTypes.Parse(info.PaymentType));
}
public static async Task CloseSocket(this WebSocket webSocket)
{

View File

@ -11,7 +11,7 @@ namespace BTCPayServer.Payments.Bitcoin
public class BitcoinLikePaymentData : CryptoPaymentData
{
public PaymentTypes GetPaymentType()
public PaymentType GetPaymentType()
{
return PaymentTypes.BTCLike;
}

View File

@ -34,7 +34,7 @@ namespace BTCPayServer.Payments.Lightning
return PaymentHash?.ToString() ?? BOLT11;
}
public PaymentTypes GetPaymentType()
public PaymentType GetPaymentType()
{
return PaymentTypes.LightningLike;
}

View File

@ -17,7 +17,7 @@ namespace BTCPayServer.Payments.Lightning
return BOLT11;
}
public PaymentTypes GetPaymentType()
public PaymentType GetPaymentType()
{
return PaymentTypes.LightningLike;
}