diff --git a/src/services/analytics/index.ts b/src/services/analytics/index.ts index d2b449466..0ab867cc6 100644 --- a/src/services/analytics/index.ts +++ b/src/services/analytics/index.ts @@ -197,10 +197,10 @@ class AnalyticsService { isDemo: false, timeline: FEATURE_FLAGS.wallet.timeline, stats: { - balance: this.createMetricValue(walletData.balance, 'api'), + balance: this.createMetricValue(walletData.balance, 'api'), transactionCount: this.createMetricValue(walletData.transactions.length, 'api'), lastUpdated: this.createMetricValue( - new Date(walletData.lastUpdated).toLocaleTimeString(), + walletData.lastUpdated ? new Date(walletData.lastUpdated).toLocaleTimeString() : 'Unknown', 'api' ) } diff --git a/src/services/supabase/profiles/index.ts b/src/services/supabase/profiles/index.ts index 1a676f790..c46d8092c 100644 --- a/src/services/supabase/profiles/index.ts +++ b/src/services/supabase/profiles/index.ts @@ -15,10 +15,9 @@ import type { Profile, ProfileUpdateData, ProfileResponse, - ProfileUpdateResponse, - isValidProfile + ProfileUpdateResponse } from '../types' -import { isValidProfile as isValidProfileFromTypes } from '@/types/profile' +import { isValidProfile } from '../types' // ==================== PROFILE OPERATIONS ==================== diff --git a/src/utils/performance.tsx b/src/utils/performance.tsx index b7a7fbc37..114ce4b6c 100644 --- a/src/utils/performance.tsx +++ b/src/utils/performance.tsx @@ -20,7 +20,7 @@ import React from 'react' /** * Enhanced lazy loading with error boundary and loading states */ -export function createLazyComponent( +export function createLazyComponent( importFn: () => Promise<{ default: ComponentType }>, fallback?: ComponentType ) { @@ -29,7 +29,7 @@ export function createLazyComponent( return function LazyWrapper(props: T) { return ( Loading...}> - + ) } @@ -118,7 +118,8 @@ export class PerformanceCache { clear(): void { if (this.onEvict) { - for (const [key, entry] of this.cache) { + const entries = Array.from(this.cache.entries()) + for (const [key, entry] of entries) { this.onEvict(key, entry.value) } }