From ca8a269b4e4ef0b52678696b3268508f53b79fde Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 31 Oct 2023 17:21:58 +0330 Subject: [PATCH] imprv: Removed isBalanceZero for fund check --- .../send_crypto/send_crypto_page.dart | 4 +-- .../send_crypto/send_crypto_presenter.dart | 27 +++++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_page.dart b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_page.dart index 2ac35f82..0f255228 100644 --- a/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_page.dart +++ b/lib/features/portfolio/subfeatures/token/send_token/send_crypto/send_crypto_page.dart @@ -16,7 +16,7 @@ class SendCryptoPage extends HookConsumerWidget { Key? key, required this.token, this.qrCode, - required this.isBalanceZero + required this.isBalanceZero, }) : super(key: key); final Token token; @@ -28,7 +28,6 @@ class SendCryptoPage extends HookConsumerWidget { sendTokenPageContainer.actions(SendCryptoArguments( token: token, qrCode: qrCode, - isBalanceZero: isBalanceZero )); @override @@ -36,7 +35,6 @@ class SendCryptoPage extends HookConsumerWidget { sendTokenPageContainer.state(SendCryptoArguments( token: token, qrCode: qrCode, - isBalanceZero: isBalanceZero )); @override 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 e9ee1de9..bbf3790a 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 @@ -17,31 +17,36 @@ import 'send_crypto_state.dart'; import 'widgets/transaction_dialog.dart'; class SendCryptoArguments with EquatableMixin { - const SendCryptoArguments( - {required this.token, this.qrCode, required this.isBalanceZero}); + const SendCryptoArguments({ + required this.token, + this.qrCode, + }); final Token token; final String? qrCode; - final bool isBalanceZero; @override - List get props => [token, qrCode]; + List get props => [ + token, + qrCode, + ]; } final sendTokenPageContainer = PresenterContainerWithParameter< SendCryptoPresenter, SendCryptoState, SendCryptoArguments>( - (params) => - SendCryptoPresenter(params.token, params.qrCode, params.isBalanceZero)); + (params) => SendCryptoPresenter( + params.token, + params.qrCode, + )); class SendCryptoPresenter extends CompletePresenter { - SendCryptoPresenter(this.token, String? qrCode, this.isBalanceZero) - : super(SendCryptoState()..qrCode = qrCode); + SendCryptoPresenter( + this.token, + String? qrCode, + ) : super(SendCryptoState()..qrCode = qrCode); final Token token; - // Native token balance - final bool isBalanceZero; - late final _transactionHistoryUseCase = ref.read(transactionHistoryUseCaseProvider); late final TokenContractUseCase _tokenContractUseCase =