Skip to content

Commit

Permalink
Fix loading balance placeholer
Browse files Browse the repository at this point in the history
  • Loading branch information
reeshavacharya committed Sep 3, 2024
1 parent 38b9513 commit 9c38453
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.

This file was deleted.

7 changes: 4 additions & 3 deletions gov-action-loader/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ export default {
},
timeoutId: null,
fetchInterval: 7000,
loading: false
loading: true
}
},
methods: {
async updateBalance() {
this.loading = true;
try {
const response = await getBalance(this.selectedNetwork)
if (response.data?.address) {
Expand All @@ -94,8 +93,8 @@ export default {
} catch (error) {
console.error('Error updating balance:', error)
} finally {
this.loading = false;
this.timeoutId = setTimeout(this.updateBalance, this.fetchInterval)
this.loading = false;
}
},
},
Expand All @@ -104,7 +103,9 @@ export default {
if (this.timeoutId) {
clearTimeout(this.timeoutId)
}
this.loading = true;
this.updateBalance()
},
},
}
Expand Down

0 comments on commit 9c38453

Please sign in to comment.