From 85f8defbce006daa83eaa8537147e8d8d5703e3e Mon Sep 17 00:00:00 2001 From: Hermes Admin Date: Sun, 31 May 2026 06:07:33 +0800 Subject: [PATCH] fix: guard pool metrics against NaN/Infinity/undefined values (fixes #6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add safe() helper to sanitize all displayed metric values - Guard feeAPY calculation against zero/div-by-zero (produces Infinity) - Show '…' during loading state instead of raw NaN/undefined - Handle edge case: % of Pool when poolBalance is falsy - All numeric cells now gracefully degrade to '—' or '0' --- src/components/pool/Pools.svelte | 44 +++++++++++++++++++------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/src/components/pool/Pools.svelte b/src/components/pool/Pools.svelte index 2ad0552..2f75c10 100644 --- a/src/components/pool/Pools.svelte +++ b/src/components/pool/Pools.svelte @@ -1,4 +1,5 @@