AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 27 Bitcoin

fix: render negative amounts correctly in format_btc

Public commit record

What the developer wrote

Authored by odudex

85/100 · Strong
fix: render negative amounts correctly in format_btc

Floor division and modulo round towards minus infinity, so -1000 sats
was shown as -1.99 999 000. Take the sign out before splitting.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a display bug in how Krux formats negative Bitcoin amounts. Previously, a value like -1000 satoshis was shown incorrectly as roughly -1.99 bitcoins instead of -0.00001 bitcoins, because the code split the number before handling the minus sign. The fix simply removes the sign, formats the absolute value, then reattaches the minus sign. It is a user-interface bug, not a wallet-security vulnerability.

Recommended action

No security action required beyond normal review and merge. Users relying on displayed balances should verify negative amounts render correctly after updating.

Security signals we found

01

UI/display bug in financial amount rendering

02

No cryptographic, authorization, or memory-safety changes

03

No input validation, parsing, or serialization of untrusted data changed

Risk score

Why this scored 27/100

Our methodology →
Potential impact 5/30
Exploitability 0/25
Stealth signal 3/15
Affected reach 5/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.