Fix live update of crowdfunding, add tests, consider payments as confirmed if invoice is confirmed

This commit is contained in:
nicolas.dorier
2019-02-19 16:01:28 +09:00
parent 0807f3b87b
commit 3bbf4de5d2
8 changed files with 110 additions and 60 deletions

View File

@@ -106,11 +106,11 @@ namespace BTCPayServer.Controllers
return NotFound("A Target Currency must be set for this app in order to be loadable.");
}
if (settings.Enabled) return View(await _AppService.GetCrowdfundInfo(appId));
if (settings.Enabled) return View(await _AppService.GetAppInfo(appId));
if(!isAdmin)
return NotFound();
return View(await _AppService.GetCrowdfundInfo(appId));
return View(await _AppService.GetAppInfo(appId));
}
[HttpPost]
@@ -135,7 +135,7 @@ namespace BTCPayServer.Controllers
return NotFound("Crowdfund is not currently active");
}
var info = await _AppService.GetCrowdfundInfo(appId);
var info = (ViewCrowdfundViewModel)await _AppService.GetAppInfo(appId);
if (!isAdmin &&
((settings.StartDate.HasValue && DateTime.Now < settings.StartDate) ||