Ask faucets account only once if you dont have one

This commit is contained in:
Valtteri Karesto
2022-03-25 11:35:23 +02:00
parent 84e6763495
commit 0d10e782f3

View File

@@ -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);
}
}
})();