From 24cea6b217e65ee0a1dee9cdcc12c88e858925ba Mon Sep 17 00:00:00 2001 From: Blazebrain Date: Thu, 25 Jul 2024 11:20:04 +0100 Subject: [PATCH] fix: Cleanup balance page and balance page view_model --- lib/src/screens/dashboard/pages/balance_page.dart | 12 ------------ lib/view_model/dashboard/balance_view_model.dart | 6 +++--- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index c7ff4ce37..82a76f2fd 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -237,10 +237,6 @@ class CryptoBalanceWidget extends StatelessWidget { additionalFiatBalance: balance.fiatAdditionalBalance, hasAdditionalBalance: dashboardViewModel.balanceViewModel.hasAdditionalBalance, - // hasFullBalance: dashboardViewModel.balanceViewModel.hasFullBalance, - // fullBalanceLabel: '${dashboardViewModel.balanceViewModel.fullBalanceLabel}', - // fullBalance: balance.fullBalance, - // fullFiatBalance: balance.fiatFullBalance, frozenBalance: balance.frozenBalance, frozenFiatBalance: balance.fiatFrozenBalance, currency: balance.asset, @@ -372,10 +368,6 @@ class BalanceRowWidget extends StatelessWidget { required this.additionalFiatBalance, required this.frozenBalance, required this.frozenFiatBalance, - // required this.fullBalanceLabel, - // required this.fullBalance, - // required this.fullFiatBalance, - // required this.hasFullBalance, required this.currency, required this.hasAdditionalBalance, required this.isTestnet, @@ -390,10 +382,6 @@ class BalanceRowWidget extends StatelessWidget { final String additionalFiatBalance; final String frozenBalance; final String frozenFiatBalance; - // final String fullBalanceLabel; - // final String fullBalance; - // final String fullFiatBalance; - // final bool hasFullBalance; final CryptoCurrency currency; final bool hasAdditionalBalance; final bool isTestnet; diff --git a/lib/view_model/dashboard/balance_view_model.dart b/lib/view_model/dashboard/balance_view_model.dart index 9ce00d63b..c4e58a7d2 100644 --- a/lib/view_model/dashboard/balance_view_model.dart +++ b/lib/view_model/dashboard/balance_view_model.dart @@ -66,7 +66,7 @@ abstract class BalanceViewModelBase with Store { WalletBase, TransactionInfo> wallet; @computed - bool get hasSilentPayments => wallet.type == WalletType.bitcoin; + bool get hasSilentPayments => wallet.type == WalletType.bitcoin && !wallet.isHardwareWallet; @computed double get price { @@ -93,7 +93,7 @@ abstract class BalanceViewModelBase with Store { wallet.type == WalletType.tron; @computed - bool get hasAccounts => wallet.type == WalletType.monero; + bool get hasAccounts => wallet.type == WalletType.monero || wallet.type == WalletType.wownero; @computed SortBalanceBy get sortBalanceBy => settingsStore.sortBalanceBy; @@ -250,7 +250,7 @@ abstract class BalanceViewModelBase with Store { String getFormattedFrozenBalance(Balance walletBalance) => walletBalance.formattedUnAvailableBalance; - + @computed String get frozenFiatBalance { final walletBalance = _walletBalance;