address utxo chart color by age & updates

This commit is contained in:
Mononaut
2024-09-22 16:49:08 +00:00
parent 1038b4f908
commit 06e699e52b
5 changed files with 211 additions and 74 deletions

View File

@@ -204,12 +204,12 @@ export function renderSats(value: number, network: string, mode: 'sats' | 'btc'
break;
}
if (mode === 'btc' || (mode === 'auto' && value >= 1000000)) {
return `${amountShortenerPipe.transform(value / 100000000)} ${prefix}BTC`;
return `${amountShortenerPipe.transform(value / 100000000, 2)} ${prefix}BTC`;
} else {
if (prefix.length) {
prefix += '-';
}
return `${amountShortenerPipe.transform(value)} ${prefix}sats`;
return `${amountShortenerPipe.transform(value, 2)} ${prefix}sats`;
}
}