From 9bd7d95a7b11d9caf01e87ba09bcdfe80d2942e2 Mon Sep 17 00:00:00 2001 From: Pablo Pettinari Date: Wed, 24 Nov 2021 03:21:55 +1100 Subject: [PATCH] display projects that were accepted and are in the challenge period (#456) --- .../src/api/recipient-registry-optimistic.ts | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/vue-app/src/api/recipient-registry-optimistic.ts b/vue-app/src/api/recipient-registry-optimistic.ts index 7a96a80dd..580bb7ce7 100644 --- a/vue-app/src/api/recipient-registry-optimistic.ts +++ b/vue-app/src/api/recipient-registry-optimistic.ts @@ -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 @@ -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 @@ -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(), @@ -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) {