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.