From 9383099efdee1c51f9fcf02ddb9611ef60ce5f12 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Tue, 26 Jul 2022 18:26:34 -0700 Subject: [PATCH] [Flare-99] Patch graphs (#138) --- .../protocol-dashboard/src/store/cache/analytics/hooks.ts | 5 +++++ packages/protocol-dashboard/src/store/cache/music/hooks.ts | 5 ++--- .../protocol-dashboard/src/store/cache/proposals/hooks.ts | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/protocol-dashboard/src/store/cache/analytics/hooks.ts b/packages/protocol-dashboard/src/store/cache/analytics/hooks.ts index bc62a2b1b28..9b40a510dd5 100644 --- a/packages/protocol-dashboard/src/store/cache/analytics/hooks.ts +++ b/packages/protocol-dashboard/src/store/cache/analytics/hooks.ts @@ -225,6 +225,11 @@ export function fetchTotalStaked( const timestamps: number[] = [ts] for (let i = 1; i < points; ++i) { const time = ts - i * (timeSliceMs / points) + // Filter timestamps impacted by + // https://blog.audius.co/article/audius-governance-takeover-post-mortem-7-23-22 + if (time > 1658573677000 && time < 1658884462050) { + continue + } timestamps.push(time) } diff --git a/packages/protocol-dashboard/src/store/cache/music/hooks.ts b/packages/protocol-dashboard/src/store/cache/music/hooks.ts index 5655c6d53e4..e7eb19e8909 100644 --- a/packages/protocol-dashboard/src/store/cache/music/hooks.ts +++ b/packages/protocol-dashboard/src/store/cache/music/hooks.ts @@ -3,8 +3,7 @@ import { useSelector, useDispatch } from 'react-redux' import { ThunkAction } from 'redux-thunk' import { Action } from 'redux' import AppState from 'store/types' -import { DiscoveryProvider, Playlist, Track } from 'types' -import { useDiscoveryProviders } from '../discoveryProvider/hooks' +import { Playlist, Track } from 'types' import { useEffect, useState } from 'react' import imageBlank from 'assets/img/imageBlank2x.png' import { @@ -92,7 +91,7 @@ export function fetchTopAlbums(): ThunkAction< try { await aud.awaitSetup() const data = await fetchWithLibs({ - endpoint: '/v1/playlists/top', + endpoint: '/v1/full/playlists/top', queryParams: { type: 'album', limit: 5 } }) const albums: Playlist[] = data.map((d: any) => ({ diff --git a/packages/protocol-dashboard/src/store/cache/proposals/hooks.ts b/packages/protocol-dashboard/src/store/cache/proposals/hooks.ts index 25fb71816e6..530d23ce626 100644 --- a/packages/protocol-dashboard/src/store/cache/proposals/hooks.ts +++ b/packages/protocol-dashboard/src/store/cache/proposals/hooks.ts @@ -82,7 +82,9 @@ export function fetchActiveProposals(): ThunkAction< } } -const filteredProposals = new Set([84, 85]) +// Filter proposals impacted by +// https://blog.audius.co/article/audius-governance-takeover-post-mortem-7-23-22 +const filteredProposals = new Set([82, 83, 84, 85]) export function fetchAllProposals(): ThunkAction< void,