Skip to content

Commit 8204d10

Browse files
committed
fixes cycle
1 parent d5562e7 commit 8204d10

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/lib/services/threshold_fetcher.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import {environment} from '../../environment';
22
import {gStore} from '../storage/store';
33
import {THRESHOLD_CACHE} from '../storage/keys';
4+
import type {ThresholdEntry} from '../types/floatdb';
45

56
const THRESHOLDS_URL = `${environment.floatdb_gateway_url}/v1/ranks/thresholds/bin`;
67
const CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
78
const RETRY_AFTER_FAILURE_MS = 15 * 60 * 1000; // 15 minutes
89

9-
export interface ThresholdEntry {
10-
low: number;
11-
high: number;
12-
}
13-
1410
interface ThresholdCache {
1511
lastUpdated: number;
1612
thresholds: Record<string, ThresholdEntry>;

src/lib/storage/keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import {SerializedFilter} from '../filter/types';
55
import type {ItemSchema} from '../types/schema';
6-
import type {ThresholdEntry} from '../services/threshold_fetcher';
6+
import type {ThresholdEntry} from '../types/floatdb';
77

88
export enum StorageKey {
99
// Backwards compatible with <3.0.0

src/lib/types/floatdb.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface ThresholdEntry {
2+
low: number;
3+
high: number;
4+
}

0 commit comments

Comments
 (0)