diff --git a/webapp/app/Models/Economy.php b/webapp/app/Models/Economy.php index 4a67d1b36..6e82aa0c2 100644 --- a/webapp/app/Models/Economy.php +++ b/webapp/app/Models/Economy.php @@ -429,7 +429,8 @@ public function userHasBalance() { * @return string Formatted balance */ public function formatUserBalance($format = BALANCE_FORMAT_PLAIN) { - return $this->calcUserBalance()->formatAmount($format); + $balance = $this->calcUserBalance(); + return $balance != null ? $balance->formatAmount($format) : $balance; } /** diff --git a/webapp/resources/views/community/wallet/index.blade.php b/webapp/resources/views/community/wallet/index.blade.php index 46968af06..129333f0c 100644 --- a/webapp/resources/views/community/wallet/index.blade.php +++ b/webapp/resources/views/community/wallet/index.blade.php @@ -41,7 +41,7 @@ 'economyId' => $economy->id, ]) }}" class="item"> {{ $economy->name }} - {!! $economy->formatBalance(BALANCE_FORMAT_LABEL) !!} + {!! $economy->formatUserBalance(BALANCE_FORMAT_LABEL) !!} {{ trans_choice('pages.wallets.#wallets', $economy->user_wallet_count) }}