From b80d5887932601a5bcbfefd68bd3ec12ef3b0149 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Tue, 26 Sep 2023 15:22:08 +0530 Subject: [PATCH] Update index.html --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index e6276d8..f417aa4 100644 --- a/index.html +++ b/index.html @@ -54,11 +54,7 @@ routeTo(window.location.hash, { firstLoad: true }) }).catch(e => { console.error(e) - if (window.location.hash.includes('smartcontracts')) - routeTo('', { firstLoad: true }) - else - routeTo(window.location.hash, { firstLoad: true }) - getRef('smart_contract_link').classList.add('hidden') + routeTo(window.location.hash, { firstLoad: true, smartContractsUnavailable: true }) }).finally(() => { loader(false) }) @@ -1182,7 +1178,7 @@ let tempData async function routeTo(targetPage, options = {}) { - const { firstLoad, hashChange } = options + const { firstLoad, hashChange, smartContractsUnavailable = false } = options let pageId let params = {} let searchParams @@ -1233,6 +1229,10 @@ case 'smartcontracts': const [subpage] = wildcards const { type, subtype, scName, scAddress } = params + if (smartContractsUnavailable) { + notify('Smart contracts are currently unavailable, please try again later.', 'error') + return + } if (subpage) { switch (subpage) { case 'create':