Fixes

M committed Sep 26, 2020 at 15:19 UTC dcdc411d41a281d85501177a99b4453b5f946322
7 files changed +32 -24
lib/router.dart
+2 -2
@@ -67,7 +67,7 @@ class Router {
67 .pushNamed(Routes.newWallet, arguments: type)));
68
69 case Routes.newWallet:
70 - final type = settings.arguments as WalletType;
70 + final type = WalletType.monero; // settings.arguments as WalletType;
71 final walletNewVM = getIt.get<WalletNewVM>(param1: type);
72
73 return CupertinoPageRoute<void>(
@@ -97,7 +97,7 @@ class Router {
97 builder: (_) => RestoreOptionsPage(type: type));
98
99 case Routes.restoreWalletOptions:
100 - final type = settings.arguments as WalletType;
100 + final type = WalletType.monero; //settings.arguments as WalletType;
101
102 return CupertinoPageRoute<void>(
103 builder: (_) => RestoreWalletOptionsPage(
lib/src/screens/dashboard/dashboard_page.dart
+6 -10
@@ -108,17 +108,13 @@ class DashboardPage extends BasePage {
108 mainAxisAlignment: MainAxisAlignment.spaceBetween,
109 children: <Widget>[
110 ActionButton(
111 - image: sendImage,
112 - title: S.of(context).send,
113 - route: Routes.send,
114 - alignment: Alignment.centerLeft,
115 - ),
111 + image: sendImage,
112 + title: S.of(context).send,
113 + route: Routes.send),
114 ActionButton(
117 - image: sendImage,
118 - title: S.of(context).send,
119 - route: Routes.send,
120 - alignment: Alignment.centerLeft,
121 - ),
115 + image: exchangeImage,
116 + title: S.of(context).exchange,
117 + route: Routes.exchange),
118 ],
119 ),
120 )
lib/src/screens/dashboard/widgets/balance_page.dart
+1 -1
@@ -20,7 +20,7 @@ class BalancePage extends StatelessWidget {
20 children: <Widget>[
21 Observer(builder: (_) {
22 return Text(
23 - dashboardViewModel.wallet.currency.toString(),
23 + dashboardViewModel.balanceViewModel.currency.toString(),
24 style: TextStyle(
25 fontSize: 40,
26 fontWeight: FontWeight.bold,
lib/src/screens/wallet_list/wallet_list_page.dart
+2 -1
@@ -1,4 +1,5 @@
1 import 'package:cake_wallet/src/screens/wallet_list/widgets/wallet_menu_alert.dart';
2 +import 'package:cake_wallet/utils/show_pop_up.dart';
3 import 'package:flutter/material.dart';
4 import 'package:flutter/cupertino.dart';
5 import 'package:flutter_mobx/flutter_mobx.dart';
@@ -73,7 +74,7 @@ class WalletListBodyState extends State<WalletListBody> {
74
75 return GestureDetector(
76 onTap: () {
76 - showDialog<void>(
77 + showPopUp<void>(
78 context: context,
79 builder: (dialogContext) {
80 return WalletMenuAlert(
lib/src/screens/welcome/welcome_page.dart
+2 -2
@@ -103,7 +103,7 @@ class WelcomePage extends BasePage {
103 Padding(
104 padding: EdgeInsets.only(top: 24),
105 child: PrimaryImageButton(
106 - onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome),
106 + onPressed: () => Navigator.pushNamed(context, Routes.newWallet),
107 image: newWalletImage,
108 text: S.of(context).create_new,
109 color: Theme.of(context).accentTextTheme.subtitle.decorationColor,
@@ -113,7 +113,7 @@ class WelcomePage extends BasePage {
113 Padding(
114 padding: EdgeInsets.only(top: 10),
115 child: PrimaryImageButton(
116 - onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptionsFromWelcome),
116 + onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptions),
117 image: restoreWalletImage,
118 text: S.of(context).restore_wallet,
119 color: Theme.of(context).accentTextTheme.caption.color,
lib/view_model/dashboard/balance_view_model.dart
+4
@@ -1,5 +1,6 @@
1 import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart';
2 import 'package:cake_wallet/core/wallet_base.dart';
3 +import 'package:cake_wallet/entities/crypto_currency.dart';
4 import 'package:cake_wallet/monero/monero_wallet.dart';
5 import 'package:cake_wallet/entities/balance_display_mode.dart';
6 import 'package:cake_wallet/entities/calculate_fiat_amount.dart';
@@ -92,6 +93,9 @@ abstract class BalanceViewModelBase with Store {
93 return null;
94 }
95
96 + @computed
97 + CryptoCurrency get currency => appStore.wallet.currency;
98 +
99 String _getFiatBalance({double price, String cryptoAmount}) {
100 if (cryptoAmount == null) {
101 return '0.00';
pubspec.lock
+15 -8
@@ -42,7 +42,7 @@ packages:
42 name: async
43 url: "https://pub.dartlang.org"
44 source: hosted
45 - version: "2.4.1"
45 + version: "2.4.2"
46 auto_size_text:
47 dependency: "direct main"
48 description:
@@ -210,7 +210,7 @@ packages:
210 name: collection
211 url: "https://pub.dartlang.org"
212 source: hosted
213 - version: "1.14.12"
213 + version: "1.14.13"
214 connectivity:
215 dependency: "direct main"
216 description:
@@ -330,6 +330,13 @@ packages:
330 url: "https://pub.dartlang.org"
331 source: hosted
332 version: "1.0.2"
333 + fake_async:
334 + dependency: transitive
335 + description:
336 + name: fake_async
337 + url: "https://pub.dartlang.org"
338 + source: hosted
339 + version: "1.1.0"
340 ffi:
341 dependency: transitive
342 description:
@@ -547,7 +554,7 @@ packages:
554 name: matcher
555 url: "https://pub.dartlang.org"
556 source: hosted
550 - version: "0.12.6"
557 + version: "0.12.8"
558 meta:
559 dependency: transitive
560 description:
@@ -617,7 +624,7 @@ packages:
624 name: path
625 url: "https://pub.dartlang.org"
626 source: hosted
620 - version: "1.6.4"
627 + version: "1.7.0"
628 path_drawing:
629 dependency: transitive
630 description:
@@ -867,7 +874,7 @@ packages:
874 name: stack_trace
875 url: "https://pub.dartlang.org"
876 source: hosted
870 - version: "1.9.3"
877 + version: "1.9.5"
878 stream_channel:
879 dependency: transitive
880 description:
@@ -902,7 +909,7 @@ packages:
909 name: test_api
910 url: "https://pub.dartlang.org"
911 source: hosted
905 - version: "0.2.15"
912 + version: "0.2.17"
913 time:
914 dependency: transitive
915 description:
@@ -923,7 +930,7 @@ packages:
930 name: typed_data
931 url: "https://pub.dartlang.org"
932 source: hosted
926 - version: "1.1.6"
933 + version: "1.2.0"
934 url_launcher:
935 dependency: "direct main"
936 description:
@@ -1023,5 +1030,5 @@ packages:
1030 source: hosted
1031 version: "2.2.1"
1032 sdks:
1026 - dart: ">=2.7.0 <3.0.0"
1033 + dart: ">=2.9.0-14.0.dev <3.0.0"
1034 flutter: ">=1.12.13+hotfix.5 <2.0.0"