@@ -20,6 +20,7 @@ import '../../models/exchange/response_objects/trade.dart';
2020import '../../pages_desktop_specific/desktop_exchange/desktop_exchange_view.dart' ;
2121import '../../providers/providers.dart' ;
2222import '../../route_generator.dart' ;
23+ import '../../services/exchange/trocador/trocador_exchange.dart' ;
2324import '../../themes/coin_icon_provider.dart' ;
2425import '../../themes/stack_colors.dart' ;
2526import '../../themes/theme_providers.dart' ;
@@ -406,12 +407,6 @@ class _SendFromCardState extends ConsumerState<SendFromCard> {
406407
407408 @override
408409 Widget build (BuildContext context) {
409- final wallet = ref.watch (pWallets).getWallet (walletId);
410-
411- final locale = ref.watch (
412- localeServiceChangeNotifierProvider.select ((value) => value.locale),
413- );
414-
415410 final coin = ref.watch (pWalletCoin (walletId));
416411
417412 final isFiro = coin is Firo ;
@@ -430,70 +425,77 @@ class _SendFromCardState extends ConsumerState<SendFromCard> {
430425 mainAxisSize: MainAxisSize .min,
431426 crossAxisAlignment: CrossAxisAlignment .start,
432427 children: [
433- MaterialButton (
434- splashColor:
435- Theme .of (context).extension < StackColors > ()! .highlight,
436- key: Key ("walletsSheetItemButtonFiroPrivateKey_$walletId " ),
437- padding: const EdgeInsets .all (0 ),
438- materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
439- shape: RoundedRectangleBorder (
440- borderRadius: BorderRadius .circular (
441- Constants .size.circularBorderRadius,
428+ if (! trade.exchangeName.startsWith (
429+ TrocadorExchange .exchangeName,
430+ ))
431+ MaterialButton (
432+ splashColor:
433+ Theme .of (context).extension < StackColors > ()! .highlight,
434+ key: Key (
435+ "walletsSheetItemButtonFiroPrivateKey_$walletId " ,
442436 ),
443- ),
444- onPressed: () async {
445- if (mounted) {
446- unawaited (_send (shouldSendPublicFiroFunds: false ));
447- }
448- },
449- child: Container (
450- color: Colors .transparent,
451- child: Padding (
452- padding: const EdgeInsets .only (
453- top: 6 ,
454- left: 16 ,
455- right: 16 ,
456- bottom: 6 ,
437+ padding: const EdgeInsets .all (0 ),
438+ materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
439+ shape: RoundedRectangleBorder (
440+ borderRadius: BorderRadius .circular (
441+ Constants .size.circularBorderRadius,
457442 ),
458- child: Row (
459- mainAxisAlignment: MainAxisAlignment .spaceBetween,
460- children: [
461- Column (
462- mainAxisSize: MainAxisSize .min,
463- crossAxisAlignment: CrossAxisAlignment .start,
464- children: [
465- Text (
466- "Use private balance" ,
467- style: STextStyles .itemSubtitle (context),
468- ),
469- Text (
470- ref
471- .watch (pAmountFormatter (coin))
472- .format (
473- ref
474- .watch (
475- pWalletBalanceTertiary (walletId),
476- )
477- .spendable,
478- ),
479- style: STextStyles .itemSubtitle (context),
480- ),
481- ],
482- ),
483- SvgPicture .asset (
484- Assets .svg.chevronRight,
485- height: 14 ,
486- width: 7 ,
487- color:
488- Theme .of (
489- context,
490- ).extension < StackColors > ()! .infoItemLabel,
491- ),
492- ],
443+ ),
444+ onPressed: () async {
445+ if (mounted) {
446+ unawaited (_send (shouldSendPublicFiroFunds: false ));
447+ }
448+ },
449+ child: Container (
450+ color: Colors .transparent,
451+ child: Padding (
452+ padding: const EdgeInsets .only (
453+ top: 6 ,
454+ left: 16 ,
455+ right: 16 ,
456+ bottom: 6 ,
457+ ),
458+ child: Row (
459+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
460+ children: [
461+ Column (
462+ mainAxisSize: MainAxisSize .min,
463+ crossAxisAlignment: CrossAxisAlignment .start,
464+ children: [
465+ Text (
466+ "Use private balance" ,
467+ style: STextStyles .itemSubtitle (context),
468+ ),
469+ Text (
470+ ref
471+ .watch (pAmountFormatter (coin))
472+ .format (
473+ ref
474+ .watch (
475+ pWalletBalanceTertiary (
476+ walletId,
477+ ),
478+ )
479+ .spendable,
480+ ),
481+ style: STextStyles .itemSubtitle (context),
482+ ),
483+ ],
484+ ),
485+ SvgPicture .asset (
486+ Assets .svg.chevronRight,
487+ height: 14 ,
488+ width: 7 ,
489+ color:
490+ Theme .of (
491+ context,
492+ ).extension < StackColors > ()! .infoItemLabel,
493+ ),
494+ ],
495+ ),
493496 ),
494497 ),
495498 ),
496- ),
497499 MaterialButton (
498500 splashColor:
499501 Theme .of (context).extension < StackColors > ()! .highlight,
0 commit comments