@@ -324,6 +324,36 @@
private async Task CreatProject()
{
+ if (project.TargetAmount < (decimal)0.1)
+ {
+ notificationComponent.ShowErrorMessage("Project target amount must be higher then 0.1 BTC");
+ return;
+ }
+
+ if (project.StartDate < DateTime.UtcNow)
+ {
+ notificationComponent.ShowErrorMessage("Project must start in the future");
+ return;
+ }
+
+ if (project.ExpiryDate < project.StartDate)
+ {
+ notificationComponent.ShowErrorMessage("Project must expire after start date");
+ return;
+ }
+
+ if (project.Stages.Any() && project.ExpiryDate < project.Stages.Last().ReleaseDate)
+ {
+ notificationComponent.ShowErrorMessage("Project expire date must be after the last stage date");
+ return;
+ }
+
+ if (project.PenaltyDays < 10)
+ {
+ notificationComponent.ShowErrorMessage("Project penalty must be higher then 10 days");
+ return;
+ }
+
if (project.Stages.Count() < 3)
{
notificationComponent.ShowErrorMessage("There must be at least 3 stages");