Fix tx amount display to 4 decimal places, add relative time to tx detail
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
- Transaction values now use exactly 4 decimal places (was 6), matching balance display everywhere else - Transaction detail view shows "2026-02-25 15:04:23 (23 days ago)" instead of just the ISO date - Added Display Consistency policy to README
This commit is contained in:
@@ -7,8 +7,8 @@ const { log } = require("./log");
|
||||
|
||||
function formatTxValue(val) {
|
||||
const parts = val.split(".");
|
||||
if (parts.length === 1) return val;
|
||||
const dec = parts[1].slice(0, 6).replace(/0+$/, "") || "0";
|
||||
if (parts.length === 1) return val + ".0000";
|
||||
const dec = (parts[1] + "0000").slice(0, 4);
|
||||
return parts[0] + "." + dec;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user