fix: eslint errors
This commit is contained in:
parent
f684658183
commit
9bfb6ede0a
@ -11,8 +11,8 @@ class DMCache extends FeedCache<RawEvent> {
|
||||
return of.id;
|
||||
}
|
||||
|
||||
override async preload(follows?: Array<string>): Promise<void> {
|
||||
await super.preload(follows);
|
||||
override async preload(): Promise<void> {
|
||||
await super.preload();
|
||||
// load all dms to memory
|
||||
await this.buffer([...this.onTable]);
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ class EventInteractionCache extends FeedCache<EventInteraction> {
|
||||
return sha256(of.event + of.by);
|
||||
}
|
||||
|
||||
override async preload(follows?: Array<string>): Promise<void> {
|
||||
await super.preload(follows);
|
||||
override async preload(): Promise<void> {
|
||||
await super.preload();
|
||||
|
||||
const data = window.localStorage.getItem("zap-cache");
|
||||
if (data) {
|
||||
|
@ -35,7 +35,7 @@ export default abstract class FeedCache<TCached> {
|
||||
}, 30_000);
|
||||
}
|
||||
|
||||
async preload(follows?: Array<string>) {
|
||||
async preload() {
|
||||
if (db.ready) {
|
||||
const keys = await this.table.toCollection().primaryKeys();
|
||||
this.onTable = new Set<string>(keys.map(a => a as string));
|
||||
|
@ -19,7 +19,7 @@ class UserProfileCache extends FeedCache<MetadataCache> {
|
||||
}
|
||||
|
||||
override async preload(follows?: Array<string>): Promise<void> {
|
||||
await super.preload(follows);
|
||||
await super.preload();
|
||||
// load follows profiles
|
||||
if (follows) {
|
||||
await this.buffer(follows);
|
||||
|
@ -11,7 +11,7 @@ class UsersRelaysCache extends FeedCache<UsersRelays> {
|
||||
}
|
||||
|
||||
override async preload(follows?: Array<string>): Promise<void> {
|
||||
await super.preload(follows);
|
||||
await super.preload();
|
||||
if (follows) {
|
||||
await this.buffer(follows);
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ export function mapEventToProfile(ev: RawEvent) {
|
||||
export async function preload(follows?: Array<string>) {
|
||||
const preloads = [
|
||||
UserCache.preload(follows),
|
||||
DmCache.preload(follows),
|
||||
InteractionCache.preload(follows),
|
||||
DmCache.preload(),
|
||||
InteractionCache.preload(),
|
||||
UserRelays.preload(follows),
|
||||
];
|
||||
await Promise.all(preloads);
|
||||
|
@ -35,7 +35,6 @@ export default function Relay(props: RelayProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const latency = Math.floor(state?.avgLatency ?? 0);
|
||||
return (
|
||||
<>
|
||||
<div className={`relay w-max`}>
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { InvoiceRequest, LNWallet, Sats, WalletError, WalletErrorCode, WalletInfo, WalletInvoice } from "Wallet";
|
||||
|
||||
import { LNWallet, Sats, WalletError, WalletErrorCode, WalletInfo, WalletInvoice } from "Wallet";
|
||||
import { CashuMint, CashuWallet as TheCashuWallet, Proof } from "@cashu/cashu-ts";
|
||||
|
||||
export class CashuWallet implements LNWallet {
|
||||
|
@ -21,13 +21,12 @@ export interface ZapPoolRecipient {
|
||||
}
|
||||
|
||||
class ZapPool extends ExternalStore<Array<ZapPoolRecipient>> {
|
||||
#store: Map<string, ZapPoolRecipient>;
|
||||
#store = new Map<string, ZapPoolRecipient>();
|
||||
#isPayoutInProgress = false;
|
||||
#lastPayout: number = 0;
|
||||
#lastPayout = 0;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.#store = new Map();
|
||||
this.#load();
|
||||
setTimeout(() => this.#autoPayout().catch(console.error), 5_000);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ import { db } from "Db";
|
||||
import { preload } from "Cache";
|
||||
import { LoginStore } from "Login";
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-expect-error Setting webpack nonce
|
||||
window.__webpack_nonce__ = "ZmlhdGphZiBzYWlkIHNub3J0LnNvY2lhbCBpcyBwcmV0dHkgZ29vZCwgd2UgbWFkZSBpdCE=";
|
||||
|
||||
serviceWorkerRegistration.register();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/// <reference lib="webworker" />
|
||||
import {} from ".";
|
||||
declare var self: ServiceWorkerGlobalScope;
|
||||
declare const self: ServiceWorkerGlobalScope;
|
||||
|
||||
import { clientsClaim } from "workbox-core";
|
||||
import { ExpirationPlugin } from "workbox-expiration";
|
||||
|
Loading…
x
Reference in New Issue
Block a user