From 286f6a552b07294ad9f4d6795f74e7d834162376 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 24 Nov 2022 18:16:26 -0600 Subject: [PATCH] desktop send to coin ticker fixed --- .../exchange_view/confirm_change_now_send.dart | 11 ++++++++--- lib/pages/send_view/confirm_transaction_view.dart | 13 ++++++++++--- .../wallet_view/sub_widgets/desktop_auth_send.dart | 14 +++++++++----- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/lib/pages/exchange_view/confirm_change_now_send.dart b/lib/pages/exchange_view/confirm_change_now_send.dart index 0e1eef755..810ea2541 100644 --- a/lib/pages/exchange_view/confirm_change_now_send.dart +++ b/lib/pages/exchange_view/confirm_change_now_send.dart @@ -157,6 +157,9 @@ class _ConfirmChangeNowSendViewState Future _confirmSend() async { final dynamic unlocked; + final coin = + ref.read(walletsChangeNotifierProvider).getManager(walletId).coin; + if (Util.isDesktop) { unlocked = await showDialog( context: context, @@ -172,13 +175,15 @@ class _ConfirmChangeNowSendViewState DesktopDialogCloseButton(), ], ), - const Padding( - padding: EdgeInsets.only( + Padding( + padding: const EdgeInsets.only( left: 32, right: 32, bottom: 32, ), - child: DesktopAuthSend(), + child: DesktopAuthSend( + coin: coin, + ), ), ], ), diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index fd5341dd9..16de6cf55 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -784,6 +784,11 @@ class _ConfirmTransactionViewState onPressed: () async { final dynamic unlocked; + final coin = ref + .read(walletsChangeNotifierProvider) + .getManager(walletId) + .coin; + if (isDesktop) { unlocked = await showDialog( context: context, @@ -799,13 +804,15 @@ class _ConfirmTransactionViewState DesktopDialogCloseButton(), ], ), - const Padding( - padding: EdgeInsets.only( + Padding( + padding: const EdgeInsets.only( left: 32, right: 32, bottom: 32, ), - child: DesktopAuthSend(), + child: DesktopAuthSend( + coin: coin, + ), ), ], ), diff --git a/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart b/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart index a8d1ea497..20bb3f95a 100644 --- a/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart +++ b/lib/pages_desktop_specific/home/my_stack_view/wallet_view/sub_widgets/desktop_auth_send.dart @@ -6,17 +6,21 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:stackwallet/providers/desktop/storage_crypto_handler_provider.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/desktop/primary_button.dart'; import 'package:stackwallet/widgets/desktop/secondary_button.dart'; +import 'package:stackwallet/widgets/loading_indicator.dart'; import 'package:stackwallet/widgets/stack_text_field.dart'; -import '../../../../../notifications/show_flush_bar.dart'; -import '../../../../../widgets/loading_indicator.dart'; - class DesktopAuthSend extends ConsumerStatefulWidget { - const DesktopAuthSend({Key? key}) : super(key: key); + const DesktopAuthSend({ + Key? key, + required this.coin, + }) : super(key: key); + + final Coin coin; @override ConsumerState createState() => _DesktopAuthSendState(); @@ -72,7 +76,7 @@ class _DesktopAuthSendState extends ConsumerState { height: 16, ), Text( - "Enter your wallet password to send BTC", + "Enter your wallet password to send ${widget.coin.ticker.toUpperCase()}", style: STextStyles.desktopTextMedium(context).copyWith( color: Theme.of(context).extension()!.textDark3, ),