From b8b00481ddd5d5f3810c3a6162627c35d3ffc88d Mon Sep 17 00:00:00 2001 From: ncantu Date: Mon, 26 Jan 2026 02:06:22 +0100 Subject: [PATCH] =?UTF-8?q?Doc:=20dashboard=20home=20capacit=C3=A9=20ancra?= =?UTF-8?q?ge=20restante?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations:** - Documenter pourquoi Capacité d'Ancrage Restante affichait 0 **Root causes:** - /api/utxo/count cherchait 'anchor' mais fichier utilise 'ancrages' **Correctifs:** - Déjà corrigé dans commit précédent **Evolutions:** - Aucune **Pages affectées:** - fixKnowledge/dashboard-available-for-anchor-display.md --- .../dashboard-available-for-anchor-display.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 fixKnowledge/dashboard-available-for-anchor-display.md diff --git a/fixKnowledge/dashboard-available-for-anchor-display.md b/fixKnowledge/dashboard-available-for-anchor-display.md new file mode 100644 index 0000000..9a3a72f --- /dev/null +++ b/fixKnowledge/dashboard-available-for-anchor-display.md @@ -0,0 +1,35 @@ +# Dashboard home : Capacité d'Ancrage Restante affiche 0 + +**Auteur** : Équipe 4NK +**Date** : 2026-01-26 +**Version** : 1.0 + +## Problème + +Sur la page home du dashboard, la **Capacité d'Ancrage Restante** affiche **0 ancrages** alors que `/api/utxo/count` retourne `availableForAnchor: 30507`. + +## Cause racine + +L'endpoint `/api/utxo/count` cherchait uniquement la catégorie `'anchor'` dans `utxo_list.txt`, mais le fichier utilise la catégorie `'ancrages'` (pluriel). Donc aucun UTXO n'était compté. + +## Correctifs + +- **`/api/utxo/count`** : accepter `'anchor'` OU `'ancrages'` lors du comptage +- Le code d'affichage dans `app.js` (`loadAvailableForAnchor()`) était déjà correct, il utilisait bien `/api/utxo/count` + +## Évolutions + +- Aucune + +## Pages affectées + +- `signet-dashboard/src/server.js` : route `/api/utxo/count` + +## Vérification + +```bash +curl -s http://localhost:3020/api/utxo/count | jq .availableForAnchor +# Devrait retourner 30507 (ou le nombre réel d'ancrages disponibles) +``` + +Le dashboard home devrait maintenant afficher correctement la capacité d'ancrage restante.