Browse Source

use twig filters for account balance format

main
ghost 4 months ago
parent
commit
9c2464d7fb
  1. 7
      src/Controller/UserController.php
  2. 4
      templates/default/user/list.html.twig

7
src/Controller/UserController.php

@ -131,13 +131,6 @@ class UserController extends AbstractController @@ -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,
];

4
templates/default/user/list.html.twig

@ -10,10 +10,10 @@ @@ -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>

Loading…
Cancel
Save