From 3a6f69fd73e54ac47ab94945823ea1f360a32837 Mon Sep 17 00:00:00 2001 From: RafiaChy Date: Tue, 8 Feb 2022 21:30:41 +0600 Subject: [PATCH] coded to hide available balance in hidden mode --- lib/view_model/send/send_view_model.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index fb753e876..b4ef7eaad 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/entities/balance_display_mode.dart'; import 'package:cake_wallet/entities/transaction_description.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cake_wallet/view_model/send/output.dart'; @@ -124,7 +125,12 @@ abstract class SendViewModelBase with Store { PendingTransaction pendingTransaction; @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 bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus;