diff --git a/lib/pages/cashfusion/cashfusion_view.dart b/lib/pages/cashfusion/cashfusion_view.dart index 354b6377e..60c6ad09e 100644 --- a/lib/pages/cashfusion/cashfusion_view.dart +++ b/lib/pages/cashfusion/cashfusion_view.dart @@ -27,6 +27,7 @@ import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/widgets/background.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; +import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart'; import 'package:stackwallet/widgets/desktop/primary_button.dart'; import 'package:stackwallet/widgets/rounded_container.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; @@ -157,13 +158,32 @@ class _CashFusionViewState extends ConsumerState { const SizedBox( height: 16, ), - Text( - "Server settings", - style: STextStyles.w500_14(context).copyWith( - color: Theme.of(context) - .extension()! - .textDark3, - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Server settings", + style: STextStyles.w500_14(context).copyWith( + color: Theme.of(context) + .extension()! + .textDark3, + ), + ), + CustomTextButton( + text: "Default", + onTap: () { + const def = FusionInfo.DEFAULTS; + serverController.text = def.host; + portController.text = def.port.toString(); + fusionRoundController.text = + def.rounds.toString(); + _option = FusionOption.continuous; + setState(() { + _enableSSLCheckbox = def.ssl; + }); + }, + ), + ], ), const SizedBox( height: 12, diff --git a/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart b/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart index af2ec178e..b93548bb4 100644 --- a/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart +++ b/lib/pages_desktop_specific/cashfusion/desktop_cashfusion_view.dart @@ -28,6 +28,7 @@ import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; +import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart'; import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart'; import 'package:stackwallet/widgets/desktop/desktop_dialog.dart'; import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart'; @@ -277,10 +278,29 @@ class _DesktopCashFusion extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "Server settings", - style: - STextStyles.desktopTextExtraExtraSmall(context), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "Server settings", + style: STextStyles.desktopTextExtraExtraSmall( + context), + ), + CustomTextButton( + text: "Default", + onTap: () { + const def = FusionInfo.DEFAULTS; + serverController.text = def.host; + portController.text = def.port.toString(); + fusionRoundController.text = + def.rounds.toString(); + _roundType = FusionOption.continuous; + setState(() { + _enableSSLCheckbox = def.ssl; + }); + }, + ), + ], ), const SizedBox( height: 12,