diff --git a/apps/wallet-mobile/src/features/Menu/Menu.tsx b/apps/wallet-mobile/src/features/Menu/Menu.tsx index 590e375bfd..cc1296c77e 100644 --- a/apps/wallet-mobile/src/features/Menu/Menu.tsx +++ b/apps/wallet-mobile/src/features/Menu/Menu.tsx @@ -171,7 +171,7 @@ const KnowledgeBase = Item const Catalyst = ({label, left, onPress}: {label: string; left: React.ReactElement; onPress: () => void}) => { const strings = useStrings() const {wallet} = useSelectedWallet() - const {canVote, sufficientFunds} = useCanVote(wallet) + const {sufficientFunds} = useCanVote(wallet) const {openModal} = useModal() const screenHeight = useWindowDimensions().height const modalHeight = Math.min(screenHeight * 0.8, 256) @@ -183,7 +183,7 @@ const Catalyst = ({label, left, onPress}: {label: string; left: React.ReactEleme openModal(strings.attention, , modalHeight) } } - return + return } const SUPPORT_TICKET_LINK = 'https://emurgohelpdesk.zendesk.com/hc/en-us/requests/new?ticket_form_id=360013330335' diff --git a/apps/wallet-mobile/src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.tsx b/apps/wallet-mobile/src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.tsx index 7bed584873..a121f05f6d 100644 --- a/apps/wallet-mobile/src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.tsx +++ b/apps/wallet-mobile/src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.tsx @@ -205,9 +205,9 @@ const CrashReportsSwitch = ({crashReportEnabled}: {crashReportEnabled: boolean}) const onToggleCrashReports = () => { setIsLocalEnabled((prevState) => { if (prevState) { - enable() - } else { disable() + } else { + enable() } return !prevState diff --git a/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts b/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts index fb3ee1a9d8..a456ca2916 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts @@ -34,7 +34,6 @@ import {Utxos} from '../utils/utils' const crashReportsStorageKey = 'sendCrashReports' export const getCrashReportsEnabled = async (storage: AsyncStorageStatic = AsyncStorage) => { - if (isNightly || isDev) return true const data = await storage.getItem(crashReportsStorageKey) return parseBoolean(data) ?? false } @@ -44,10 +43,12 @@ const useCrashReportsEnabled = (storage: AsyncStorageStatic = AsyncStorage) => { suspense: true, queryKey: [crashReportsStorageKey], queryFn: () => getCrashReportsEnabled(storage), + enabled: !isNightly && !isDev, }) if (query.data == null) throw new Error('invalid state') + if (isNightly || isDev) return true return query.data }