This commit is contained in:
M 2020-09-26 15:19:33 +03:00
parent a348b8bddd
commit dcdc411d41
7 changed files with 32 additions and 24 deletions

View file

@ -67,7 +67,7 @@ class Router {
.pushNamed(Routes.newWallet, arguments: type))); .pushNamed(Routes.newWallet, arguments: type)));
case Routes.newWallet: case Routes.newWallet:
final type = settings.arguments as WalletType; final type = WalletType.monero; // settings.arguments as WalletType;
final walletNewVM = getIt.get<WalletNewVM>(param1: type); final walletNewVM = getIt.get<WalletNewVM>(param1: type);
return CupertinoPageRoute<void>( return CupertinoPageRoute<void>(
@ -97,7 +97,7 @@ class Router {
builder: (_) => RestoreOptionsPage(type: type)); builder: (_) => RestoreOptionsPage(type: type));
case Routes.restoreWalletOptions: case Routes.restoreWalletOptions:
final type = settings.arguments as WalletType; final type = WalletType.monero; //settings.arguments as WalletType;
return CupertinoPageRoute<void>( return CupertinoPageRoute<void>(
builder: (_) => RestoreWalletOptionsPage( builder: (_) => RestoreWalletOptionsPage(

View file

@ -110,15 +110,11 @@ class DashboardPage extends BasePage {
ActionButton( ActionButton(
image: sendImage, image: sendImage,
title: S.of(context).send, title: S.of(context).send,
route: Routes.send, route: Routes.send),
alignment: Alignment.centerLeft,
),
ActionButton( ActionButton(
image: sendImage, image: exchangeImage,
title: S.of(context).send, title: S.of(context).exchange,
route: Routes.send, route: Routes.exchange),
alignment: Alignment.centerLeft,
),
], ],
), ),
) )

View file

@ -20,7 +20,7 @@ class BalancePage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Observer(builder: (_) { Observer(builder: (_) {
return Text( return Text(
dashboardViewModel.wallet.currency.toString(), dashboardViewModel.balanceViewModel.currency.toString(),
style: TextStyle( style: TextStyle(
fontSize: 40, fontSize: 40,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/src/screens/wallet_list/widgets/wallet_menu_alert.dart'; import 'package:cake_wallet/src/screens/wallet_list/widgets/wallet_menu_alert.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:flutter_mobx/flutter_mobx.dart';
@ -73,7 +74,7 @@ class WalletListBodyState extends State<WalletListBody> {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
showDialog<void>( showPopUp<void>(
context: context, context: context,
builder: (dialogContext) { builder: (dialogContext) {
return WalletMenuAlert( return WalletMenuAlert(

View file

@ -103,7 +103,7 @@ class WelcomePage extends BasePage {
Padding( Padding(
padding: EdgeInsets.only(top: 24), padding: EdgeInsets.only(top: 24),
child: PrimaryImageButton( child: PrimaryImageButton(
onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome), onPressed: () => Navigator.pushNamed(context, Routes.newWallet),
image: newWalletImage, image: newWalletImage,
text: S.of(context).create_new, text: S.of(context).create_new,
color: Theme.of(context).accentTextTheme.subtitle.decorationColor, color: Theme.of(context).accentTextTheme.subtitle.decorationColor,
@ -113,7 +113,7 @@ class WelcomePage extends BasePage {
Padding( Padding(
padding: EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10),
child: PrimaryImageButton( child: PrimaryImageButton(
onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptionsFromWelcome), onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptions),
image: restoreWalletImage, image: restoreWalletImage,
text: S.of(context).restore_wallet, text: S.of(context).restore_wallet,
color: Theme.of(context).accentTextTheme.caption.color, color: Theme.of(context).accentTextTheme.caption.color,

View file

@ -1,5 +1,6 @@
import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart'; import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart';
import 'package:cake_wallet/core/wallet_base.dart'; import 'package:cake_wallet/core/wallet_base.dart';
import 'package:cake_wallet/entities/crypto_currency.dart';
import 'package:cake_wallet/monero/monero_wallet.dart'; import 'package:cake_wallet/monero/monero_wallet.dart';
import 'package:cake_wallet/entities/balance_display_mode.dart'; import 'package:cake_wallet/entities/balance_display_mode.dart';
import 'package:cake_wallet/entities/calculate_fiat_amount.dart'; import 'package:cake_wallet/entities/calculate_fiat_amount.dart';
@ -92,6 +93,9 @@ abstract class BalanceViewModelBase with Store {
return null; return null;
} }
@computed
CryptoCurrency get currency => appStore.wallet.currency;
String _getFiatBalance({double price, String cryptoAmount}) { String _getFiatBalance({double price, String cryptoAmount}) {
if (cryptoAmount == null) { if (cryptoAmount == null) {
return '0.00'; return '0.00';

View file

@ -42,7 +42,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.1" version: "2.4.2"
auto_size_text: auto_size_text:
dependency: "direct main" dependency: "direct main"
description: description:
@ -210,7 +210,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.14.12" version: "1.14.13"
connectivity: connectivity:
dependency: "direct main" dependency: "direct main"
description: description:
@ -330,6 +330,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -547,7 +554,7 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.6" version: "0.12.8"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -617,7 +624,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.4" version: "1.7.0"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -867,7 +874,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.9.3" version: "1.9.5"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -902,7 +909,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.15" version: "0.2.17"
time: time:
dependency: transitive dependency: transitive
description: description:
@ -923,7 +930,7 @@ packages:
name: typed_data name: typed_data
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.6" version: "1.2.0"
url_launcher: url_launcher:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1023,5 +1030,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.7.0 <3.0.0" dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0" flutter: ">=1.12.13+hotfix.5 <2.0.0"