From f4362ec57f1874dca7f2bffd49ace53f9ec883a6 Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 5 Nov 2025 19:06:06 +0530 Subject: [PATCH 1/3] Display Inflation only if mint module is enabled --- src/modules/[chain]/indexStore.ts | 35 ++++++++++++++++++------------- src/stores/useMintStore.ts | 17 ++++++++++----- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/modules/[chain]/indexStore.ts b/src/modules/[chain]/indexStore.ts index 3164cfae..50162967 100644 --- a/src/modules/[chain]/indexStore.ts +++ b/src/modules/[chain]/indexStore.ts @@ -152,7 +152,7 @@ export const useIndexModule = defineStore('module-index', { const mintStore = useMintStore(); const formatter = useFormatter(); - return [ + const statsArray = [ { title: 'Height', color: 'primary', @@ -185,24 +185,31 @@ export const useIndexModule = defineStore('module-index', { }), change: 0, }, - { + ]; + + // Only show Inflation if mint module is enabled + if (mintStore.mintModuleEnabled) { + statsArray.push({ title: 'Inflation', color: 'success', icon: 'mdi-chart-multiple', stats: formatter.formatDecimalToPercent(mintStore.inflation), change: 0, - }, - { - title: 'Community Pool', - color: 'primary', - icon: 'mdi-bank', - stats: formatter.formatTokens( - // @ts-ignore - this.communityPool?.filter((x: Coin) => x.denom === staking.params.bond_denom) - ), - change: 0, - }, - ]; + }); + } + + statsArray.push({ + title: 'Community Pool', + color: 'primary', + icon: 'mdi-bank', + stats: formatter.formatTokens( + // @ts-ignore + this.communityPool?.filter((x: Coin) => x.denom === staking.params.bond_denom) + ), + change: 0, + }); + + return statsArray; }, coingeckoId() { diff --git a/src/stores/useMintStore.ts b/src/stores/useMintStore.ts index fff1680e..e2f86c23 100644 --- a/src/stores/useMintStore.ts +++ b/src/stores/useMintStore.ts @@ -5,6 +5,7 @@ export const useMintStore = defineStore('mintStore', { state: () => { return { inflation: '0', + mintModuleEnabled: true, }; }, getters: { @@ -18,14 +19,20 @@ export const useMintStore = defineStore('mintStore', { }, async fetchInflation() { try { - const res = await this.blockchain?.rpc?.getMintInflation().catch(() => { - this.inflation = '0'; - }); + const res = await this.blockchain?.rpc?.getMintInflation(); if (res) { this.inflation = res.inflation; + this.mintModuleEnabled = true; + } + } catch (e: any) { + // Check if module is not implemented/enabled + const errorMessage = e?.message || e?.toString() || ''; + if (errorMessage.includes('Not Implemented') || e?.status === 501) { + // Module not enabled + this.mintModuleEnabled = false; + } else { + console.log(e); } - } catch (e) { - console.log(e); } }, }, -- 2.45.2 From 02e7c3de1a8ad5ed15b7d46982401a7e66c97ef6 Mon Sep 17 00:00:00 2001 From: Pranav Date: Thu, 6 Nov 2025 19:28:07 +0530 Subject: [PATCH 2/3] Set the mint module as disabled by default --- src/layouts/components/Sponsors.vue | 2 +- src/modules/[chain]/indexStore.ts | 36 ++++++++++++----------------- src/plugins/i18n/locales/de.json | 2 +- src/plugins/i18n/locales/id.json | 2 +- src/plugins/i18n/locales/ja.json | 2 +- src/plugins/i18n/locales/ko.json | 2 +- src/plugins/i18n/locales/zh.json | 2 +- src/stores/useMintStore.ts | 7 +++--- 8 files changed, 24 insertions(+), 31 deletions(-) diff --git a/src/layouts/components/Sponsors.vue b/src/layouts/components/Sponsors.vue index 2dbe163a..a3cb37e1 100644 --- a/src/layouts/components/Sponsors.vue +++ b/src/layouts/components/Sponsors.vue @@ -6,7 +6,7 @@
- Laconic Network + Zenith Network
diff --git a/src/modules/[chain]/indexStore.ts b/src/modules/[chain]/indexStore.ts index 50162967..c2cd39c5 100644 --- a/src/modules/[chain]/indexStore.ts +++ b/src/modules/[chain]/indexStore.ts @@ -152,7 +152,7 @@ export const useIndexModule = defineStore('module-index', { const mintStore = useMintStore(); const formatter = useFormatter(); - const statsArray = [ + return [ { title: 'Height', color: 'primary', @@ -185,31 +185,25 @@ export const useIndexModule = defineStore('module-index', { }), change: 0, }, - ]; - - // Only show Inflation if mint module is enabled - if (mintStore.mintModuleEnabled) { - statsArray.push({ + // Only show Inflation if mint module is enabled + ...(mintStore.mintModuleEnabled ? [{ title: 'Inflation', color: 'success', icon: 'mdi-chart-multiple', stats: formatter.formatDecimalToPercent(mintStore.inflation), change: 0, - }); - } - - statsArray.push({ - title: 'Community Pool', - color: 'primary', - icon: 'mdi-bank', - stats: formatter.formatTokens( - // @ts-ignore - this.communityPool?.filter((x: Coin) => x.denom === staking.params.bond_denom) - ), - change: 0, - }); - - return statsArray; + }] : []), + { + title: 'Community Pool', + color: 'primary', + icon: 'mdi-bank', + stats: formatter.formatTokens( + // @ts-ignore + this.communityPool?.filter((x: Coin) => x.denom === staking.params.bond_denom) + ), + change: 0, + }, + ]; }, coingeckoId() { diff --git a/src/plugins/i18n/locales/de.json b/src/plugins/i18n/locales/de.json index 32fa894e..d6042035 100644 --- a/src/plugins/i18n/locales/de.json +++ b/src/plugins/i18n/locales/de.json @@ -23,7 +23,7 @@ "links": "Links" }, "pages": { - "title": "Ping Dashboard", + "title": "Zenith Dashboard", "title_all": "404", "tag": "Beta", "tag_all": "Seite nicht gefunden", diff --git a/src/plugins/i18n/locales/id.json b/src/plugins/i18n/locales/id.json index 261eadcd..07efe4e3 100644 --- a/src/plugins/i18n/locales/id.json +++ b/src/plugins/i18n/locales/id.json @@ -21,7 +21,7 @@ "links": "Tautan" }, "pages": { - "title": "Laconic Explorer", + "title": "Zenith Explorer", "title_all": "404", "tag": "Beta", "tag_all": "Halaman Tidak Ditemukan", diff --git a/src/plugins/i18n/locales/ja.json b/src/plugins/i18n/locales/ja.json index c0ac1c8a..d3d46f24 100644 --- a/src/plugins/i18n/locales/ja.json +++ b/src/plugins/i18n/locales/ja.json @@ -23,7 +23,7 @@ "links": "リンク" }, "pages": { - "title": "Ping ダッシュボード", + "title": "Zenith ダッシュボード", "title_all": "404", "tag": "ベータ", "tag_all": "ページが見つかりません", diff --git a/src/plugins/i18n/locales/ko.json b/src/plugins/i18n/locales/ko.json index 8fe5b77b..02aee007 100644 --- a/src/plugins/i18n/locales/ko.json +++ b/src/plugins/i18n/locales/ko.json @@ -23,7 +23,7 @@ "links": "링크" }, "pages": { - "title": "핑 대시보드", + "title": "제니스 대시보드", "title_all": "404", "tag": "베타", "tag_all": "페이지를 찾을 수 없습니다", diff --git a/src/plugins/i18n/locales/zh.json b/src/plugins/i18n/locales/zh.json index 7627ceac..41069407 100644 --- a/src/plugins/i18n/locales/zh.json +++ b/src/plugins/i18n/locales/zh.json @@ -22,7 +22,7 @@ "links": "链接" }, "pages": { - "title": "Laconic Explorer", + "title": "Zenith Explorer", "slogan": "Ping Dashboard 是一个区块链浏览器,也是一个网页钱包,还有更多 ... 🛠", "description": "Cosmos Ecosystem Blockchains 🚀", "search_placeholder": "搜索区块链", diff --git a/src/stores/useMintStore.ts b/src/stores/useMintStore.ts index e2f86c23..f9b1c26d 100644 --- a/src/stores/useMintStore.ts +++ b/src/stores/useMintStore.ts @@ -5,7 +5,7 @@ export const useMintStore = defineStore('mintStore', { state: () => { return { inflation: '0', - mintModuleEnabled: true, + mintModuleEnabled: false, }; }, getters: { @@ -26,12 +26,11 @@ export const useMintStore = defineStore('mintStore', { } } catch (e: any) { // Check if module is not implemented/enabled - const errorMessage = e?.message || e?.toString() || ''; - if (errorMessage.includes('Not Implemented') || e?.status === 501) { + if (e?.status === 501) { // Module not enabled this.mintModuleEnabled = false; } else { - console.log(e); + console.error(e); } } }, -- 2.45.2 From 1febe02507cba215b474cdeab82bcce7a1252c88 Mon Sep 17 00:00:00 2001 From: Pranav Date: Fri, 7 Nov 2025 12:10:52 +0530 Subject: [PATCH 3/3] Upgrade package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5647a49..786f292e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ping.pub", - "version": "3.0.0-zenith-0.1.1", + "version": "3.0.1-zenith-0.1.2", "private": true, "target": "", "scripts": { -- 2.45.2