From e162cf6703daed77cd8717c6721eb5bbabb185fb Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Thu, 10 Aug 2023 14:25:17 +0100 Subject: [PATCH] Delete hand-made auth, not needed anymore --- actions/utils.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/actions/utils.ts b/actions/utils.ts index 506732c..6a6fd4d 100644 --- a/actions/utils.ts +++ b/actions/utils.ts @@ -26,25 +26,11 @@ export async function getProvider( () => undefined ); const providerConfig: ConnectionInfo = - user && password - ? { - url, - // TODO: This is a hack to make it work for HTTP endpoints (while we don't have a HTTPS one for Gnosis Chain), however I will delete once we have it - headers: { - Authorization: getAuthHeader({ user, password }), - }, - // user: await getSecret(`NODE_USER_${network}`, context), - // password: await getSecret(`NODE_PASSWORD_${network}`, context), - } - : { url }; + user && password ? { url, user, password } : { url }; return new ethers.providers.JsonRpcProvider(providerConfig); } -function getAuthHeader({ user, password }: { user: string; password: string }) { - return "Basic " + Buffer.from(`${user}:${password}`).toString("base64"); -} - export function apiUrl(network: string): string { switch (network) { case "1":