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

Fix/complete actions individually #597

Merged
merged 2 commits into from
Jul 15, 2021

Conversation

henriquecbuss
Copy link
Member

What issue does this PR close

Closes N/A. Minimizes issues like this, which involve limitations from blockchain regarding CPU/resources. For a better explanation, see this excellent comment from @lucca65

Changes Proposed ( a list of new changes introduced by this PR)

When completing an objective, we send 1 transaction per action inside that objective. Instead of sending all of these transactions at the same time, now send one at a time (when we receive a response from the previous one).

How to test ( a list of instructions on how to test this PR)

  1. Go to a community you're an admin of
  2. Create an objective, and create actions under that objective
  3. Try completing the objective. It should also complete all the actions inside of it, one at a time (you'll notice it if you pay attention to the modal that shows the progress)

Comment on lines +510 to +514
completionStatus =
{ completed = List.filter .isCompleted objective.actions
, left =
List.filter (not << .isCompleted) objective.actions
|> List.map (\action -> { tries = 0, action = action })
Copy link
Member

Choose a reason for hiding this comment

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

looks much better! gotta love Elm's syntax

@henriquecbuss henriquecbuss merged commit c2b110f into master Jul 15, 2021
@henriquecbuss henriquecbuss deleted the fix/complete-actions-individually branch July 15, 2021 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants