Skip to content

Commit

Permalink
Fix display vested account
Browse files Browse the repository at this point in the history
  • Loading branch information
atmoner committed Dec 11, 2024
1 parent c775be3 commit d8ec1bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stores/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ export const useAppStore = defineStore("app", {
this.fiatWalletValue = (totalToken * this.priceNow).toFixed(2);
},
async getVested(addrWallet) {
let getVestedAmount = await axios.get(cosmosConfig[2].apiURL + '/cosmos/auth/v1beta1/accounts/' + addrWallet)
let getVestedAmount = await axios.get(cosmosConfig[2].apiURL + '/cosmos/auth/v1beta1/accounts/' + addrWallet)
if (typeof getVestedAmount.data.account.base_vesting_account !== "undefined") {
if (Math.floor(Date.now() / 1000) < Number(getVestedAmount.data.account.base_vesting_account.end_time)) {
this.totalVested = (getVestedAmount.data.account.base_vesting_account.original_vesting[0].amount / 1000000)
}
}
},
async getBankModule(addrWallet) {
Expand Down

0 comments on commit d8ec1bc

Please sign in to comment.