diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart index fd0eecac3..0dd3458b6 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart @@ -1,5 +1,4 @@ import 'package:another_flushbar/flushbar.dart'; -import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/entities/desktop_dropdown_item.dart'; import 'package:cake_wallet/generated/i18n.dart'; @@ -8,8 +7,9 @@ import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_widget.dart'; import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:cake_wallet/themes/extensions/menu_theme.dart'; import 'package:cake_wallet/store/settings_store.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/themes/extensions/menu_theme.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart'; @@ -122,9 +122,7 @@ class _DesktopWalletSelectionDropDownState extends State( @@ -149,9 +147,7 @@ class _DesktopWalletSelectionDropDownState extends State _loadWallet(WalletListItem wallet) async { if (SettingsStoreBase.walletPasswordDirectInput) { - Navigator.of(context).pushNamed( - Routes.walletUnlockLoadable, + Navigator.of(context).pushNamed(Routes.walletUnlockLoadable, arguments: WalletUnlockArguments( callback: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { if (isAuthenticatedSuccessfully) { auth.close(); setState(() {}); } - }, walletName: wallet.name, + }, + walletName: wallet.name, walletType: wallet.type)); return; } - widget._authService.authenticateAction(context, - onAuthSuccess: (isAuthenticatedSuccessfully) async { - if (!isAuthenticatedSuccessfully) { - return; - } + widget._authService.authenticateAction( + context, + onAuthSuccess: (isAuthenticatedSuccessfully) async { + if (!isAuthenticatedSuccessfully) return; try { if (mounted) { diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index df2c7767f..ee145195c 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -1549,8 +1549,14 @@ abstract class SettingsStoreBase with Store { final macInfo = await deviceInfoPlugin.macOsInfo; deviceName = macInfo.computerName; } else if (Platform.isWindows) { - final windowsInfo = await deviceInfoPlugin.windowsInfo; - deviceName = windowsInfo.productName; + try { + final windowsInfo = await deviceInfoPlugin.windowsInfo; + deviceName = windowsInfo.productName; + } catch (e) { + print(e); + print('likely digitalProductId is null wait till https://github.com/fluttercommunity/plus_plugins/pull/3188 is merged'); + deviceName = "Windows Device"; + } } return deviceName;