minor fix

This commit is contained in:
Matthew Fosse 2024-09-09 08:44:26 -07:00
parent 5d7db4e5b1
commit 91f4904e4a

View file

@ -152,12 +152,12 @@ Future<void> onStart(ServiceInstance service) async {
_syncTimer?.cancel();
_syncTimer = Timer.periodic(const Duration(milliseconds: 1500), (timer) {
// final wallet = getIt.get<AppStore>().wallet;
final wallet = syncingWallets.first;
final wallet = syncingWallets.first!;
final syncProgress = ((wallet?.syncStatus.progress() ?? 0) * 100).toStringAsPrecision(5);
flutterLocalNotificationsPlugin.show(
notificationId,
"${wallet.name} ${syncProgress}% Synced",
"${wallet!.name} ${syncProgress}% Synced",
'Background sync - ${DateTime.now()}',
const NotificationDetails(
android: AndroidNotificationDetails(