Fixes(1).

This commit is contained in:
M 2020-12-17 22:50:26 +02:00
parent 4a2f1e48ff
commit 91fd0e8261
5 changed files with 25 additions and 17 deletions

View file

@ -354,7 +354,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -494,7 +494,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -528,7 +528,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (

View file

@ -27,7 +27,9 @@ class BitcoinBalance extends Balance {
final int confirmed;
final int unconfirmed;
int get total => confirmed + unconfirmed;
int get total =>
(confirmed < 0 ? confirmed * -1 : confirmed) +
(unconfirmed < 0 ? unconfirmed * -1 : unconfirmed);
String get confirmedFormatted => bitcoinAmountToString(amount: confirmed);

View file

@ -389,9 +389,9 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
case TransactionPriority.slow:
return 6000;
case TransactionPriority.regular:
return 9000;
return 22080;
case TransactionPriority.fast:
return 15000;
return 24000;
default:
return 0;
}

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_v
import 'package:cake_wallet/src/screens/receive/widgets/qr_widget.dart';
import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
class AddressPage extends StatelessWidget {
AddressPage({@required this.addressListViewModel});
@ -35,15 +36,16 @@ class AddressPage extends StatelessWidget {
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
addressListViewModel.hasAccounts
? S.of(context).accounts_subaddresses
: S.of(context).addresses,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
),
Observer(
builder: (_) => Text(
addressListViewModel.hasAccounts
? S.of(context).accounts_subaddresses
: S.of(context).addresses,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
)),
Icon(
Icons.arrow_forward_ios,
size: 14,

View file

@ -57,10 +57,13 @@ class BitcoinURI extends PaymentURI {
abstract class WalletAddressListViewModelBase with Store {
WalletAddressListViewModelBase(
{@required AppStore appStore}) {
hasAccounts = _wallet is MoneroWallet;
_appStore = appStore;
_wallet = _appStore.wallet;
_onWalletChangeReaction = reaction((_) => _appStore.wallet, (WalletBase wallet) => _wallet = wallet);
hasAccounts = _wallet?.type == WalletType.monero;
_onWalletChangeReaction = reaction((_) => _appStore.wallet, (WalletBase wallet) {
_wallet = wallet;
hasAccounts = _wallet.type == WalletType.monero;
});
_init();
}
@ -125,6 +128,7 @@ abstract class WalletAddressListViewModelBase with Store {
return addressList;
}
@observable
bool hasAccounts;
@observable