diff --git a/contracts/tasks/exportRound.ts b/contracts/tasks/exportRound.ts index ae4993bf3..83304385b 100644 --- a/contracts/tasks/exportRound.ts +++ b/contracts/tasks/exportRound.ts @@ -23,6 +23,7 @@ type RoundListEntry = { network: string address: string startTime: number + votingDeadline: number isFinalized: boolean } @@ -378,6 +379,7 @@ task('export-round', 'Export round data for the leaderboard') network: network.name, address: round.address, startTime: round.startTime, + votingDeadline: round.endTime, isFinalized: round.isFinalized && !round.isCancelled, }) } diff --git a/vue-app/src/api/round.ts b/vue-app/src/api/round.ts index 44865c682..006a0e501 100644 --- a/vue-app/src/api/round.ts +++ b/vue-app/src/api/round.ts @@ -63,7 +63,7 @@ export async function getCurrentRound(): Promise { return isVoidedRound(fundingRoundAddress) ? null : fundingRoundAddress } -function toRoundInfo(data: any, network: string): RoundInfo { +export function toRoundInfo(data: any, network: string): RoundInfo { const nativeTokenDecimals = Number(data.nativeTokenDecimals) // leaderboard does not need coordinator key, generate a dummy number const keypair = Keypair.createFromSeed(utils.hexlify(utils.randomBytes(32))) @@ -97,7 +97,9 @@ function toRoundInfo(data: any, network: string): RoundInfo { status, startTime: DateTime.fromSeconds(data.startTime), signUpDeadline: DateTime.fromSeconds(Number(data.startTime) + Number(data.signUpDuration)), - votingDeadline: DateTime.fromSeconds(Number(data.startTime) + Number(data.votingDuration)), + votingDeadline: DateTime.fromSeconds( + Number(data.startTime) + Number(data.signUpDuration) + Number(data.votingDuration), + ), totalFunds, matchingPool, contributions, diff --git a/vue-app/src/api/rounds.ts b/vue-app/src/api/rounds.ts index 2d036752f..05f5d18c4 100644 --- a/vue-app/src/api/rounds.ts +++ b/vue-app/src/api/rounds.ts @@ -8,6 +8,7 @@ export interface Round { network?: string hasLeaderboard: boolean startTime: number + votingDeadline: number } export function isVoidedRound(address: string): boolean { @@ -29,8 +30,8 @@ export async function getRounds(): Promise { return [] } - const rounds: Round[] = extraRounds.map(({ address, network, startTime }, index): Round => { - return { index, address, network, hasLeaderboard: true, startTime } + const rounds: Round[] = extraRounds.map(({ address, network, startTime, votingDeadline }, index): Round => { + return { index, address, network, hasLeaderboard: true, startTime, votingDeadline } }) const leaderboardRounds = new Set(rounds.map(r => toRoundId({ network: r.network || '', address: r.address }))) @@ -50,6 +51,7 @@ export async function getRounds(): Promise { address, hasLeaderboard: false, startTime: Number(fundingRound.startTime), + votingDeadline: Number(fundingRound.votingDeadline), }) } } @@ -62,6 +64,7 @@ export async function getRounds(): Promise { address: r.address, hasLeaderboard: r.hasLeaderboard, startTime: r.startTime, + votingDeadline: r.votingDeadline, network: r.network, } }) diff --git a/vue-app/src/components.d.ts b/vue-app/src/components.d.ts index 7ccfb0c87..1cef45f0e 100644 --- a/vue-app/src/components.d.ts +++ b/vue-app/src/components.d.ts @@ -23,6 +23,7 @@ declare module '@vue/runtime-core' { ContributionModal: typeof import('./components/ContributionModal.vue')['default'] CopyButton: typeof import('./components/CopyButton.vue')['default'] CriteriaModal: typeof import('./components/CriteriaModal.vue')['default'] + DateRange: typeof import('./components/DateRange.vue')['default'] ErrorModal: typeof import('./components/ErrorModal.vue')['default'] FilterDropdown: typeof import('./components/FilterDropdown.vue')['default'] FormNavigation: typeof import('./components/FormNavigation.vue')['default'] diff --git a/vue-app/src/components/DateRange.vue b/vue-app/src/components/DateRange.vue new file mode 100644 index 000000000..2ad28955f --- /dev/null +++ b/vue-app/src/components/DateRange.vue @@ -0,0 +1,18 @@ + + + diff --git a/vue-app/src/components/RoundInformation.vue b/vue-app/src/components/RoundInformation.vue index 020980fbe..e90f7ecb8 100644 --- a/vue-app/src/components/RoundInformation.vue +++ b/vue-app/src/components/RoundInformation.vue @@ -166,6 +166,12 @@ +
+
{{ $t('roundInfo.round_period') }}
+
+ +
+
@@ -280,8 +286,9 @@