bug fix: stopped unnecessary address API calls when no address is present on first load

This commit is contained in:
sairaj mote 2024-04-14 23:14:46 +05:30
parent 712515a990
commit bb8a5a4dd1
3 changed files with 4 additions and 1 deletions

View File

@ -1341,6 +1341,7 @@
},
async transactions(address) {
try {
if (!address || address === '') return
getRef('address_details').classList.remove('hidden')
getRef('transactions_list').innerHTML = '<sm-spinner class="justify-self-center margin-top-1-5"></sm-spinner>';
getRef('address_balance').innerHTML = '<sm-spinner class="justify-self-center margin-top-1-5"></sm-spinner>';

View File

@ -357,6 +357,8 @@
throw "No API available"
} catch (error) {
console.error(error)
if (!APIs[index])
throw "No API available"
APIs[index].coolDownTime = new Date().getTime() + 1000 * 60 * 10; // 10 minutes
return multiApi(fnName, { index: index + 1, ...args });
}

File diff suppressed because one or more lines are too long