Skip to content

Commit

Permalink
fix(tools): show total supply (PundiAI#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code authored Mar 13, 2024
1 parent 8a9271f commit 6404cff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 7 additions & 2 deletions docs/tools/balances.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@
}
return balances
}
let balances = getBalances(moduleAddress)
let balances
if (moduleAddress === "") {
balances = getTotalSupply()
}else{
balances = getBalances(moduleAddress)
}
balances = balancesSymbol(balances);

let results = []
Expand Down Expand Up @@ -159,7 +164,7 @@
bridgeURL: bridgeURL,
blockchain: blockchain,
denom: balance.denom,
symbol: balance.symbol,
symbol: balance.symbol ? balance.symbol : "UNKNOWN",
amount: Number(BigInt(balance.amount) / BigInt(decimal)) / 100,
})
}
Expand Down
3 changes: 0 additions & 3 deletions docs/tools/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ function getSigningInfos() {
}

function getBalances(address) {
if (address) {
return getTotalSupply()
}
const result = httpGetJson(getRestUrl() + `/cosmos/bank/v1beta1/balances/${address}`)
return result.balances
}
Expand Down

0 comments on commit 6404cff

Please sign in to comment.