What changed, and why it matters
This commit removes an unused 'change your asset' button and its related code from the send-money screen. It only affects the Haven wallet type, which no longer shows a currency picker during sending. There is no security issue here—it's purely cleanup of dead UI code.
No security action needed. Treat as routine code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the hasCurrecyChanger getter (WalletType.haven only), the presentCurrencyPicker method, the UI button that called it, the integration-test assertion for its key, and an unused Picker widget import plus an unused wallet_info import. No logic that handles actual transaction construction, validation, or secrets is modified.
Changed components
lib/src/screens/send/send_page.dartlib/view_model/send/send_view_model.dartintegration_test/robots/send_page_robot.dartInspect captured patch +0 / −35
diff --git a/integration_test/robots/send_page_robot.dart b/integration_test/robots/send_page_robot.dart
index 617a263a..84d0156e 100644
--- a/integration_test/robots/send_page_robot.dart
+++ b/integration_test/robots/send_page_robot.dart
@@ -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');
}
diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart
index 67dd7306..3ffd3158 100644
--- a/lib/src/screens/send/send_page.dart
+++ b/lib/src/screens/send/send_page.dart
@@ -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 = [
diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart
index 2c038b03..5a1f44ca 100644
--- a/lib/view_model/send/send_view_model.dart
+++ b/lib/view_model/send/send_view_model.dart
@@ -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;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.