feat: Disable Camera Action in Wallet Restore for Desktop (#2263)

This commit is contained in:
David Adegoke 2025-05-13 13:00:22 +01:00 committed by GitHub
parent 82e3ebf4fa
commit ca2c953cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,8 @@ class _RestoreOptionsBodyState extends State<_RestoreOptionsBody> {
final mainImageColor = Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor; final mainImageColor = Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor;
final brightImageColor = Theme.of(context).extension<InfoTheme>()!.textColor; final brightImageColor = Theme.of(context).extension<InfoTheme>()!.textColor;
final imageColor = widget.themeType == ThemeType.bright ? brightImageColor : mainImageColor; final imageColor = widget.themeType == ThemeType.bright ? brightImageColor : mainImageColor;
final imageLedger = Image.asset('assets/images/hardware_wallet/ledger_nano_x.png', width: 40, color: imageColor); final imageLedger = Image.asset('assets/images/hardware_wallet/ledger_nano_x.png',
width: 40, color: imageColor);
final imageSeedKeys = Image.asset('assets/images/restore_wallet_image.png', color: imageColor); final imageSeedKeys = Image.asset('assets/images/restore_wallet_image.png', color: imageColor);
final imageBackup = Image.asset('assets/images/backup.png', color: imageColor); final imageBackup = Image.asset('assets/images/backup.png', color: imageColor);
@ -78,9 +79,7 @@ class _RestoreOptionsBodyState extends State<_RestoreOptionsBody> {
children: <Widget>[ children: <Widget>[
OptionTile( OptionTile(
key: ValueKey('restore_options_from_seeds_or_keys_button_key'), key: ValueKey('restore_options_from_seeds_or_keys_button_key'),
onPressed: () => Navigator.pushNamed( onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletFromSeedKeys),
context,
Routes.restoreWalletFromSeedKeys),
image: imageSeedKeys, image: imageSeedKeys,
title: S.of(context).restore_title_from_seed_keys, title: S.of(context).restore_title_from_seed_keys,
description: S.of(context).restore_description_from_seed_keys, description: S.of(context).restore_description_from_seed_keys,
@ -101,13 +100,14 @@ class _RestoreOptionsBodyState extends State<_RestoreOptionsBody> {
padding: EdgeInsets.only(top: 24), padding: EdgeInsets.only(top: 24),
child: OptionTile( child: OptionTile(
key: ValueKey('restore_options_from_hardware_wallet_button_key'), key: ValueKey('restore_options_from_hardware_wallet_button_key'),
onPressed: () => Navigator.pushNamed( onPressed: () =>
context, Routes.restoreWalletFromHardwareWallet), Navigator.pushNamed(context, Routes.restoreWalletFromHardwareWallet),
image: imageLedger, image: imageLedger,
title: S.of(context).restore_title_from_hardware_wallet, title: S.of(context).restore_title_from_hardware_wallet,
description: S.of(context).restore_description_from_hardware_wallet, description: S.of(context).restore_description_from_hardware_wallet,
), ),
), ),
if (DeviceInfo.instance.isMobile)
Padding( Padding(
padding: EdgeInsets.only(top: 24), padding: EdgeInsets.only(top: 24),
child: OptionTile( child: OptionTile(