refactor wallet seletors in buy/sell controllers
This commit is contained in:
parent
27e925b84f
commit
4b0abd77a2
9 changed files with 73 additions and 119 deletions
|
|
@ -699,7 +699,7 @@ angular.module('copayApp.services')
|
|||
});
|
||||
};
|
||||
|
||||
root.getWallets = function(network) {
|
||||
root.getWallets = function(network, n) {
|
||||
if (!root.profile) return [];
|
||||
|
||||
var config = configService.getSync();
|
||||
|
|
@ -721,6 +721,12 @@ angular.module('copayApp.services')
|
|||
return (w.network == network);
|
||||
});
|
||||
}
|
||||
if (n) {
|
||||
ret = lodash.filter(ret, function(w) {
|
||||
return (w.n == n);
|
||||
});
|
||||
}
|
||||
|
||||
return lodash.sortBy(ret, 'name');
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue