fix walletID list
This commit is contained in:
parent
e28be27bf3
commit
a51ed6c66d
3 changed files with 8 additions and 3 deletions
|
|
@ -54,13 +54,17 @@ Storage.prototype.remove = function(walletId, k) {
|
|||
|
||||
Storage.prototype.getWalletIds = function() {
|
||||
var walletIds = [];
|
||||
var uniq = {};
|
||||
|
||||
for (var i = 0; i < localStorage.length; i++) {
|
||||
var key = localStorage.key(i);
|
||||
var split = key.split('::');
|
||||
if (split.length == 2) {
|
||||
var walletId = split[0];
|
||||
walletIds.push(walletId);
|
||||
if (typeof uniq[walletId] === 'undefined' ) {
|
||||
walletIds.push(walletId);
|
||||
uniq[walletId] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue