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 => { Object.keys(this.accounts).forEach(acc => {
this.accounts[acc].address.forEach(add => { this.accounts[acc].address.forEach(add => {
this.$http.getBankBalances(add.addr, chains[add.chain]).then(res => { this.$http.getBankBalances(add.addr, chains[add.chain]).then(res => {
if (res && res.length > 0) { const { balances } = res
this.$set(this.balances, add.addr, res) if (balances && balances.length > 0) {
res.forEach(token => { this.$set(this.balances, add.addr, balances)
balances.forEach(token => {
if (token.denom.startsWith('ibc')) { if (token.denom.startsWith('ibc')) {
this.$http.getIBCDenomTrace(token.denom, chains[add.chain]).then(denom => { this.$http.getIBCDenomTrace(token.denom, chains[add.chain]).then(denom => {
this.$set(this.ibcDenom, token.denom, denom) this.$set(this.ibcDenom, token.denom, denom)