mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
added walletIds by coin getter function
This commit is contained in:
parent
4c2a096174
commit
c3bbc624f7
1 changed files with 10 additions and 0 deletions
|
@ -51,6 +51,16 @@ class Wallets extends ChangeNotifier {
|
||||||
_managerProviderMap.values.toList(growable: false);
|
_managerProviderMap.values.toList(growable: false);
|
||||||
List<Manager> get managers => _managerMap.values.toList(growable: false);
|
List<Manager> get managers => _managerMap.values.toList(growable: false);
|
||||||
|
|
||||||
|
List<String> getWalletIdsFor({required Coin coin}) {
|
||||||
|
final List<String> result = [];
|
||||||
|
for (final manager in _managerMap.values) {
|
||||||
|
if (manager.coin == coin) {
|
||||||
|
result.add(manager.walletId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
Map<Coin, List<ChangeNotifierProvider<Manager>>> getManagerProvidersByCoin() {
|
Map<Coin, List<ChangeNotifierProvider<Manager>>> getManagerProvidersByCoin() {
|
||||||
Map<Coin, List<ChangeNotifierProvider<Manager>>> result = {};
|
Map<Coin, List<ChangeNotifierProvider<Manager>>> result = {};
|
||||||
for (final manager in _managerMap.values) {
|
for (final manager in _managerMap.values) {
|
||||||
|
|
Loading…
Reference in a new issue