fix balances

This commit is contained in:
liangping 2022-08-29 08:13:26 +08:00
parent d62cbf14fb
commit 081421d76e

View File

@ -452,9 +452,10 @@ export default {
Object.keys(this.accounts).forEach(acc => {
this.accounts[acc].address.forEach(add => {
this.$http.getBankBalances(add.addr, chains[add.chain]).then(res => {
if (res && res.length > 0) {
this.$set(this.balances, add.addr, res)
res.forEach(token => {
const { balances } = res
if (balances && balances.length > 0) {
this.$set(this.balances, add.addr, balances)
balances.forEach(token => {
if (token.denom.startsWith('ibc')) {
this.$http.getIBCDenomTrace(token.denom, chains[add.chain]).then(denom => {
this.$set(this.ibcDenom, token.denom, denom)