bch wallets appear first regardless of creation date in wallet selector
This commit is contained in:
parent
1b7a51ab68
commit
daf37200e4
1 changed files with 11 additions and 3 deletions
|
|
@ -856,13 +856,21 @@ angular.module('copayApp.services')
|
|||
root.addLastKnownBalance(x, function() {});
|
||||
});
|
||||
|
||||
|
||||
return lodash.sortBy(ret, [
|
||||
|
||||
var sortedByCreatedOn = lodash.sortBy(ret, [
|
||||
function(x) {
|
||||
return x.isComplete();
|
||||
}, 'createdOn'
|
||||
]);
|
||||
|
||||
var bchSortedWallets = lodash.filter(sortedByCreatedOn, function(x) {
|
||||
return x.coin == 'bch';
|
||||
});
|
||||
|
||||
var btcSortedWallets = lodash.filter(sortedByCreatedOn, function(x) {
|
||||
return x.coin == 'btc';
|
||||
});
|
||||
|
||||
return bchSortedWallets.concat(btcSortedWallets);
|
||||
};
|
||||
|
||||
root.toggleHideBalanceFlag = function(walletId, cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue