lint fix wip

This commit is contained in:
Nicolas Cantu 2026-01-06 15:11:52 +01:00
parent f5d9033183
commit 52bd9492b7
4 changed files with 9 additions and 8 deletions

View File

@ -26,7 +26,7 @@ export class NostrAuthService {
subscribe(callback: (state: NostrConnectState) => void): () => void {
this.listeners.add(callback)
callback(this.state)
return () => {
return (): void => {
this.listeners.delete(callback)
}
}
@ -182,7 +182,7 @@ export class NostrAuthService {
}
private setupMessageListener(): void {
window.addEventListener('storage', (e) => {
window.addEventListener('storage', (e: StorageEvent): void => {
if (e.key === 'nostr_auth_state') {
this.loadStateFromStorage()
}

View File

@ -42,7 +42,7 @@ export function getPrivateContent(
throw new Error('Private key not set or pool not initialized')
}
return new Promise((resolve) => {
return new Promise<string | null>((resolve) => {
let resolved = false
const relayUrl = getPrimaryRelaySync()
const { createSubscription } = require('@/types/nostr-tools-extended')
@ -57,7 +57,7 @@ export function getPrivateContent(
resolve(result)
}
sub.on('event', (event: Event) => {
sub.on('event', (event: Event): void => {
void decryptContent(privateKey, event)
.then((content) => {
if (content) {
@ -119,7 +119,7 @@ export async function getDecryptionKey(
throw new Error('Private key not set or pool not initialized')
}
return new Promise((resolve) => {
return new Promise<DecryptionKey | null>((resolve) => {
let resolved = false
const relayUrl = getPrimaryRelaySync()
const { createSubscription } = require('@/types/nostr-tools-extended')

View File

@ -65,7 +65,7 @@ export function checkZapReceipt(
return Promise.resolve(false)
}
return new Promise((resolve) => {
return new Promise<boolean>((resolve) => {
let resolved = false
const relayUrl = getPrimaryRelaySync()
const sub = createSubscription(pool, [relayUrl], createZapFilters(targetPubkey, targetEventId, userPubkey))
@ -84,7 +84,9 @@ export function checkZapReceipt(
handleZapReceiptEvent(event, targetEventId, targetPubkey, userPubkey, amount, finalize, resolvedRef)
})
const end = () => finalize(false)
const end = (): void => {
finalize(false)
}
sub.on('eose', end)
setTimeout(end, 3000)
})

View File

@ -213,4 +213,3 @@ class PlatformSyncService {
}
export const platformSyncService = new PlatformSyncService()