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() {});
|
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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue