Skip to content

Commit 88a730b

Browse files
committed
fix: missing updates for current contributor fields when coordinating
1 parent 2235d46 commit 88a730b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/backend/.default.env

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ GITHUB_MINIMUM_FOLLOWERS="1"
2323
GITHUB_MINIMUM_FOLLOWING="5"
2424
## Minimum amount of public repos for the GitHub account
2525
GITHUB_MINIMUM_PUBLIC_REPOS="2"
26+
## The access token used for rate limiting purposes
27+
AUTH_GITHUB_ACCESS_TOKEN="YOUR-GITHUB-ACCESS-TOKEN"
2628

2729
# The email address of the user who is going to be the coordinator of all ceremonies.
2830
# nb. right now, only one user could be a coordinator for all ceremonies deployed within the same instance.

packages/backend/src/functions/circuit.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const coordinate = async (
124124
else if (participantIsNotCurrentContributor) {
125125
printLog(`Coordinate - executing scenario B - single - participantIsNotCurrentContributor`, LogLevel.DEBUG)
126126

127+
newCurrentContributorId = currentContributor
127128
newParticipantStatus = ParticipantStatus.WAITING
128129
newContributors.push(participant.id)
129130
}
@@ -148,6 +149,9 @@ const coordinate = async (
148149
LogLevel.DEBUG
149150
)
150151

152+
newParticipantStatus = ParticipantStatus.CONTRIBUTING
153+
newContributionStep = ParticipantContributionStep.DOWNLOADING
154+
151155
// Remove from waiting queue of circuit X.
152156
newContributors.shift()
153157

@@ -164,7 +168,9 @@ const coordinate = async (
164168

165169
// Prepare update tx.
166170
batch.update(newCurrentContributorDocument.ref, {
167-
status: ParticipantStatus.WAITING, // need to be refreshed.
171+
status: newParticipantStatus,
172+
contributionStep: newContributionStep,
173+
contributionStartedAt: getCurrentServerTimestampInMillis(),
168174
lastUpdated: getCurrentServerTimestampInMillis()
169175
})
170176

0 commit comments

Comments
 (0)