diff --git a/src/layouts/components/Navbar.vue b/src/layouts/components/Navbar.vue index a7571c93..9790ae65 100644 --- a/src/layouts/components/Navbar.vue +++ b/src/layouts/components/Navbar.vue @@ -117,7 +117,7 @@ {{ item.wallet }} { - const name = { - name: res.data, - provider: 'Stargaze', - } - if (this.names[v]) { - this.names[v].push(name) - } else { - this.names[v] = [name] - } - }) - resolvePrimaryDomainByAddress(this.address).then(result => { - if (result.isOk()) { + if (!this.loading.includes(v)) { + this.loading.push(v) + this.$http.resolveStarName(v).then(res => { const name = { - name: result.value, - provider: 'IBC Domain', + name: res.data, + provider: 'Stargaze', } if (this.names[v]) { this.names[v].push(name) } else { this.names[v] = [name] } - } - }) + }) + resolvePrimaryDomainByAddress(this.address).then(result => { + if (result.isOk()) { + const name = { + name: result.value, + provider: 'IBC Domain', + } + if (this.names[v]) { + this.names[v].push(name) + } else { + this.names[v] = [name] + } + } + }) + } return v.substring(0, 10).concat('...', v.substring(v.length - 10)) }, updateDefaultWallet(v) {