From 7015c160f0215db242ad06716793d0137edcd1bb Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 31 Jan 2026 13:35:22 +0000 Subject: [PATCH] fix: Use getValidAccessToken() in connectivity banner sync button Replace direct authProvider.tokens?.accessToken access with getValidAccessToken() so the Sync Now button works in API-key auth mode where _tokens is null. https://claude.ai/code/session_01DnyCzdMjVpSsbBZK3XbzUH --- mobile/lib/widgets/connectivity_banner.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mobile/lib/widgets/connectivity_banner.dart b/mobile/lib/widgets/connectivity_banner.dart index ece413fd8..05f5789cd 100644 --- a/mobile/lib/widgets/connectivity_banner.dart +++ b/mobile/lib/widgets/connectivity_banner.dart @@ -101,11 +101,15 @@ class _ConnectivityBannerState extends State { return TextButton( onPressed: _isSyncing ? null - : () => _handleSync( + : () async { + final accessToken = await authProvider.getValidAccessToken(); + if (!context.mounted) return; + _handleSync( context, - authProvider.tokens?.accessToken, + accessToken, transactionsProvider, - ), + ); + }, style: TextButton.styleFrom( foregroundColor: Colors.blue.shade900, ),