Aegis — the multi-chain wallet built into Theseus (BCH, BTC, DGB, ETH, SOL, TRX, SC)
Eight decimals of tail sat exactly where the eye lands. The hero now shows two decimals once there is a whole part, because the whole units already carry the significant digits, and digs past leading zeros otherwise so amounts under 1 keep roughly four significant figures: 1204.23234145 -> 1,204.23 0.23234145 -> 0.2323 0.00012345 -> 0.0001234 0.00000001 -> 0.00000001 A flat "two decimal places" rule is the obvious version of this and it is wrong: it renders 0.00042 BCH as 0.00 and the wallet reads as empty. The rule here never collapses a non-zero balance to zeros, and it truncates rather than rounds, so the figure shown is never more than the wallet holds and sending the displayed amount always clears. An ellipsis marks the cut, hover gives the exact figure, clicking pins full precision and is remembered. Only this hero abbreviates — Send, MAX, history and the wallet strip still call fmtBig, so every number acted on is exact. Also repairs the regexes in the same function, which lost their backslashes when the earlier commit was scripted: /^(-?)(\d+)(\.\d+)?$/ had become /^(-?)(d+)(.d+)?$/, matching the letter "d". Still valid JS, so it parsed cleanly and every balance quietly fell through to unformatted text — the grouping and the dimmed decimals introduced in bb639a9 had never once run. Caught by testing the function body extracted from the file rather than a transcription of it. |
||
|---|---|---|
| lib | ||
| addon.json | ||
| electrum-servers.json | ||
| index.js | ||
| panel.html | ||
| panel.js | ||
| qr.js | ||
| wallet-inject.js | ||