Move zap parsing to @snort/system
This commit is contained in:
@ -3,7 +3,7 @@ import { db, EventInteraction } from "Db";
|
||||
import { LoginStore } from "Login";
|
||||
import { sha256 } from "SnortUtils";
|
||||
|
||||
class EventInteractionCache extends FeedCache<EventInteraction> {
|
||||
export class EventInteractionCache extends FeedCache<EventInteraction> {
|
||||
constructor() {
|
||||
super("EventInteraction", db.eventInteraction);
|
||||
}
|
||||
@ -40,5 +40,3 @@ class EventInteractionCache extends FeedCache<EventInteraction> {
|
||||
return [...this.cache.values()];
|
||||
}
|
||||
}
|
||||
|
||||
export const InteractionCache = new EventInteractionCache();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Payment, db } from "Db";
|
||||
import { FeedCache } from "@snort/shared";
|
||||
|
||||
class Payments extends FeedCache<Payment> {
|
||||
export class Payments extends FeedCache<Payment> {
|
||||
constructor() {
|
||||
super("PaymentsCache", db.payments);
|
||||
}
|
||||
@ -14,5 +14,3 @@ class Payments extends FeedCache<Payment> {
|
||||
return [...this.cache.values()];
|
||||
}
|
||||
}
|
||||
|
||||
export const PaymentsCache = new Payments();
|
||||
|
@ -1,11 +1,14 @@
|
||||
import { UserProfileCache, UserRelaysCache, RelayMetricCache } from "@snort/system";
|
||||
import { InteractionCache } from "./EventInteractionCache";
|
||||
import { EventInteractionCache } from "./EventInteractionCache";
|
||||
import { ChatCache } from "./ChatCache";
|
||||
import { Payments } from "./PaymentsCache";
|
||||
|
||||
export const UserCache = new UserProfileCache();
|
||||
export const UserRelays = new UserRelaysCache();
|
||||
export const RelayMetrics = new RelayMetricCache();
|
||||
export const Chats = new ChatCache();
|
||||
export const PaymentsCache = new Payments();
|
||||
export const InteractionCache = new EventInteractionCache();
|
||||
|
||||
export async function preload(follows?: Array<string>) {
|
||||
const preloads = [
|
||||
|
Reference in New Issue
Block a user