You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// LitNodeClientNodejs is a base for LitNodeClient
@@ -674,7 +679,12 @@ export class LitCore {
674
679
this.config.bootstrapUrls.length
675
680
} nodes. Please check your network connection and try again. Note that you can control this timeout with the connectTimeout config option which takes milliseconds.`;
// TODO: currently we are not deleting old request id's which over time will fill local storage as the maximum storage size is 10mb
341
358
// we should be deleting keys from the front of the collection of `Object.keys(category)` such that the first keys entered are deleted when we reach a pre defined key threshold
342
359
// this implementation assumes that serialization / deserialization from `localStorage` keeps the same key ordering in each `category` object as we will asssume the array produced from `Object.keys` will always be the same ordering.
@@ -421,14 +438,20 @@ export class LogManager {
421
438
}
422
439
423
440
getLoggerIds(): string[]{
424
-
constkeys: string[]=[];
441
+
constkeys: [string,number][]=[];
425
442
for(constcategoryofthis._loggers.entries()){
426
443
for(constchildofcategory[1].Children){
427
-
keys.push(child[0]);
444
+
keys.push([child[0],child[1].timestamp]);
428
445
}
429
446
}
430
447
431
-
returnkeys;
448
+
returnkeys
449
+
.sort((a: [string,number],b: [string,number])=>{
450
+
returna[1]-b[1];
451
+
})
452
+
.map((value: [string,number])=>{
453
+
returnvalue[0];
454
+
});
432
455
}
433
456
434
457
// if a logger is given an id it will persist logs under its logger instance
0 commit comments