v5.1.0 Release Candidate (#2332)

* v5.1.0 Release Candidate

* update app versions [skip ci]

* separate secrets for Monero.com [skip ci]

* fix: amount getting wiped when pasting address

* update Trocador Monero api key [skip ci]

* move fiat api key to headers [skip ci]

* latest Release candidate
This commit is contained in:
Omar Hatem
2025-06-27 22:20:18 +03:00
committed by GitHub
parent 5aeb6b7522
commit c2cca1ff37
20 changed files with 95 additions and 70 deletions
@@ -10,11 +10,11 @@ import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:url_launcher/url_launcher.dart';
class CakeFeaturesPage extends StatelessWidget {
CakeFeaturesPage(
{required this.dashboardViewModel, required this.cakeFeaturesViewModel});
CakeFeaturesPage({required this.dashboardViewModel, required this.cakeFeaturesViewModel});
final DashboardViewModel dashboardViewModel;
final CakeFeaturesViewModel cakeFeaturesViewModel;
@@ -59,23 +59,26 @@ class CakeFeaturesPage extends StatelessWidget {
fit: BoxFit.cover,
),
),
if (dashboardViewModel.type == WalletType.ethereum) ...[
DashBoardRoundedCardWidget(
isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
shadowSpread: dashboardViewModel.getShadowSpread(),
onTap: () =>
Navigator.of(context).pushNamed(Routes.dEuroSavings),
title: S.of(context).deuro_savings,
subTitle: S.of(context).deuro_savings_subtitle,
image: Image.asset(
'assets/images/deuro_icon.png',
height: 80,
width: 80,
fit: BoxFit.cover,
),
),
],
Observer(builder: (_) {
if (dashboardViewModel.type == WalletType.ethereum) {
return DashBoardRoundedCardWidget(
isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
shadowSpread: dashboardViewModel.getShadowSpread(),
onTap: () => Navigator.of(context).pushNamed(Routes.dEuroSavings),
title: S.of(context).deuro_savings,
subTitle: S.of(context).deuro_savings_subtitle,
image: Image.asset(
'assets/images/deuro_icon.png',
height: 80,
width: 80,
fit: BoxFit.cover,
),
);
}
return const SizedBox();
}),
DashBoardRoundedCardWidget(
isDarkTheme: dashboardViewModel.isDarkTheme,
shadowBlur: dashboardViewModel.getShadowBlur(),
@@ -302,7 +302,8 @@ class ExchangeCardState<T extends Currency> extends State<ExchangeCard<T>> {
final paymentRequest = PaymentRequest.fromUri(uri);
addressController.text = paymentRequest.address;
if (amountController.text.isNotEmpty) {
if (amountController.text.isNotEmpty &&
paymentRequest.amount.isNotEmpty) {
_showAmountPopup(context, paymentRequest);
return;
}
+11 -5
View File
@@ -263,11 +263,17 @@ class AddressTextField<T extends Currency> extends StatelessWidget {
final address = clipboard?.text ?? '';
if (address.isNotEmpty) {
try {
final uri = Uri.parse(address);
controller?.text = uri.path;
onURIScanned?.call(uri);
} catch (_) {
// if it has query parameters then it's a valid uri
// added because Uri.parse(address) can parse a normal address string and would still be valid
if (address.contains("=")) {
try {
final uri = Uri.parse(address);
controller?.text = uri.path;
onURIScanned?.call(uri);
} catch (_) {
controller?.text = address;
}
} else {
controller?.text = address;
}
}