fix(panel): double negative sign on transaction amounts
Some checks failed
Deploy to Production / test (push) Failing after 34s

formatAmount now strips the sign since the renderer already prepends
+/- based on TYPE_CONFIG. Raw DB values like "-180" were getting a
second "-" prefix, showing as "--180".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
syntaxbullet
2026-04-05 16:28:40 +02:00
parent 451fb206a6
commit 9e95194627

View File

@@ -63,7 +63,8 @@ const PAGE_SIZES = [25, 50, 100];
function formatAmount(amount: string): string {
const n = BigInt(amount);
return n.toLocaleString();
const abs = n < 0n ? -n : n;
return abs.toLocaleString();
}
function formatDate(iso: string): string {