Fixes(1).

M committed Dec 17, 2020 at 22:50 UTC 91fd0e82619af6a2653fc953747c3b08b1eec2f8
5 files changed +25 -17
ios/Runner.xcodeproj/project.pbxproj
+3 -3
@@ -354,7 +354,7 @@
354 buildSettings = {
355 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356 CLANG_ENABLE_MODULES = YES;
357 - CURRENT_PROJECT_VERSION = 5;
357 + CURRENT_PROJECT_VERSION = 7;
358 DEVELOPMENT_TEAM = 32J6BB6VUS;
359 ENABLE_BITCODE = NO;
360 FRAMEWORK_SEARCH_PATHS = (
@@ -494,7 +494,7 @@
494 buildSettings = {
495 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496 CLANG_ENABLE_MODULES = YES;
497 - CURRENT_PROJECT_VERSION = 5;
497 + CURRENT_PROJECT_VERSION = 7;
498 DEVELOPMENT_TEAM = 32J6BB6VUS;
499 ENABLE_BITCODE = NO;
500 FRAMEWORK_SEARCH_PATHS = (
@@ -528,7 +528,7 @@
528 buildSettings = {
529 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
530 CLANG_ENABLE_MODULES = YES;
531 - CURRENT_PROJECT_VERSION = 5;
531 + CURRENT_PROJECT_VERSION = 7;
532 DEVELOPMENT_TEAM = 32J6BB6VUS;
533 ENABLE_BITCODE = NO;
534 FRAMEWORK_SEARCH_PATHS = (
lib/bitcoin/bitcoin_balance.dart
+3 -1
@@ -27,7 +27,9 @@ class BitcoinBalance extends Balance {
27 final int confirmed;
28 final int unconfirmed;
29
30 - int get total => confirmed + unconfirmed;
30 + int get total =>
31 + (confirmed < 0 ? confirmed * -1 : confirmed) +
32 + (unconfirmed < 0 ? unconfirmed * -1 : unconfirmed);
33
34 String get confirmedFormatted => bitcoinAmountToString(amount: confirmed);
35
lib/bitcoin/bitcoin_wallet.dart
+2 -2
@@ -389,9 +389,9 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
389 case TransactionPriority.slow:
390 return 6000;
391 case TransactionPriority.regular:
392 - return 9000;
392 + return 22080;
393 case TransactionPriority.fast:
394 - return 15000;
394 + return 24000;
395 default:
396 return 0;
397 }
lib/src/screens/dashboard/widgets/address_page.dart
+11 -9
@@ -3,6 +3,7 @@ import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_v
3 import 'package:cake_wallet/src/screens/receive/widgets/qr_widget.dart';
4 import 'package:cake_wallet/routes.dart';
5 import 'package:cake_wallet/generated/i18n.dart';
6 +import 'package:flutter_mobx/flutter_mobx.dart';
7
8 class AddressPage extends StatelessWidget {
9 AddressPage({@required this.addressListViewModel});
@@ -35,15 +36,16 @@ class AddressPage extends StatelessWidget {
36 mainAxisSize: MainAxisSize.max,
37 mainAxisAlignment: MainAxisAlignment.spaceBetween,
38 children: <Widget>[
38 - Text(
39 - addressListViewModel.hasAccounts
40 - ? S.of(context).accounts_subaddresses
41 - : S.of(context).addresses,
42 - style: TextStyle(
43 - fontSize: 14,
44 - fontWeight: FontWeight.w500,
45 - color: Colors.white),
46 - ),
39 + Observer(
40 + builder: (_) => Text(
41 + addressListViewModel.hasAccounts
42 + ? S.of(context).accounts_subaddresses
43 + : S.of(context).addresses,
44 + style: TextStyle(
45 + fontSize: 14,
46 + fontWeight: FontWeight.w500,
47 + color: Colors.white),
48 + )),
49 Icon(
50 Icons.arrow_forward_ios,
51 size: 14,
lib/view_model/wallet_address_list/wallet_address_list_view_model.dart
+6 -2
@@ -57,10 +57,13 @@ class BitcoinURI extends PaymentURI {
57 abstract class WalletAddressListViewModelBase with Store {
58 WalletAddressListViewModelBase(
59 {@required AppStore appStore}) {
60 - hasAccounts = _wallet is MoneroWallet;
60 _appStore = appStore;
61 _wallet = _appStore.wallet;
63 - _onWalletChangeReaction = reaction((_) => _appStore.wallet, (WalletBase wallet) => _wallet = wallet);
62 + hasAccounts = _wallet?.type == WalletType.monero;
63 + _onWalletChangeReaction = reaction((_) => _appStore.wallet, (WalletBase wallet) {
64 + _wallet = wallet;
65 + hasAccounts = _wallet.type == WalletType.monero;
66 + });
67 _init();
68 }
69
@@ -125,6 +128,7 @@ abstract class WalletAddressListViewModelBase with Store {
128 return addressList;
129 }
130
131 + @observable
132 bool hasAccounts;
133
134 @observable