small refactor
This commit is contained in:
parent
4b56e06472
commit
810ce0bf5d
1 changed files with 12 additions and 16 deletions
|
|
@ -223,10 +223,7 @@ Storage.prototype.getWallets = function(cb) {
|
|||
if (!l)
|
||||
return cb([]);
|
||||
|
||||
for (var ii in ids) {
|
||||
// Create a closure for async calls.
|
||||
(function() {
|
||||
var id = ids[ii];
|
||||
_.each(ids, function(id) {
|
||||
self.getName(id, function(name) {
|
||||
wallets.push({
|
||||
id: id,
|
||||
|
|
@ -238,8 +235,7 @@ Storage.prototype.getWallets = function(cb) {
|
|||
return cb(wallets);
|
||||
}
|
||||
});
|
||||
})();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue