From 78ddff3c9e303a361a6e9afc7578e3526e43ea7e Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 31 Mar 2025 10:15:26 +0900 Subject: [PATCH] Fix potential migration crashes --- BTCPayServer.Data/Data/MigrationExtensions.cs | 2 ++ BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/BTCPayServer.Data/Data/MigrationExtensions.cs b/BTCPayServer.Data/Data/MigrationExtensions.cs index f7983bd5a..d67bbf477 100644 --- a/BTCPayServer.Data/Data/MigrationExtensions.cs +++ b/BTCPayServer.Data/Data/MigrationExtensions.cs @@ -142,6 +142,7 @@ namespace BTCPayServer.Data "LightningLike" or "LightningNetwork" => $"{cryptoCode}-LN", "LNURLPAY" => $"{cryptoCode}-LNURL", "EthereumLike" => $"{cryptoCode}-LEGACY", + "CHAIN" or "LNURL" or "LN" => paymentMethodId, _ => throw new NotSupportedException("Unknown payment type " + paymentType) }; } @@ -159,6 +160,7 @@ namespace BTCPayServer.Data "BTCLike" or "MoneroLike" or "ZcashLike" => $"{cryptoCode}-CHAIN", "LightningLike" or "LightningNetwork" => $"{cryptoCode}-LN", "LNURLPAY" => $"{cryptoCode}-LNURL", + "EthereumLike" => $"{cryptoCode}-LEGACY", _ => paymentMethodId }; } diff --git a/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs b/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs index 5ba74af53..912577cfd 100644 --- a/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs +++ b/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs @@ -73,7 +73,7 @@ public class InvoiceBlobMigratorHostedService : BlobMigratorHostedService