From 1a99d4eba9502dc66ab2c11863f6d57713d44362 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 24 Oct 2023 13:49:26 +0330 Subject: [PATCH 1/2] fix: Go back to wallet page on tx done --- .../send_token/send_crypto/send_crypto_presenter.dart | 7 ++++++- .../send_token/send_crypto/widgets/transaction_info.dart | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_presenter.dart b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_presenter.dart index 93b07d4d..82f006d7 100644 --- a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_presenter.dart +++ b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_presenter.dart @@ -191,7 +191,12 @@ class SendCryptoPresenter extends CompletePresenter { } return res; } else if (TransactionProcessType.done == type) { - BottomFlowDialog.of(context!).close(); + navigator!.pop(); + Future.delayed(const Duration(milliseconds: 200), () { + navigator?.popUntil((route) { + return route.settings.name?.contains('WalletPage') ?? false; + }); + }); } } diff --git a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart index f6bedb3f..cad2e697 100644 --- a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart +++ b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/widgets/transaction_info.dart @@ -148,7 +148,6 @@ class _TransactionInfoState extends State { } } else { widget.onTap(processType); - Navigator.of(context).pop(true); } }, ); From 381819ae6fe3301515b4db50ea93854b3a3091bd Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 24 Oct 2023 13:50:46 +0330 Subject: [PATCH 2/2] fix: Go to send crypto on token tap --- .../tokens_balance_list/tokens_balance_list.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/features/portfolio/subfeatures/tokens_balance_list/tokens_balance_list.dart b/lib/features/portfolio/subfeatures/tokens_balance_list/tokens_balance_list.dart index ee47cec4..7df39250 100644 --- a/lib/features/portfolio/subfeatures/tokens_balance_list/tokens_balance_list.dart +++ b/lib/features/portfolio/subfeatures/tokens_balance_list/tokens_balance_list.dart @@ -2,6 +2,7 @@ import 'package:datadashwallet/common/common.dart'; import 'package:datadashwallet/core/core.dart'; import 'package:datadashwallet/features/portfolio/portfolio.dart'; import 'package:datadashwallet/features/portfolio/subfeatures/token/add_token/add_token_page.dart'; +import '../token/send_token/send_crypto/send_crypto_page.dart'; import './utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; @@ -43,6 +44,14 @@ class TokensBalanceList extends HookConsumerWidget { ...TokensBalanceListUtils .generateTokensBalanceList( portfolioState.tokensList!, + onSelected: (token) => + Navigator.of(context).push( + route.featureDialog( + SendCryptoPage( + token: token, + ), + ), + ), ) ], )),