From 1505019c7cc995140d72c2abc448c2176284697e Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Thu, 17 Jun 2021 03:05:44 -0700 Subject: [PATCH] Remove api.audius.co filter (#101) --- packages/protocol-dashboard/src/utils/fetch.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/protocol-dashboard/src/utils/fetch.ts b/packages/protocol-dashboard/src/utils/fetch.ts index 937d638f58f..126af2e3065 100644 --- a/packages/protocol-dashboard/src/utils/fetch.ts +++ b/packages/protocol-dashboard/src/utils/fetch.ts @@ -31,15 +31,8 @@ export const withTimeout = async ( // TODO: put in env vars for staging export const fetchUntilSuccess = async (endpoints: string[]): Promise => { try { - const response = await fetchWithTimeout('https://api.audius.co') - const allHealthyDps = response.data as string[] - const allowedEndpoints = endpoints.filter(endpoint => - allHealthyDps.some(url => endpoint.startsWith(url)) - ) - // Pick a random endpoint from the allowed endpoints - const endpoint = - allowedEndpoints[Math.floor(Math.random() * allowedEndpoints.length)] + const endpoint = endpoints[Math.floor(Math.random() * endpoints.length)] console.info('Attempting endpoint: ', endpoint) return await fetchWithTimeout(endpoint) } catch (e) {