diff --git a/app/Livewire/Tokens.php b/app/Livewire/Tokens.php index 7a99c16..9571110 100644 --- a/app/Livewire/Tokens.php +++ b/app/Livewire/Tokens.php @@ -27,12 +27,10 @@ public function reloadTokens() { $result = Http::get(config('tokens.api_url'))->object(); - $tokens = collect($result->balances); - $this->tokens->shift(); $this->tokens->prepend( - $tokens->sortBy(fn ($token) => $token->price * $token->balance) + $tokens = collect($result->balances)->sortBy(fn ($token) => $token->price * $token->balance) ); $this->balances['prices'][] = $result->ethereumPrice->usd;