diff --git a/js/models/Identity.js b/js/models/Identity.js index e937a801b..f63661241 100644 --- a/js/models/Identity.js +++ b/js/models/Identity.js @@ -495,7 +495,7 @@ Identity.prototype.getOpenWallet = function(id) { }; -Identity.prototype.listWallets = function(a) { +Identity.prototype.listWallets = function() { var ret = this.profile.listWallets(); return ret; }; diff --git a/js/models/Profile.js b/js/models/Profile.js index 232bf6764..e81ef8aad 100644 --- a/js/models/Profile.js +++ b/js/models/Profile.js @@ -74,7 +74,7 @@ Profile.prototype.getWallet = function(walletId, cb) { return this.walletInfos[walletId]; }; -Profile.prototype.listWallets = function(opts, cb) { +Profile.prototype.listWallets = function() { return _.sortBy(this.walletInfos, function(winfo) { return -winfo.lastOpenedTs || -winfo.createdTs; });