use twig filters for account balance format

This commit is contained in:
ghost 2024-02-18 17:36:35 +02:00
parent f36d22393a
commit 9c2464d7fb
2 changed files with 2 additions and 9 deletions

View File

@ -131,13 +131,6 @@ class UserController extends AbstractController
$list[] =
[
'name' => $user['key'],
'balance' => $client->getBalance(
$user['key'],
$this->getParameter('app.pool.confirmations')
),
'address' => $client->getAccountAddress(
$user['key']
),
'total' => $total,
'rooms' => $rooms,
];

View File

@ -10,10 +10,10 @@
@{{ user.name }}
</strong>
<span style="float:right">{# @TODO #}
{{ 'balance: %s KVA' | trans | format(user.balance) }}
{{ 'balance' | trans }}: {{ user.name | account_balance | format_kva }}
</span>
<p>
{{ 'boost' | trans }}: {{ user.address }}
{{ 'boost' | trans }}: {{ user.name | account_address }}
</p>
{% if user.rooms | length %}
<p>