diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index bc24091f0..337c8dfe4 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -2,7 +2,7 @@ Exe netcoreapp2.0 - 1.0.2.7 + 1.0.2.8 NU1701,CA1816,CA1308,CA1810,CA2208 diff --git a/BTCPayServer/Controllers/StoresController.cs b/BTCPayServer/Controllers/StoresController.cs index 2c4b42a60..410739b18 100644 --- a/BTCPayServer/Controllers/StoresController.cs +++ b/BTCPayServer/Controllers/StoresController.cs @@ -646,11 +646,11 @@ namespace BTCPayServer.Controllers { var stores = await _Repo.GetStoresByUserId(userId); model.Stores = new SelectList(stores.Where(s => s.HasClaim(Policies.CanModifyStoreSettings.Key)), nameof(StoreData.Id), nameof(StoreData.StoreName), storeId); - } - if (model.Stores.Count() == 0) - { - StatusMessage = "Error: You need to be owner of at least one store before pairing"; - return RedirectToAction(nameof(UserStoresController.ListStores), "UserStores"); + if (model.Stores.Count() == 0) + { + StatusMessage = "Error: You need to be owner of at least one store before pairing"; + return RedirectToAction(nameof(UserStoresController.ListStores), "UserStores"); + } } return View(model); } diff --git a/BTCPayServer/HostedServices/InvoiceWatcher.cs b/BTCPayServer/HostedServices/InvoiceWatcher.cs index 3c338a2d5..a6a2be0d0 100644 --- a/BTCPayServer/HostedServices/InvoiceWatcher.cs +++ b/BTCPayServer/HostedServices/InvoiceWatcher.cs @@ -291,7 +291,7 @@ namespace BTCPayServer.HostedServices if (updateContext.Dirty) { await _InvoiceRepository.UpdateInvoiceStatus(invoice.Id, invoice.Status, invoice.ExceptionStatus); - updateContext.Events.Add(new InvoiceDataChangedEvent(invoice)); + updateContext.Events.Insert(0, new InvoiceDataChangedEvent(invoice)); } foreach (var evt in updateContext.Events)