From 6f7e0205f8dac57fb63316224c681642ecf6e9aa Mon Sep 17 00:00:00 2001 From: Kukks Date: Sat, 13 Apr 2019 13:22:19 +0200 Subject: [PATCH] Fix dynamic crowdfund labelling closes #760 --- BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs | 1 + BTCPayServer/Services/Apps/AppService.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs b/BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs index d3582ebba..ba9cda499 100644 --- a/BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs +++ b/BTCPayServer/Models/AppViewModels/ViewCrowdfundViewModel.cs @@ -75,6 +75,7 @@ namespace BTCPayServer.Models.AppViewModels public bool Ended => !EndDate.HasValue || DateTime.Now.ToUniversalTime() > EndDate; public bool DisplayPerksRanking { get; set; } public bool Enabled { get; set; } + public string ResetEvery { get; set; } } public class ContributeToCrowdfund diff --git a/BTCPayServer/Services/Apps/AppService.cs b/BTCPayServer/Services/Apps/AppService.cs index 095084936..72897a30d 100644 --- a/BTCPayServer/Services/Apps/AppService.cs +++ b/BTCPayServer/Services/Apps/AppService.cs @@ -139,6 +139,7 @@ namespace BTCPayServer.Services.Apps DisqusShortname = settings.DisqusShortname, AnimationsEnabled = settings.AnimationsEnabled, ResetEveryAmount = settings.ResetEveryAmount, + ResetEvery = Enum.GetName(typeof(CrowdfundResetEvery), settings.ResetEvery), DisplayPerksRanking = settings.DisplayPerksRanking, PerkCount = perkCount, NeverReset = settings.ResetEvery == CrowdfundResetEvery.Never,