Skip to content

Commit

Permalink
display projects that were accepted and are in the challenge period (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pettinarip authored Nov 23, 2021
1 parent 42b442c commit 9bd7d95
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions vue-app/src/api/recipient-registry-optimistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,6 @@ export async function getProjects(

const recipients = data.recipients

const registry = new Contract(
registryAddress,
OptimisticRecipientRegistry,
provider
)
const now = DateTime.now().toSeconds()
const challengePeriodDuration = (
await registry.challengePeriodDuration()
).toNumber()

const projects: Project[] = recipients
.map((recipient) => {
let project
Expand All @@ -372,10 +362,6 @@ export async function getProjects(
}

const submissionTime = Number(recipient.submissionTime)
if (submissionTime + challengePeriodDuration >= now) {
// Challenge period is not over yet
return
}

if (recipient.rejected) {
return
Expand Down Expand Up @@ -422,15 +408,6 @@ export async function getProject(
if (!isHexString(recipientId, 32)) {
return null
}
const registry = new Contract(
registryAddress,
OptimisticRecipientRegistry,
provider
)
const now = DateTime.now().toSeconds()
const challengePeriodDuration = (
await registry.challengePeriodDuration()
).toNumber()

const data = await sdk.GetProject({
registryAddress: registryAddress.toLowerCase(),
Expand All @@ -451,10 +428,6 @@ export async function getProject(
// Invalid metadata
return null
}
if (project.extra.submissionTime + challengePeriodDuration >= now) {
// Challenge period is not over yet
return null
}

const requestType = Number(recipient.requestType)
if (requestType === RequestTypeCode.Registration) {
Expand Down

0 comments on commit 9bd7d95

Please sign in to comment.