Skip to content

Commit

Permalink
fix: fix sdk_version bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan-LukeKlopper committed Apr 10, 2024
1 parent 9d66574 commit 353d9e4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/stores/useParamsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,17 @@ 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 })
);
this.nodeVersion.items = Object.entries(res.default_node_info).map(
([key, value]) => ({ subtitle: key, value: value })
);
if (res) {
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 })
);
this.nodeVersion.items = Object.entries(res.default_node_info).map(
([key, value]) => ({ subtitle: key, value: value })
);
} else {
localStorage.setItem(`sdk_version_${this.blockchain.chainName}`, "v0.45.1");
}
},
async getBaseTendermintBlockLatest() {
return await this.blockchain.rpc?.getBaseBlockLatest();
Expand Down

0 comments on commit 353d9e4

Please sign in to comment.