Don't apply age tint to accelerated txs

This commit is contained in:
Mononaut 2024-04-06 03:44:58 +00:00
parent c45111333d
commit 7721f16f9f
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -133,6 +133,10 @@ export function ageColorFunction(
auditColors: { [status: string]: Color } = defaultAuditColors,
relativeTime?: number,
): Color {
if (tx.acc || tx.status === 'accelerated') {
return auditColors.accelerated;
}
const color = defaultColorFunction(tx, colors, auditColors, relativeTime);
const ageLevel = (!tx.time ? 0 : (0.8 * Math.tanh((1 / 15) * Math.log2((Math.max(1, 0.6 * ((relativeTime - tx.time) - 60)))))));