From 9c2464d7fb69fddb84ab0b691ba169a403db7891 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 18 Feb 2024 17:36:35 +0200 Subject: [PATCH] use twig filters for account balance format --- src/Controller/UserController.php | 7 ------- templates/default/user/list.html.twig | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index ebd6e9f..c37d405 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -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, ]; diff --git a/templates/default/user/list.html.twig b/templates/default/user/list.html.twig index 8a499de..69b159f 100644 --- a/templates/default/user/list.html.twig +++ b/templates/default/user/list.html.twig @@ -10,10 +10,10 @@ @{{ user.name }} {# @TODO #} - {{ 'balance: %s KVA' | trans | format(user.balance) }} + {{ 'balance' | trans }}: {{ user.name | account_balance | format_kva }}

- {{ 'boost' | trans }}: {{ user.address }} + {{ 'boost' | trans }}: {{ user.name | account_address }}

{% if user.rooms | length %}