diff --git a/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart b/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart index 5ed82e71c..036b5bc6d 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_external_send_page.dart @@ -19,9 +19,6 @@ class ExchangeTradeExternalSendPage extends BasePage { @override String get title => S.current.swap; - @override - bool get gradientBackground => true; - @override bool get gradientAll => true; @@ -46,7 +43,7 @@ class ExchangeTradeExternalSendPage extends BasePage { ); return Container( child: ScrollableWithBottomSection( - contentPadding: EdgeInsets.only(top: 36, bottom: 24), + contentPadding: EdgeInsets.only(bottom: 24), content: Observer( builder: (_) { return Column( diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index 97d9a34bb..f328cc115 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -26,23 +26,20 @@ import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart'; -void showInformation( - ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) { +void showInformation(ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) { final trade = exchangeTradeViewModel.trade; final walletName = exchangeTradeViewModel.wallet.name; final information = exchangeTradeViewModel.isSendable ? S.current.exchange_trade_result_confirm(trade.amount, trade.from.toString(), walletName) + - exchangeTradeViewModel.extraInfo - : S.current.exchange_result_description( - trade.amount, trade.from.toString()) + - exchangeTradeViewModel.extraInfo; + exchangeTradeViewModel.extraInfo + : S.current.exchange_result_description(trade.amount, trade.from.toString()) + + exchangeTradeViewModel.extraInfo; showPopUp( context: context, - builder: (_) => InformationPage( - key: ValueKey('information_page_dialog_key'), - information: information)); + builder: (_) => + InformationPage(key: ValueKey('information_page_dialog_key'), information: information)); } class ExchangeTradePage extends BasePage { @@ -53,9 +50,6 @@ class ExchangeTradePage extends BasePage { @override String get title => S.current.swap; - @override - bool get gradientBackground => true; - @override bool get gradientAll => true; @@ -141,7 +135,7 @@ class ExchangeTradeState extends State { return Container( child: ScrollableWithBottomSection( - contentPadding: EdgeInsets.only(top: 10, bottom: 16), + contentPadding: EdgeInsets.only(bottom: 16), content: Observer(builder: (_) { final trade = widget.exchangeTradeViewModel.trade; @@ -198,7 +192,7 @@ class ExchangeTradeState extends State { isDisabled: trade.inputAddress == null || trade.inputAddress!.isEmpty, isLoading: sendingState is IsExecutingState, onPressed: () => widget.exchangeTradeViewModel.confirmSending(), - text:S.current.send_from_cake_wallet, + text: S.current.send_from_cake_wallet, color: Theme.of(context).primaryColor, textColor: Colors.white, ) @@ -220,12 +214,11 @@ class ExchangeTradeState extends State { _exchangeStateReaction = reaction((_) => this.widget.exchangeTradeViewModel.sendViewModel.state, (ExecutionState state) { - - if (state is! IsExecutingState && - loadingBottomSheetContext != null && - loadingBottomSheetContext!.mounted) { - Navigator.of(loadingBottomSheetContext!).pop(); - } + if (state is! IsExecutingState && + loadingBottomSheetContext != null && + loadingBottomSheetContext!.mounted) { + Navigator.of(loadingBottomSheetContext!).pop(); + } if (state is FailureState) { WidgetsBinding.instance.addPostFrameCallback((_) { @@ -272,16 +265,21 @@ class ExchangeTradeState extends State { key: ValueKey('exchange_trade_page_confirm_sending_bottom_sheet_key'), currentTheme: widget.currentTheme, titleText: S.of(bottomSheetContext).confirm_transaction, - titleIconPath: widget.exchangeTradeViewModel.sendViewModel.selectedCryptoCurrency.iconPath, + titleIconPath: + widget.exchangeTradeViewModel.sendViewModel.selectedCryptoCurrency.iconPath, currency: widget.exchangeTradeViewModel.sendViewModel.selectedCryptoCurrency, amount: S.of(bottomSheetContext).send_amount, - amountValue: widget.exchangeTradeViewModel.sendViewModel.pendingTransaction!.amountFormatted, - fiatAmountValue: widget.exchangeTradeViewModel.sendViewModel.pendingTransactionFiatAmountFormatted, + amountValue: widget + .exchangeTradeViewModel.sendViewModel.pendingTransaction!.amountFormatted, + fiatAmountValue: widget + .exchangeTradeViewModel.sendViewModel.pendingTransactionFiatAmountFormatted, fee: isEVMCompatibleChain(widget.exchangeTradeViewModel.sendViewModel.walletType) ? S.of(bottomSheetContext).send_estimated_fee : S.of(bottomSheetContext).send_fee, - feeValue: widget.exchangeTradeViewModel.sendViewModel.pendingTransaction!.feeFormatted, - feeFiatAmount: widget.exchangeTradeViewModel.sendViewModel.pendingTransactionFeeFiatAmountFormatted, + feeValue: + widget.exchangeTradeViewModel.sendViewModel.pendingTransaction!.feeFormatted, + feeFiatAmount: widget.exchangeTradeViewModel.sendViewModel + .pendingTransactionFeeFiatAmountFormatted, outputs: widget.exchangeTradeViewModel.sendViewModel.outputs, onSlideComplete: () async { Navigator.of(bottomSheetContext).pop(); @@ -300,7 +298,6 @@ class ExchangeTradeState extends State { return; } - await showModalBottomSheet( context: context, isScrollControlled: true, @@ -321,10 +318,8 @@ class ExchangeTradeState extends State { }); }, ); - }); } - }); _effectsInstalled = true;