minor notification updates

This commit is contained in:
Matthew Fosse 2024-09-12 10:49:48 -07:00
parent 756fb3d0e2
commit ab3c1497fb

View file

@ -207,14 +207,16 @@ Future<void> onStart(ServiceInstance service) async {
for (int i = 0; i < syncingWallets.length; i++) {
final wallet = syncingWallets[i];
final syncProgress = ((wallet!.syncStatus.progress()) * 100).toStringAsPrecision(5);
String title = "${wallet.name} - ${wallet.type}";
String prefix = walletTypeToCryptoCurrency(wallet.type).title;
String title = "$prefix - ${wallet.name}";
late String content;
try {
final blocksLeft = (wallet.syncStatus as SyncingSyncStatus).blocksLeft;
content = "${blocksLeft} Blocks Left";
} catch (e) {
print(e);
content = "${wallet.name} ${syncProgress}% Synced";
content = "${syncProgress}% Synced";
}
content += " - ${DateTime.now()}";