coded to hide available balance in hidden mode

This commit is contained in:
RafiaChy 2022-02-08 21:30:41 +06:00
parent 5902fbf36d
commit 3a6f69fd73

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/entities/balance_display_mode.dart';
import 'package:cake_wallet/entities/transaction_description.dart'; import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:cw_core/transaction_priority.dart'; import 'package:cw_core/transaction_priority.dart';
import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cake_wallet/view_model/send/output.dart';
@ -124,7 +125,12 @@ abstract class SendViewModelBase with Store {
PendingTransaction pendingTransaction; PendingTransaction pendingTransaction;
@computed @computed
String get balance => _wallet.balance.formattedAvailableBalance ?? '0.0'; String get balance {
if(_settingsStore.balanceDisplayMode == BalanceDisplayMode.hiddenBalance){
return '---';
}
return _wallet.balance.formattedAvailableBalance ?? '0.0' ;
}
@computed @computed
bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus; bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus;