Refactoring, make PaymentType a class instead of enum

This commit is contained in:
nicolas.dorier
2019-06-04 08:59:01 +09:00
parent 8711960e74
commit 1e77546251
13 changed files with 98 additions and 55 deletions

View File

@@ -479,7 +479,7 @@ namespace BTCPayServer.Controllers
{
switch (paymentMethodId.PaymentType)
{
case PaymentTypes.BTCLike:
case BitcoinPaymentType _:
var strategy = derivationByCryptoCode.TryGet(paymentMethodId.CryptoCode);
vm.DerivationSchemes.Add(new StoreViewModel.DerivationScheme()
{
@@ -489,7 +489,7 @@ namespace BTCPayServer.Controllers
Enabled = !excludeFilters.Match(paymentMethodId)
});
break;
case PaymentTypes.LightningLike:
case LightningPaymentType _:
var lightning = lightningByCryptoCode.TryGet(paymentMethodId.CryptoCode);
vm.LightningNodes.Add(new StoreViewModel.LightningNode()
{