desktop send to coin ticker fixed

This commit is contained in:
julian 2022-11-24 18:16:26 -06:00
parent 3bda6620ef
commit 286f6a552b
3 changed files with 27 additions and 11 deletions

View file

@ -157,6 +157,9 @@ class _ConfirmChangeNowSendViewState
Future<void> _confirmSend() async { Future<void> _confirmSend() async {
final dynamic unlocked; final dynamic unlocked;
final coin =
ref.read(walletsChangeNotifierProvider).getManager(walletId).coin;
if (Util.isDesktop) { if (Util.isDesktop) {
unlocked = await showDialog<bool?>( unlocked = await showDialog<bool?>(
context: context, context: context,
@ -172,13 +175,15 @@ class _ConfirmChangeNowSendViewState
DesktopDialogCloseButton(), DesktopDialogCloseButton(),
], ],
), ),
const Padding( Padding(
padding: EdgeInsets.only( padding: const EdgeInsets.only(
left: 32, left: 32,
right: 32, right: 32,
bottom: 32, bottom: 32,
), ),
child: DesktopAuthSend(), child: DesktopAuthSend(
coin: coin,
),
), ),
], ],
), ),

View file

@ -784,6 +784,11 @@ class _ConfirmTransactionViewState
onPressed: () async { onPressed: () async {
final dynamic unlocked; final dynamic unlocked;
final coin = ref
.read(walletsChangeNotifierProvider)
.getManager(walletId)
.coin;
if (isDesktop) { if (isDesktop) {
unlocked = await showDialog<bool?>( unlocked = await showDialog<bool?>(
context: context, context: context,
@ -799,13 +804,15 @@ class _ConfirmTransactionViewState
DesktopDialogCloseButton(), DesktopDialogCloseButton(),
], ],
), ),
const Padding( Padding(
padding: EdgeInsets.only( padding: const EdgeInsets.only(
left: 32, left: 32,
right: 32, right: 32,
bottom: 32, bottom: 32,
), ),
child: DesktopAuthSend(), child: DesktopAuthSend(
coin: coin,
),
), ),
], ],
), ),

View file

@ -6,17 +6,21 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:stackwallet/providers/desktop/storage_crypto_handler_provider.dart'; import 'package:stackwallet/providers/desktop/storage_crypto_handler_provider.dart';
import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/constants.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/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/widgets/desktop/primary_button.dart'; import 'package:stackwallet/widgets/desktop/primary_button.dart';
import 'package:stackwallet/widgets/desktop/secondary_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 'package:stackwallet/widgets/stack_text_field.dart';
import '../../../../../notifications/show_flush_bar.dart';
import '../../../../../widgets/loading_indicator.dart';
class DesktopAuthSend extends ConsumerStatefulWidget { 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 @override
ConsumerState<DesktopAuthSend> createState() => _DesktopAuthSendState(); ConsumerState<DesktopAuthSend> createState() => _DesktopAuthSendState();
@ -72,7 +76,7 @@ class _DesktopAuthSendState extends ConsumerState<DesktopAuthSend> {
height: 16, height: 16,
), ),
Text( Text(
"Enter your wallet password to send BTC", "Enter your wallet password to send ${widget.coin.ticker.toUpperCase()}",
style: STextStyles.desktopTextMedium(context).copyWith( style: STextStyles.desktopTextMedium(context).copyWith(
color: Theme.of(context).extension<StackColors>()!.textDark3, color: Theme.of(context).extension<StackColors>()!.textDark3,
), ),