Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for issue 103 and 132 #136

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

itailiors
Copy link
Collaborator

Implement Rescan Functionality with Data Clearing for Founder Projects #103
And fix for invest page time and functionality #132
(@dangershony or @DavidGershony there's a TODO comment because i wasn't sure what is expected,
"//TODO: what should the order be here? if an investor has a signed trx that he has not invested yet, and the project has started, could he invest?" "

also i think there is another case of someone requesting to invest, and the founder hasn't signed until after the start date

@itailiors itailiors linked an issue Aug 16, 2024 that may be closed by this pull request
@itailiors
Copy link
Collaborator Author

also added #137 small fix

@dangershony
Copy link
Member

if an investor has a signed trx that he has not invested yet, and the project has started, could he invest?"

I think yes we should allow, perhaps we could displa a warning and add a limitation that if stage 1 has passed then no possibility to invest anymore.

@miwahn what do you think?

@@ -156,7 +156,7 @@
<div class="mb-3">
<label class="form-label">The amount in % to allocate for stage @(project.ProjectInfo.Stages.IndexOf(stage) + 1)</label>
<div class="input-group">
<InputNumber @bind-Value="stage.AmountToRelease" class="form-control" placeholder="Enter amount to release as a percentage" min="1" max="100" step="1" />
<InputNumber @bind-Value="stage.AmountToRelease" class="form-control" placeholder="Enter amount to release as a percentage" min="0.01" max="100" step="0.01" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to change anything in the validation code? I suppose not.

<div class="row mt-4">
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<div class="row mt-4">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue here with formatting

@dangershony
Copy link
Member

@DavidGershony this is for you to review

@itailiors
Copy link
Collaborator Author

#132 is still TBD right now it is "disabled" from the view page,
but if you change the URL you can still invest (and there is nothing else restricted)

image

@@ -111,15 +106,16 @@ else
{
scanningForProjects = true;

// Clear the existing projects before rescan
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we clear the data we already have?

break;

case { Kind: NostrKind.ApplicationSpecificData }:
var projectInfo = serializer.Deserialize<ProjectInfo>(e.Content);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to keep this comment so it's easier to understand later on

@@ -93,6 +93,11 @@ public void AddFounderProject(params FounderProject[] projects)

_storage.SetItem("founder-projects", ret.OrderBy(_ => _.ProjectIndex));
}

public void ClearFounderProjects()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this when we have DeleteFounderProjects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants