diff --git a/src/modules/[chain]/params/index.vue b/src/modules/[chain]/params/index.vue
index 9308e665..1687313e 100644
--- a/src/modules/[chain]/params/index.vue
+++ b/src/modules/[chain]/params/index.vue
@@ -32,7 +32,9 @@ onMounted(() => {
+
+
diff --git a/src/plugins/vuetify/@core/components/ThemeSwitcher.vue b/src/plugins/vuetify/@core/components/ThemeSwitcher.vue
index 83eb9269..2afdd0b6 100644
--- a/src/plugins/vuetify/@core/components/ThemeSwitcher.vue
+++ b/src/plugins/vuetify/@core/components/ThemeSwitcher.vue
@@ -18,9 +18,7 @@ const {
);
const changeTheme = () => {
- theme.value = getNextThemeName();
- console.log(theme.value, 'theme.value', window.matchMedia('(prefers-color-scheme: dark)').matches)
-
+ theme.value = getNextThemeName();
};
const changeMode = (val: 'dark' | 'light' | 'system') => {
diff --git a/src/stores/useDashboard.ts b/src/stores/useDashboard.ts
index 0cf50876..2fa2a93b 100644
--- a/src/stores/useDashboard.ts
+++ b/src/stores/useDashboard.ts
@@ -71,6 +71,7 @@ export interface ChainConfig {
tendermint?: string,
},
exponent: string,
+ excludes?: string,
}
export interface LocalConfig {
diff --git a/src/stores/useParamsStore.ts b/src/stores/useParamsStore.ts
index 9fab4b0b..4005bf98 100644
--- a/src/stores/useParamsStore.ts
+++ b/src/stores/useParamsStore.ts
@@ -18,10 +18,10 @@ export const useParamStore = defineStore("paramstore", {
title: '',
class: 'border-primary',
items: [
- { subtitle: 'height', icon: 'BoxIcon', color: 'light-success', value: '' },
- { subtitle: 'bonded_and_supply', icon: 'DollarSignIcon', color: 'light-danger', value: '' },
- { subtitle: 'bonded_ratio', icon: 'PercentIcon', color: 'light-warning', value: '' },
- { subtitle: 'inflation', icon: 'TrendingUpIcon', color: 'light-primary', value: '' },
+ { subtitle: 'height', icon: 'BoxIcon', color: 'light-success', value: '-' },
+ { subtitle: 'bonded_and_supply', icon: 'DollarSignIcon', color: 'light-danger', value: '-' },
+ { subtitle: 'bonded_ratio', icon: 'PercentIcon', color: 'light-warning', value: '-' },
+ { subtitle: 'inflation', icon: 'TrendingUpIcon', color: 'light-primary', value: '-' },
],
},
mint: {
@@ -48,13 +48,18 @@ export const useParamStore = defineStore("paramstore", {
getters: {
blockchain() {
return useBlockchain()
+ },
+ excludes() {
+ return this.blockchain().current?.excludes
}
},
actions: {
initial() {
this.handleBaseBlockLatest()
- this.handleMintParam()
+ // this.handleMintParam()
this.handleStakingParams()
+ this.handleSlashingParams()
+ this.handleDistributionParams()
},
async handleBaseBlockLatest() {
try {
@@ -93,9 +98,33 @@ export const useParamStore = defineStore("paramstore", {
})
},
async handleMintParam() {
+ const excludes = this.blockchain.current?.excludes
+ if(excludes && excludes.indexOf('mint') > -1){
+ return
+ }
+ // this.getMintingInflation().then(res => {
+ // const chainIndex = this.chain.items.findIndex(x => x.subtitle === 'inflation')
+ // this.chain.items[chainIndex].value = `${percent(res)}%`
+ // })
const res = await this.getMintParam()
console.log(res, 'mint')
-
+ },
+ async handleSlashingParams(){
+ const res = await this.getSlashingParams()
+ this.slashing.items = Object.entries(res.params).map(([key, value]) => ({ subtitle:key,
+ value: value }))
+ console.log('Slashing', res)
+ },
+ async handleDistributionParams(){
+ const res = await this.getDistributionParams()
+ this.distribution.items = Object.entries(res.params).map(([key, value]) => ({ subtitle: key,
+ value: value }))
+ },
+ async handleGovernanceParams() {
+ if(this.excludes && this.excludes.indexOf('governance') > -1){
+ return
+ }
+
},
async getBaseTendermintBlockLatest() {
return await this.blockchain.rpc.getBaseBlockLatest()
@@ -118,7 +147,23 @@ export const useParamStore = defineStore("paramstore", {
// return this.get(`/supply/total/${denom}`).then(data => ({ amount: commonProcess(data), denom }))
// }
// return this.get(`/cosmos/bank/v1beta1/supply/${denom}`).then(data => commonProcess(data).amount)
- }
+ },
+ async getSlashingParams() {
+ return await this.blockchain.rpc.getSlashingParams()
+ },
+ async getDistributionParams() {
+ return await this.blockchain.rpc.getDistributionParams()
+ },
+ async getGovParamsVoting() {
+ return await this.blockchain.rpc.getGovParamsVoting()
+ },
+ async getGovParamsDeposit() {
+ return await this.blockchain.rpc.getGovParamsDeposit()
+ },
+ async getGovParamsTally() {
+ return await this.blockchain.rpc.getGovParamsTally()
+ },
+
}