Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
manelgavalda committed Jan 14, 2024
1 parent 13f79b6 commit 9a7316b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions resources/js/Pages/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,8 @@
}
data.balances.forEach(newToken => {
const token = this.tokens[0][newToken.pool]
this.tokens[0][newToken.pool] = newToken
token.price = newToken.price
token.balance = newToken.balance
token.price_eur = newToken.price_eur
this.totals.usd += newToken.price * newToken.balance
this.totals.eur += newToken.price_eur * newToken.balance
this.totals.eth += newToken.price * newToken.balance / this.totals.pricesUsd
Expand Down
3 changes: 1 addition & 2 deletions resources/js/tests/dashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ it('refreshes_the_tokens', async () => {
"price": 20,
"balance": 10,
"price_eur": 19,
"pool": "Token 1",
"created_at": "now"
"pool": "Token 1"
})
})

0 comments on commit 9a7316b

Please sign in to comment.