From 543e628a8ba49c6061c6089507908e7580dee1a9 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Fri, 16 Oct 2020 15:23:38 -0500 Subject: [PATCH] Removing rates hint --- BTCPayServer/Controllers/StoresController.cs | 4 +--- BTCPayServer/Data/StoreBlob.cs | 1 - BTCPayServer/Models/StoreViewModels/RatesViewModel.cs | 1 - BTCPayServer/Services/Stores/StoreRepository.cs | 3 +-- BTCPayServer/Views/Stores/Rates.cshtml | 11 ----------- 5 files changed, 2 insertions(+), 18 deletions(-) diff --git a/BTCPayServer/Controllers/StoresController.cs b/BTCPayServer/Controllers/StoresController.cs index 78ee8358d..718da19e5 100644 --- a/BTCPayServer/Controllers/StoresController.cs +++ b/BTCPayServer/Controllers/StoresController.cs @@ -210,7 +210,6 @@ namespace BTCPayServer.Controllers vm.AvailableExchanges = exchanges; vm.DefaultCurrencyPairs = storeBlob.GetDefaultCurrencyPairString(); vm.ShowScripting = storeBlob.RateScripting; - vm.HintRates = storeBlob.Hints?.Rates == true; return View(vm); } @@ -256,7 +255,6 @@ namespace BTCPayServer.Controllers blob.PreferredExchange = model.PreferredExchange; blob.Spread = (decimal)model.Spread / 100.0m; blob.DefaultCurrencyPairs = currencyPairs; - blob.Hints.Rates = false; if (!model.ShowScripting) { if (!exchanges.Any(provider => provider.Id.Equals(model.PreferredExchange, StringComparison.InvariantCultureIgnoreCase))) @@ -988,7 +986,7 @@ namespace BTCPayServer.Controllers public async Task DismissHint(string id) { var blob = CurrentStore.GetStoreBlob(); - if (id == "Rates" || id == "Wallet" || id == "Lightning") + if (id == "Wallet" || id == "Lightning") { try { diff --git a/BTCPayServer/Data/StoreBlob.cs b/BTCPayServer/Data/StoreBlob.cs index 0ca210e6d..e86d767c8 100644 --- a/BTCPayServer/Data/StoreBlob.cs +++ b/BTCPayServer/Data/StoreBlob.cs @@ -193,7 +193,6 @@ namespace BTCPayServer.Data { public bool Wallet { get; set; } public bool Lightning { get; set; } - public bool Rates { get; set; } } public IPaymentFilter GetExcludedPaymentMethods() diff --git a/BTCPayServer/Models/StoreViewModels/RatesViewModel.cs b/BTCPayServer/Models/StoreViewModels/RatesViewModel.cs index bfb86b395..fa7bfde21 100644 --- a/BTCPayServer/Models/StoreViewModels/RatesViewModel.cs +++ b/BTCPayServer/Models/StoreViewModels/RatesViewModel.cs @@ -53,7 +53,6 @@ namespace BTCPayServer.Models.StoreViewModels public string DefaultCurrencyPairs { get; set; } public string StoreId { get; set; } public IEnumerable AvailableExchanges { get; set; } - public bool HintRates { get; set; } [Display(Name = "Add a spread on exchange rate of ... %")] [Range(0.0, 100.0)] diff --git a/BTCPayServer/Services/Stores/StoreRepository.cs b/BTCPayServer/Services/Stores/StoreRepository.cs index fec4c0c71..b41ff2f6f 100644 --- a/BTCPayServer/Services/Stores/StoreRepository.cs +++ b/BTCPayServer/Services/Stores/StoreRepository.cs @@ -186,8 +186,7 @@ namespace BTCPayServer.Services.Stores blob.Hints = new Data.StoreBlob.StoreHints { Wallet = true, - Lightning = true, - Rates = true + Lightning = true }; store.SetStoreBlob(blob); await CreateStore(ownerId, store); diff --git a/BTCPayServer/Views/Stores/Rates.cshtml b/BTCPayServer/Views/Stores/Rates.cshtml index bca54646b..18e657c46 100644 --- a/BTCPayServer/Views/Stores/Rates.cshtml +++ b/BTCPayServer/Views/Stores/Rates.cshtml @@ -18,17 +18,6 @@
- @if (Model.HintRates) - { -

- - Please verify all Rates settings and test exchange rate currency pairs - -

- } @if (Model.ShowScripting) {