bch wallets appear first regardless of creation date in wallet selector

This commit is contained in:
Kadir Sekha 2018-02-20 22:57:32 +05:30
commit daf37200e4

View file

@ -856,13 +856,21 @@ angular.module('copayApp.services')
root.addLastKnownBalance(x, function() {}); root.addLastKnownBalance(x, function() {});
}); });
var sortedByCreatedOn = lodash.sortBy(ret, [
return lodash.sortBy(ret, [
function(x) { function(x) {
return x.isComplete(); return x.isComplete();
}, 'createdOn' }, '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) { root.toggleHideBalanceFlag = function(walletId, cb) {