feat: live timer

closes #23
This commit is contained in:
2025-05-16 12:33:34 +01:00
parent dcf42e7a78
commit b5e0822d6c
3 changed files with 72 additions and 8 deletions

View File

@ -374,6 +374,14 @@ Map<String, TopZaps> topZapReceiver(Iterable<ZapReceipt> zaps) {
);
}
String formatSecondsToHHMMSS(int seconds) {
int hours = seconds ~/ 3600;
int minutes = (seconds % 3600) ~/ 60;
int remainingSeconds = seconds % 60;
return '${hours.toString().padLeft(2, '0')}:${minutes.toString().padLeft(2, '0')}:${remainingSeconds.toString().padLeft(2, '0')}';
}
String bech32ToHex(String bech32) {
final decoder = Bech32Decoder();
final data = decoder.convert(bech32, 10_000);