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
+2 -2
View File
@@ -67,7 +67,7 @@ class Router {
.pushNamed(Routes.newWallet, arguments: type)));
case Routes.newWallet:
final type = settings.arguments as WalletType;
final type = WalletType.monero; // settings.arguments as WalletType;
final walletNewVM = getIt.get<WalletNewVM>(param1: type);
return CupertinoPageRoute<void>(
@@ -97,7 +97,7 @@ class Router {
builder: (_) => RestoreOptionsPage(type: type));
case Routes.restoreWalletOptions:
final type = settings.arguments as WalletType;
final type = WalletType.monero; //settings.arguments as WalletType;
return CupertinoPageRoute<void>(
builder: (_) => RestoreWalletOptionsPage(
+6 -10
View File
@@ -108,17 +108,13 @@ class DashboardPage extends BasePage {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
ActionButton(
image: sendImage,
title: S.of(context).send,
route: Routes.send,
alignment: Alignment.centerLeft,
),
image: sendImage,
title: S.of(context).send,
route: Routes.send),
ActionButton(
image: sendImage,
title: S.of(context).send,
route: Routes.send,
alignment: Alignment.centerLeft,
),
image: exchangeImage,
title: S.of(context).exchange,
route: Routes.exchange),
],
),
)
@@ -20,7 +20,7 @@ class BalancePage extends StatelessWidget {
children: <Widget>[
Observer(builder: (_) {
return Text(
dashboardViewModel.wallet.currency.toString(),
dashboardViewModel.balanceViewModel.currency.toString(),
style: TextStyle(
fontSize: 40,
fontWeight: FontWeight.bold,
@@ -1,4 +1,5 @@
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/cupertino.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
@@ -73,7 +74,7 @@ class WalletListBodyState extends State<WalletListBody> {
return GestureDetector(
onTap: () {
showDialog<void>(
showPopUp<void>(
context: context,
builder: (dialogContext) {
return WalletMenuAlert(
+2 -2
View File
@@ -103,7 +103,7 @@ class WelcomePage extends BasePage {
Padding(
padding: EdgeInsets.only(top: 24),
child: PrimaryImageButton(
onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome),
onPressed: () => Navigator.pushNamed(context, Routes.newWallet),
image: newWalletImage,
text: S.of(context).create_new,
color: Theme.of(context).accentTextTheme.subtitle.decorationColor,
@@ -113,7 +113,7 @@ class WelcomePage extends BasePage {
Padding(
padding: EdgeInsets.only(top: 10),
child: PrimaryImageButton(
onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptionsFromWelcome),
onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptions),
image: restoreWalletImage,
text: S.of(context).restore_wallet,
color: Theme.of(context).accentTextTheme.caption.color,
@@ -1,5 +1,6 @@
import 'package:cake_wallet/bitcoin/bitcoin_wallet.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/entities/balance_display_mode.dart';
import 'package:cake_wallet/entities/calculate_fiat_amount.dart';
@@ -92,6 +93,9 @@ abstract class BalanceViewModelBase with Store {
return null;
}
@computed
CryptoCurrency get currency => appStore.wallet.currency;
String _getFiatBalance({double price, String cryptoAmount}) {
if (cryptoAmount == null) {
return '0.00';