Update package dependencies and refactor types in Nostr-related components
- Upgrade @types/node to version 22.18.1 and add @types/qrcode version 1.5.5 in package.json and package-lock.json. - Refactor cleanupInterval and reconnectInterval types from NodeJS.Timeout to number in various Nostr-related files for better type compatibility. - Enhance error handling in useNostrclientHub and useNostrChat components by specifying error parameter types.
This commit is contained in:
parent
a551f46c90
commit
54b013490e
8 changed files with 65 additions and 28 deletions
|
|
@ -144,7 +144,7 @@ export function useTicketPurchase() {
|
|||
// Start payment status check
|
||||
async function startPaymentStatusCheck(eventId: string, hash: string) {
|
||||
isPaymentPending.value = true
|
||||
let checkInterval: NodeJS.Timeout | null = null
|
||||
let checkInterval: number | null = null
|
||||
|
||||
const checkPayment = async () => {
|
||||
try {
|
||||
|
|
@ -174,7 +174,7 @@ export function useTicketPurchase() {
|
|||
await checkPayment()
|
||||
|
||||
// Then check every 2 seconds
|
||||
checkInterval = setInterval(checkPayment, 2000)
|
||||
checkInterval = setInterval(checkPayment, 2000) as unknown as number
|
||||
}
|
||||
|
||||
// Stop payment status check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue