mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-13 09:04:09 +01:00
CW-260 show amount received for each account (#907)
* Show amount received for each account * Enable litcoin send all * disable litcoin send all * Indent code * Fix large font resolution for account title
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class AccountListItem {
|
||||
AccountListItem(
|
||||
{required this.label, required this.id, this.isSelected = false});
|
||||
{required this.label, required this.id, this.balance, this.isSelected = false});
|
||||
|
||||
final String label;
|
||||
final int id;
|
||||
final bool isSelected;
|
||||
final String? balance;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
@@ -21,6 +22,8 @@ abstract class MoneroAccountListViewModelBase with Store {
|
||||
this.scrollOffsetFromTop = scrollOffsetFromTop;
|
||||
}
|
||||
|
||||
CryptoCurrency get currency => _wallet.currency;
|
||||
|
||||
@computed
|
||||
List<AccountListItem> get accounts {
|
||||
if (_wallet.type == WalletType.haven) {
|
||||
@@ -39,6 +42,7 @@ abstract class MoneroAccountListViewModelBase with Store {
|
||||
.accounts.map((acc) => AccountListItem(
|
||||
label: acc.label,
|
||||
id: acc.id,
|
||||
balance: acc.balance,
|
||||
isSelected: acc.id == monero!.getCurrentAccount(_wallet).id))
|
||||
.toList();
|
||||
}
|
||||
@@ -53,7 +57,9 @@ abstract class MoneroAccountListViewModelBase with Store {
|
||||
monero!.setCurrentAccount(
|
||||
_wallet,
|
||||
item.id,
|
||||
item.label);
|
||||
item.label,
|
||||
item.balance,
|
||||
);
|
||||
}
|
||||
|
||||
if (_wallet.type == WalletType.haven) {
|
||||
|
||||
Reference in New Issue
Block a user