import { Platform } from 'react-native'; export interface DeviceInfo { platform: string; modelName: string | null; brand: string | null; manufacturer: string | null; osName: string | null; osVersion: string | null; deviceType: number | null; deviceName: string | null; totalMemory: number | null; modelId: string | null; designName: string | null; productName: string | null; isDevice: boolean | null; } /** * Detect Solana Seeker device (synchronous — safe to call during render). * Checks brand from expo-device; returns false if expo-device isn't installed. */ export function isSolanaSeeker(): boolean { try { const Device = require('expo-device'); return Device.brand?.toLowerCase() === 'solanamobile'; } catch { return false; } } export async function getDeviceInfo(): Promise { try { const Device = require('expo-device'); return { platform: Platform.OS, modelName: Device.modelName, brand: Device.brand, manufacturer: Device.manufacturer, osName: Device.osName, osVersion: Device.osVersion, deviceType: Device.deviceType, deviceName: Device.deviceName, totalMemory: Device.totalMemory, modelId: Device.modelId, designName: Device.designName, productName: Device.productName, isDevice: Device.isDevice, }; } catch { // expo-device not installed — return minimal info return { platform: Platform.OS, modelName: null, brand: null, manufacturer: null, osName: null, osVersion: null, deviceType: null, deviceName: null, totalMemory: null, modelId: null, designName: null, productName: null, isDevice: null, }; } }