dynmic update sdk version
This commit is contained in:
parent
4fa1391e01
commit
fe659f8f61
@ -41,7 +41,13 @@ export const useBlockchain = defineStore('blockchain', {
|
||||
},
|
||||
getters: {
|
||||
current(): ChainConfig | undefined {
|
||||
return this.dashboard.chains[this.chainName];
|
||||
const chain = this.dashboard.chains[this.chainName]
|
||||
// update chain config with dynamic updated sdk version
|
||||
const sdkversion = localStorage.getItem(`sdk_version_${this.chainName}`)
|
||||
if(sdkversion && chain?.versions) {
|
||||
chain.versions.cosmosSdk = sdkversion;
|
||||
}
|
||||
return chain;
|
||||
},
|
||||
logo(): string {
|
||||
return this.current?.logo || '';
|
||||
|
@ -193,6 +193,9 @@ export const useParamStore = defineStore('paramstore', {
|
||||
},
|
||||
async handleAbciInfo() {
|
||||
const res = await this.fetchAbciInfo();
|
||||
|
||||
localStorage.setItem(`sdk_version_${this.blockchain.chainName}`, res.application_version?.cosmos_sdk_version);
|
||||
|
||||
this.appVersion.items = Object.entries(res.application_version).map(
|
||||
([key, value]) => ({ subtitle: key, value: value })
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user