Code cleanup

This commit is contained in:
OmarHatem
2025-11-06 01:29:21 +01:00
parent df11f87e32
commit 507be1402e
3 changed files with 0 additions and 35 deletions
@@ -104,10 +104,6 @@ class SendPageRobot {
commonTestCases.hasValueKey('send_page_unspent_coin_button_key');
}
if (sendViewModel.hasCurrecyChanger) {
commonTestCases.hasValueKey('send_page_change_asset_button_key');
}
if (sendViewModel.sendTemplateViewModel.hasMultiRecipient) {
commonTestCases.hasValueKey('send_page_add_receiver_button_key');
}
-28
View File
@@ -21,7 +21,6 @@ import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.da
import 'package:cake_wallet/src/widgets/bottom_sheet/confirm_sending_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/src/widgets/simple_checkbox.dart';
@@ -377,19 +376,6 @@ class SendPage extends BasePage {
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSection: Column(
children: [
if (sendViewModel.hasCurrecyChanger)
Observer(
builder: (_) => Padding(
padding: EdgeInsets.only(bottom: 12),
child: PrimaryButton(
key: ValueKey('send_page_change_asset_button_key'),
onPressed: () => presentCurrencyPicker(context),
text: 'Change your asset (${sendViewModel.selectedCryptoCurrency})',
color: Colors.transparent,
textColor: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
if (sendViewModel.sendTemplateViewModel.hasMultiRecipient)
Padding(
padding: EdgeInsets.only(bottom: 12),
@@ -802,20 +788,6 @@ class SendPage extends BasePage {
});
}
void presentCurrencyPicker(BuildContext context) async {
await showPopUp<CryptoCurrency>(
builder: (_) => Picker(
items: sendViewModel.currencies,
displayItem: (Object item) => item.toString(),
selectedAtIndex:
sendViewModel.currencies.indexOf(sendViewModel.selectedCryptoCurrency),
title: S.of(context).please_select,
mainAxisAlignment: MainAxisAlignment.center,
onItemSelected: (CryptoCurrency cur) => sendViewModel.selectedCryptoCurrency = cur,
),
context: context);
}
bool isRegularElectrumAddress(String address) {
final supportedTypes = [CryptoCurrency.btc, CryptoCurrency.ltc, CryptoCurrency.bch];
final excludedPatterns = [
-3
View File
@@ -57,7 +57,6 @@ import 'package:cw_core/sync_status.dart';
import 'package:cw_core/transaction_info.dart';
import 'package:cw_core/unspent_coin_type.dart';
import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/wallet_info.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
@@ -368,8 +367,6 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
String? get walletCurrencyName => wallet.currency.fullName?.toLowerCase() ?? wallet.currency.name;
bool get hasCurrecyChanger => walletType == WalletType.haven;
@computed
FiatCurrency get fiatCurrency => _settingsStore.fiatCurrency;