From 80dc5028f703fcf5d76500306ebeead214ba64eb Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 10 Oct 2024 11:13:23 +0900 Subject: [PATCH] Fix migration crashes for instance having monero, zcash --- BTCPayServer.Data/Data/MigrationExtensions.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BTCPayServer.Data/Data/MigrationExtensions.cs b/BTCPayServer.Data/Data/MigrationExtensions.cs index ab70668e4..95814553f 100644 --- a/BTCPayServer.Data/Data/MigrationExtensions.cs +++ b/BTCPayServer.Data/Data/MigrationExtensions.cs @@ -137,9 +137,10 @@ namespace BTCPayServer.Data { return paymentType switch { - "BTCLike" => $"{cryptoCode}-CHAIN", + "BTCLike" or "MoneroLike" or "ZcashLike" => $"{cryptoCode}-CHAIN", "LightningLike" or "LightningNetwork" => $"{cryptoCode}-LN", "LNURLPAY" => $"{cryptoCode}-LNURL", + _ => throw new NotSupportedException("Unknown payment type " + paymentType) }; } @@ -154,7 +155,7 @@ namespace BTCPayServer.Data { return paymentType switch { - "BTCLike" => $"{cryptoCode}-CHAIN", + "BTCLike" or "MoneroLike" or "ZcashLike" => $"{cryptoCode}-CHAIN", "LightningLike" or "LightningNetwork" => $"{cryptoCode}-LN", "LNURLPAY" => $"{cryptoCode}-LNURL", _ => paymentMethodId