From 32299975c3ed91db74401fd710e9c3dc3c64c845 Mon Sep 17 00:00:00 2001 From: julian-CStack <97684800+julian-CStack@users.noreply.github.com> Date: Fri, 30 Dec 2022 11:21:46 -0600 Subject: [PATCH] fixes (#280) * xmr send fix * small screen recovery phrase warning view fix * mnemonic field crashes fix --- ...w_wallet_recovery_phrase_warning_view.dart | 34 ++++++++++++++++--- .../restore_wallet_view.dart | 6 ++++ lib/services/coins/monero/monero_wallet.dart | 6 ++-- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart index b159fb9aa..97dc91361 100644 --- a/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart +++ b/lib/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart @@ -19,6 +19,7 @@ import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/util.dart'; +import 'package:stackwallet/widgets/conditional_parent.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart'; import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart'; @@ -105,8 +106,25 @@ class _NewWalletRecoveryPhraseWarningViewState ) ], ), - body: Padding( - padding: EdgeInsets.all(isDesktop ? 0 : 16), + body: ConditionalParent( + condition: !isDesktop, + builder: (child) => LayoutBuilder( + builder: (context, constraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight( + child: Padding( + padding: const EdgeInsets.all(16), + child: child, + ), + ), + ), + ); + }, + ), child: Column( crossAxisAlignment: isDesktop ? CrossAxisAlignment.center @@ -315,9 +333,11 @@ class _NewWalletRecoveryPhraseWarningViewState const SizedBox( width: 20, ), - Text( - "Do not show them to anyone.", - style: STextStyles.navBarTitle(context), + Expanded( + child: Text( + "Do not show them to anyone.", + style: STextStyles.navBarTitle(context), + ), ), ], ), @@ -327,6 +347,10 @@ class _NewWalletRecoveryPhraseWarningViewState ), ), if (!isDesktop) const Spacer(), + if (!isDesktop) + const SizedBox( + height: 16, + ), if (isDesktop) const SizedBox( height: 32, diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart index 7a21a6f72..bb2628192 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart @@ -736,6 +736,8 @@ class _RestoreWalletViewState extends ConsumerState { child: Column( children: [ TextFormField( + autocorrect: !isDesktop, + enableSuggestions: !isDesktop, textCapitalization: TextCapitalization.none, key: Key( @@ -831,6 +833,8 @@ class _RestoreWalletViewState extends ConsumerState { child: Column( children: [ TextFormField( + autocorrect: !isDesktop, + enableSuggestions: !isDesktop, textCapitalization: TextCapitalization.none, key: Key( @@ -954,6 +958,8 @@ class _RestoreWalletViewState extends ConsumerState { padding: const EdgeInsets.symmetric(vertical: 4), child: TextFormField( + autocorrect: !isDesktop, + enableSuggestions: !isDesktop, textCapitalization: TextCapitalization.none, key: Key("restoreMnemonicFormField_$i"), diff --git a/lib/services/coins/monero/monero_wallet.dart b/lib/services/coins/monero/monero_wallet.dart index 82d8610a7..2f72e0dc2 100644 --- a/lib/services/coins/monero/monero_wallet.dart +++ b/lib/services/coins/monero/monero_wallet.dart @@ -141,7 +141,7 @@ class MoneroWallet extends CoinServiceAPI { @override // not used for monero - Future> get allOwnAddresses => throw UnimplementedError(); + Future> get allOwnAddresses async => []; @override Future get availableBalance async { @@ -841,9 +841,9 @@ class MoneroWallet extends CoinServiceAPI { } @override - Future updateSentCachedTxData(Map txData) { + Future updateSentCachedTxData(Map txData) async { // not used for xmr - throw UnimplementedError(); + return; } @override