From 0d10e782f3c495bc5e45f0f1cd9000e0840c307f Mon Sep 17 00:00:00 2001 From: Valtteri Karesto Date: Fri, 25 Mar 2022 11:35:23 +0200 Subject: [PATCH] Ask faucets account only once if you dont have one --- state/actions/addFaucetAccount.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/state/actions/addFaucetAccount.ts b/state/actions/addFaucetAccount.ts index 91fa305..00d6b02 100644 --- a/state/actions/addFaucetAccount.ts +++ b/state/actions/addFaucetAccount.ts @@ -68,11 +68,11 @@ export const addFaucetAccount = async (showToast: boolean = false) => { // fetch initial faucets (async function fetchFaucets() { if (typeof window !== 'undefined') { - if (state.accounts.length < 2) { + if (state.accounts.length === 0) { await addFaucetAccount(); - setTimeout(() => { - addFaucetAccount(); - }, 10000); + // setTimeout(() => { + // addFaucetAccount(); + // }, 10000); } } })();