lint fix wip
This commit is contained in:
parent
ddda722141
commit
86c8de87b2
@ -158,8 +158,8 @@ export function Nip95ConfigManager({ onConfigChange }: Nip95ConfigManagerProps):
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Validate URL format
|
// Validate URL format - throws if invalid
|
||||||
new URL(newUrl)
|
void new URL(newUrl)
|
||||||
await configStorage.addNip95Api(newUrl.trim(), false)
|
await configStorage.addNip95Api(newUrl.trim(), false)
|
||||||
setNewUrl('')
|
setNewUrl('')
|
||||||
setShowAddForm(false)
|
setShowAddForm(false)
|
||||||
|
|||||||
@ -189,8 +189,8 @@ export function RelayManager({ onConfigChange }: RelayManagerProps): React.React
|
|||||||
normalizedUrl = `wss://${normalizedUrl}`
|
normalizedUrl = `wss://${normalizedUrl}`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate URL format
|
// Validate URL format - throws if invalid
|
||||||
new URL(normalizedUrl)
|
void new URL(normalizedUrl)
|
||||||
await configStorage.addRelay(normalizedUrl, true)
|
await configStorage.addRelay(normalizedUrl, true)
|
||||||
setNewUrl('')
|
setNewUrl('')
|
||||||
setShowAddForm(false)
|
setShowAddForm(false)
|
||||||
|
|||||||
@ -78,7 +78,7 @@ export function useArticlePayment(
|
|||||||
setPaymentInvoice(paymentResult.invoice)
|
setPaymentInvoice(paymentResult.invoice)
|
||||||
setPaymentHash(paymentResult.paymentHash)
|
setPaymentHash(paymentResult.paymentHash)
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
checkPaymentStatus(paymentResult.paymentHash, pubkey)
|
void checkPaymentStatus(paymentResult.paymentHash, pubkey)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const errorMessage = e instanceof Error ? e.message : 'Failed to process payment'
|
const errorMessage = e instanceof Error ? e.message : 'Failed to process payment'
|
||||||
console.error('Payment processing error:', e)
|
console.error('Payment processing error:', e)
|
||||||
|
|||||||
@ -187,7 +187,7 @@ export class NostrAuthService {
|
|||||||
private setupMessageListener(): void {
|
private setupMessageListener(): void {
|
||||||
window.addEventListener('storage', (e: StorageEvent): void => {
|
window.addEventListener('storage', (e: StorageEvent): void => {
|
||||||
if (e.key === 'nostr_auth_state') {
|
if (e.key === 'nostr_auth_state') {
|
||||||
this.loadStateFromStorage()
|
void this.loadStateFromStorage()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,7 +149,7 @@ export function markNotificationAsRead(
|
|||||||
const updated = notifications.map((n) =>
|
const updated = notifications.map((n) =>
|
||||||
(n.id === notificationId ? { ...n, read: true } : n)
|
(n.id === notificationId ? { ...n, read: true } : n)
|
||||||
)
|
)
|
||||||
saveNotifications(userPubkey, updated)
|
void saveNotifications(userPubkey, updated)
|
||||||
return updated
|
return updated
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ export function markNotificationAsRead(
|
|||||||
*/
|
*/
|
||||||
export function markAllAsRead(userPubkey: string, notifications: Notification[]): Notification[] {
|
export function markAllAsRead(userPubkey: string, notifications: Notification[]): Notification[] {
|
||||||
const updated = notifications.map((n) => ({ ...n, read: true }))
|
const updated = notifications.map((n) => ({ ...n, read: true }))
|
||||||
saveNotifications(userPubkey, updated)
|
void saveNotifications(userPubkey, updated)
|
||||||
return updated
|
return updated
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,6 +171,6 @@ export function deleteNotification(
|
|||||||
notifications: Notification[]
|
notifications: Notification[]
|
||||||
): Notification[] {
|
): Notification[] {
|
||||||
const updated = notifications.filter((n) => n.id !== notificationId)
|
const updated = notifications.filter((n) => n.id !== notificationId)
|
||||||
saveNotifications(userPubkey, updated)
|
void saveNotifications(userPubkey, updated)
|
||||||
return updated
|
return updated
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user