From d48bc803d3e7d98e3681584c52d8555ebd463e16 Mon Sep 17 00:00:00 2001 From: matthew Date: Wed, 19 Oct 2022 01:42:16 +0400 Subject: [PATCH] add mobile version for balance dashboard --- searching-front/services/domain-watcher.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/searching-front/services/domain-watcher.ts b/searching-front/services/domain-watcher.ts index 8fc0d53..bd7c1f4 100644 --- a/searching-front/services/domain-watcher.ts +++ b/searching-front/services/domain-watcher.ts @@ -93,7 +93,7 @@ const tonweb = new TonWeb( }) ) -const fetchDomainInfo = async (url: string) => { +const fetchDomainInfo = async (url: string, count=0) => { try { await wait(1) @@ -110,7 +110,11 @@ const fetchDomainInfo = async (url: string) => { console.log('There is no domain info ofr', url) return null } catch (e) { - console.log('Failed fetch domain info for', url,e) + if(count < 10){ + console.log('Failed fetch domain info for', url,e) + await wait(Math.floor(Math.random() * 10)) + return await fetchDomainInfo(url, count++) + } return null } }