Balance Container redesigned according to Figma (#287)

* Balance Container redesigned according to Figma

* injected BalancePage to di.dart page

* removed an empty line and injected BalancePage using GetIt
This commit is contained in:
Rafia Rahman Chowdhury
2022-03-18 11:47:57 +01:00
committed by GitHub
parent efd4a259f7
commit c10d5ef83c
4 changed files with 206 additions and 101 deletions
@@ -58,6 +58,22 @@ abstract class BalanceViewModelBase with Store {
@computed
BalanceDisplayMode get savedDisplayMode => settingsStore.balanceDisplayMode;
@computed
String get asset {
switch(appStore.wallet.currency){
case CryptoCurrency.btc:
return 'Bitcoin Assets';
case CryptoCurrency.xmr:
return 'Monero Assets';
case CryptoCurrency.ltc:
return 'Litecoin Assets';
default:
return '';
}
}
@computed
BalanceDisplayMode get displayMode => isReversing
? savedDisplayMode == BalanceDisplayMode.hiddenBalance
@@ -114,11 +130,10 @@ abstract class BalanceViewModelBase with Store {
return '---';
}
return fiatCurrency.toString() +
' ' +
_getFiatBalance(
return _getFiatBalance(
price: price,
cryptoAmount: walletBalance.formattedAvailableBalance);
cryptoAmount: walletBalance.formattedAvailableBalance) + ' ' + fiatCurrency.toString();
}
@computed
@@ -130,11 +145,10 @@ abstract class BalanceViewModelBase with Store {
return '---';
}
return fiatCurrency.toString() +
' ' +
_getFiatBalance(
return _getFiatBalance(
price: price,
cryptoAmount: walletBalance.formattedAdditionalBalance);
cryptoAmount: walletBalance.formattedAdditionalBalance) + ' ' + fiatCurrency.toString();
}
@computed
@@ -165,3 +179,4 @@ abstract class BalanceViewModelBase with Store {
return calculateFiatAmount(price: price, cryptoAmount: cryptoAmount);
}
}