Disable Cake Pay Mobile (#994)
* Remove navigation to ionia * Hide 'introducing cake pay' card
Omar Hatem committed
Jul 11, 2023 at 20:12 UTC
181fd21636a6231ea1cbdcf0ba8933679cb1966c
3 files changed
+10
-2
lib/src/screens/dashboard/widgets/balance_page.dart
+2
-1
@@ -1,6 +1,7 @@
1
import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart';
2
import 'package:cake_wallet/store/settings_store.dart';
3
import 'package:cake_wallet/themes/theme_base.dart';
4
+import 'package:cake_wallet/utils/feature_flag.dart';
5
import 'package:cake_wallet/utils/responsive_layout_util.dart';
6
import 'package:cake_wallet/utils/show_pop_up.dart';
7
import 'package:flutter/material.dart';
@@ -43,7 +44,7 @@ class BalancePage extends StatelessWidget {
44
textAlign: TextAlign.center);
45
})),
46
Observer(builder: (_) {
46
- if (dashboardViewModel.balanceViewModel.isShowCard) {
47
+ if (dashboardViewModel.balanceViewModel.isShowCard && FeatureFlag.isCakePayEnabled) {
48
return IntroducingCard(
49
title: S.of(context).introducing_cake_pay,
50
subTitle: S.of(context).cake_pay_learn_more,
lib/src/screens/dashboard/widgets/market_place_page.dart
+5
-1
@@ -52,7 +52,10 @@ class MarketPlacePage extends StatelessWidget {
52
children: <Widget>[
53
SizedBox(height: 20),
54
DashBoardRoundedCardWidget(
55
- onTap: () => _navigatorToGiftCardsPage(context),
55
+ onTap: () => launchUrl(
56
+ Uri.parse("https://cakelabs.com/news/cake-pay-mobile-to-shut-down/"),
57
+ mode: LaunchMode.externalApplication,
58
+ ),
59
title: S.of(context).cake_pay_title,
60
subTitle: S.of(context).cake_pay_subtitle,
61
),
@@ -75,6 +78,7 @@ class MarketPlacePage extends StatelessWidget {
78
);
79
}
80
81
+ // TODO: Remove ionia flow/files if we will discard it
82
void _navigatorToGiftCardsPage(BuildContext context) {
83
final walletType = dashboardViewModel.type;
84
lib/utils/feature_flag.dart
new
+3
@@ -0,0 +1,3 @@
1
+class FeatureFlag {
2
+ static const bool isCakePayEnabled = false;
3
+}
\ No newline at end of file