Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sort imports #2435

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,5 @@
"bracketSameLine": true,
"quoteStyle": "single"
}
},
"organizeImports": {
"enabled": false
}
}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
"e2e:test:ios-release": "detox test --configuration ios.release",
"e2e:test:android-debug": "DEV=true detox test --configuration android.debug",
"e2e:test:android-release": "detox test --configuration android.release",
"format:check": "biome format ./src/**/*.{js,jsx,ts,tsx}",
"format:fix": "biome format --write ./src/**/*.{js,jsx,ts,tsx}",
"lint:check": "biome lint ./src/**/*.{js,jsx,ts,tsx}",
"lint:fix": "biome lint --write ./src/**/*.{js,jsx,ts,tsx}",
"lint:check": "biome check ./src/**/*.{js,jsx,ts,tsx}",
"lint:fix": "biome check --write ./src/**/*.{js,jsx,ts,tsx}",
"tsc:check": "tsc -p tsconfig.json --noEmit",
"clean": "yarn clean:rn && yarn clean:ios && yarn clean:android && yarn start --reset-cache",
"clean:rn": "watchman watch-del-all && npx del-cli node_modules && yarn && npx del-cli /tmp/metro-*",
Expand Down
18 changes: 9 additions & 9 deletions src/AppOnboarded.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import React, { memo, ReactElement, useEffect, useRef } from 'react';
import { AppState } from 'react-native';
import NetInfo from '@react-native-community/netinfo';
import React, { memo, ReactElement, useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { AppState } from 'react-native';

import RootNavigator from './navigation/root/RootNavigator';
import InactivityTracker from './components/InactivityTracker';
import { showToast } from './utils/notifications';
import { startWalletServices } from './utils/startup';
import { getOnChainWalletElectrumAsync } from './utils/wallet';
import { unsubscribeFromLightningSubscriptions } from './utils/lightning';
import { useAppSelector } from './hooks/redux';
import RootNavigator from './navigation/root/RootNavigator';
import { dispatch } from './store/helpers';
import { updateUi } from './store/slices/ui';
import { isOnlineSelector } from './store/reselect/ui';
import {
hideBalanceOnOpenSelector,
pinOnLaunchSelector,
pinSelector,
} from './store/reselect/settings';
import { isOnlineSelector } from './store/reselect/ui';
import {
selectedNetworkSelector,
selectedWalletSelector,
} from './store/reselect/wallet';
import { updateSettings } from './store/slices/settings';
import { updateUi } from './store/slices/ui';
import { unsubscribeFromLightningSubscriptions } from './utils/lightning';
import { showToast } from './utils/notifications';
import { startWalletServices } from './utils/startup';
import { getOnChainWalletElectrumAsync } from './utils/wallet';
// import { updateExchangeRates } from './store/actions/wallet';

const AppOnboarded = (): ReactElement => {
Expand Down
8 changes: 4 additions & 4 deletions src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { EventEmitter } from 'events';
import React, { ReactElement } from 'react';
import { View, StyleSheet } from 'react-native';
import { PersistGate } from 'redux-persist/integration/react';
import { enableScreens, enableFreeze } from 'react-native-screens';
import { StyleSheet, View } from 'react-native';
import { enableFreeze, enableScreens } from 'react-native-screens';
import { Provider } from 'react-redux';
import { EventEmitter } from 'events';
import { PersistGate } from 'redux-persist/integration/react';

import App from './App';
import ErrorBoundary from './ErrorBoundary';
Expand Down
10 changes: 5 additions & 5 deletions src/components/ActivityHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import {
ViewStyle,
} from 'react-native';

import { EyeIcon } from '../styles/icons';
import Money from './Money';
import DetectSwipe from './DetectSwipe';
import { useSwitchUnitAnnounced } from '../hooks/wallet';
import { useAppDispatch, useAppSelector } from '../hooks/redux';
import { updateSettings } from '../store/slices/settings';
import { useSwitchUnitAnnounced } from '../hooks/wallet';
import {
enableSwipeToHideBalanceSelector,
hideBalanceSelector,
} from '../store/reselect/settings';
import { updateSettings } from '../store/slices/settings';
import { EyeIcon } from '../styles/icons';
import DetectSwipe from './DetectSwipe';
import Money from './Money';

const ActivityHeader = ({
balance,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ActivityIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { ReactElement, useEffect, useMemo } from 'react';
import {
Canvas,
Path,
Skia,
SweepGradient,
vec,
} from '@shopify/react-native-skia';
import React, { ReactElement, useEffect, useMemo } from 'react';
import Animated, {
Easing,
FadeIn,
Expand Down
8 changes: 4 additions & 4 deletions src/components/AdjustValue.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { ReactElement, ReactNode } from 'react';
import {
View,
TouchableOpacity,
StyleSheet,
StyleProp,
StyleSheet,
TouchableOpacity,
View,
ViewStyle,
} from 'react-native';
import { BodyMSB, BodySSB } from '../styles/text';
import { MinusCircledIcon, PlusCircledIcon } from '../styles/icons';
import { BodyMSB, BodySSB } from '../styles/text';

type AdjustValueProps = {
value: ReactNode;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Amount.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { ReactElement } from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import { Display } from '../styles/text';
import { useCurrency } from '../hooks/displayValues';
import { EUnit } from '../store/types/wallet';
import { Display } from '../styles/text';

const Amount = ({
value,
Expand Down
2 changes: 1 addition & 1 deletion src/components/AmountToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { memo, ReactElement } from 'react';
import { StyleProp, StyleSheet, ViewStyle } from 'react-native';

import { Pressable } from '../styles/components';
import Money from '../components/Money';
import { Pressable } from '../styles/components';

/**
* Displays the total amount of sats specified and it's corresponding fiat value.
Expand Down
6 changes: 3 additions & 3 deletions src/components/AuthCheck.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { RouteProp } from '@react-navigation/native';
import React, { memo, ReactElement, useState } from 'react';
import { StyleSheet } from 'react-native';
import { useAppSelector } from '../hooks/redux';
import { RouteProp } from '@react-navigation/native';
import Animated, { FadeOut } from 'react-native-reanimated';
import { useAppSelector } from '../hooks/redux';

import { biometricsSelector } from '../store/reselect/settings';
import { View as ThemedView } from '../styles/components';
import Biometrics from './Biometrics';
import PinPad from './PinPad';
import { biometricsSelector } from '../store/reselect/settings';

type AuthCheckProps = {
showBackNavigation?: boolean;
Expand Down
10 changes: 5 additions & 5 deletions src/components/BalanceHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { memo, ReactElement } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import { useAppDispatch, useAppSelector } from '../hooks/redux';
import { Trans, useTranslation } from 'react-i18next';

import { Caption13Up } from '../styles/text';
import { EyeIcon } from '../styles/icons';
import Money from './Money';
import { useBalance, useSwitchUnitAnnounced } from '../hooks/wallet';
import { updateSettings } from '../store/slices/settings';
import { hideBalanceSelector } from '../store/reselect/settings';
import { updateSettings } from '../store/slices/settings';
import { EyeIcon } from '../styles/icons';
import { Caption13Up } from '../styles/text';
import Money from './Money';

/**
* Displays the total available balance for the current wallet & network.
Expand Down
10 changes: 5 additions & 5 deletions src/components/Balances.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React, { memo, ReactElement } from 'react';
import { View, StyleSheet, TouchableOpacity } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import React, { memo, ReactElement } from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, TouchableOpacity, View } from 'react-native';

import { useBalance } from '../hooks/wallet';
import { RootNavigationProp } from '../navigation/types';
import { View as ThemedView } from '../styles/components';
import {
BitcoinCircleIcon,
LightningCircleIcon,
TransferIcon,
} from '../styles/icons';
import { Caption13Up } from '../styles/text';
import { View as ThemedView } from '../styles/components';
import Money from './Money';
import { useBalance } from '../hooks/wallet';
import { RootNavigationProp } from '../navigation/types';

const Balance = ({
label,
Expand Down
18 changes: 9 additions & 9 deletions src/components/BaseFeedWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import React, { memo, ReactElement, useState } from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import { useTranslation } from 'react-i18next';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import { useAppDispatch, useAppSelector } from '../hooks/redux';
import { useSlashfeed } from '../hooks/widgets';
import { rootNavigation } from '../navigation/root/RootNavigator';
import { showWidgetTitlesSelector } from '../store/reselect/settings';
import { deleteWidget } from '../store/slices/widgets';
import { TouchableOpacity } from '../styles/components';
import { BodyMSB } from '../styles/text';
import {
SettingsIcon,
ListIcon,
TrashIcon,
QuestionMarkIcon,
SettingsIcon,
TrashIcon,
} from '../styles/icons';
import { useAppDispatch, useAppSelector } from '../hooks/redux';
import { useSlashfeed } from '../hooks/widgets';
import { BodyMSB } from '../styles/text';
import { truncate } from '../utils/helpers';
import { deleteWidget } from '../store/slices/widgets';
import { showWidgetTitlesSelector } from '../store/reselect/settings';
import Dialog from './Dialog';
import SvgImage from './SvgImage';
import LoadingView from './LoadingView';
import SvgImage from './SvgImage';

const BaseFeedWidget = ({
url,
Expand Down
12 changes: 6 additions & 6 deletions src/components/Biometrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import React, {
useEffect,
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import { StyleProp, StyleSheet, ViewStyle } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { BiometryType } from 'react-native-biometrics';
import { useTranslation } from 'react-i18next';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

import { View, TouchableOpacity } from '../styles/components';
import { Subtitle } from '../styles/text';
import { FingerPrintIcon } from '../styles/icons';
import { useAppDispatch } from '../hooks/redux';
import { updateSettings } from '../store/slices/settings';
import { vibrate } from '../utils/helpers';
import { TouchableOpacity, View } from '../styles/components';
import { FingerPrintIcon } from '../styles/icons';
import { Subtitle } from '../styles/text';
import rnBiometrics from '../utils/biometrics';
import { vibrate } from '../utils/helpers';

export interface IsSensorAvailableResult {
available: boolean;
Expand Down
16 changes: 8 additions & 8 deletions src/components/BlocksWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Reader } from '@synonymdev/slashtags-widget-bitcoin-feed';
import React, { memo, ReactElement, useEffect, useState } from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import { useTranslation } from 'react-i18next';
import { Reader } from '@synonymdev/slashtags-widget-bitcoin-feed';
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';

import { CaptionB, BodyMSB, BodySSB } from '../styles/text';
import BaseFeedWidget from './BaseFeedWidget';
import { TFeedWidget } from '../store/types/widgets';
import { useSlashfeed } from '../hooks/widgets';
import { decodeWidgetFieldValue, SUPPORTED_FEED_TYPES } from '../utils/widgets';
import { useSlashtags } from '../hooks/slashtags';
import { __E2E__ } from '../constants/env';
import { useSlashtags } from '../hooks/slashtags';
import { useSlashfeed } from '../hooks/widgets';
import { TFeedWidget } from '../store/types/widgets';
import { BodyMSB, BodySSB, CaptionB } from '../styles/text';
import { SUPPORTED_FEED_TYPES, decodeWidgetFieldValue } from '../utils/widgets';
import BaseFeedWidget from './BaseFeedWidget';

const mapping = {
Block: 'height',
Expand Down
4 changes: 2 additions & 2 deletions src/components/BlurView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactElement, ReactNode } from 'react';
import { StyleSheet, Platform, StyleProp, ViewStyle } from 'react-native';
import { BlurView as Blur } from '@react-native-community/blur';
import React, { ReactElement, ReactNode } from 'react';
import { Platform, StyleProp, StyleSheet, ViewStyle } from 'react-native';
import { View } from '../styles/components';

type BlurViewProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/BottomSheetScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
View,
} from 'react-native';

import { BodyM, Display } from '../styles/text';
import BottomSheetNavigationHeader from '../components/BottomSheetNavigationHeader';
import SafeAreaInset from '../components/SafeAreaInset';
import { BodyM, Display } from '../styles/text';
import Button from './buttons/Button';

const BottomSheetScreen = ({
Expand Down
18 changes: 9 additions & 9 deletions src/components/BottomSheetWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
* getStore().user.viewController['viewName'].isOpen;
***********************************************************************************/

import BottomSheet, {
BottomSheetView,
BottomSheetBackdrop,
BottomSheetBackgroundProps,
BottomSheetBackdropProps,
} from '@gorhom/bottom-sheet';
import React, {
memo,
ReactElement,
Expand All @@ -31,20 +37,14 @@ import React, {
} from 'react';
import { StyleSheet } from 'react-native';
import { useReducedMotion } from 'react-native-reanimated';
import BottomSheet, {
BottomSheetView,
BottomSheetBackdrop,
BottomSheetBackgroundProps,
BottomSheetBackdropProps,
} from '@gorhom/bottom-sheet';
import { useTheme } from 'styled-components/native';

import { __E2E__ } from '../constants/env';
import { useAppDispatch, useAppSelector } from '../hooks/redux';
import { viewControllerSelector } from '../store/reselect/ui';
import { closeSheet } from '../store/slices/ui';
import { TViewController } from '../store/types/ui';
import { viewControllerSelector } from '../store/reselect/ui';
import { useAppDispatch, useAppSelector } from '../hooks/redux';
import BottomSheetBackground from './BottomSheetBackground';
import { __E2E__ } from '../constants/env';

export interface BottomSheetWrapperProps {
children: ReactElement;
Expand Down
8 changes: 4 additions & 4 deletions src/components/Camera.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { ReactElement, useState, useEffect } from 'react';
import { StyleSheet, Platform, View } from 'react-native';
import { useIsFocused } from '@react-navigation/native';
import { check, request, PERMISSIONS, RESULTS } from 'react-native-permissions';
import { Camera as CameraKit, CameraType } from 'react-native-camera-kit';
import React, { ReactElement, useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { Platform, StyleSheet, View } from 'react-native';
import { Camera as CameraKit, CameraType } from 'react-native-camera-kit';
import { PERMISSIONS, RESULTS, check, request } from 'react-native-permissions';

import CameraNoAuth from './CameraNoAuth';
import GradientView from './GradientView';
Expand Down
8 changes: 4 additions & 4 deletions src/components/CameraNoAuth.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { ReactElement } from 'react';
import { View, Linking, Platform, StyleSheet } from 'react-native';
import { Trans, useTranslation } from 'react-i18next';
import { Linking, Platform, StyleSheet, View } from 'react-native';

import { BodyM, BodyMB } from '../styles/text';
import { ExclamationIcon } from '../styles/icons';
import SafeAreaView from './SafeAreaView';
import NavigationHeader from './NavigationHeader';
import { BodyM, BodyMB } from '../styles/text';
import BottomSheetNavigationHeader from './BottomSheetNavigationHeader';
import NavigationHeader from './NavigationHeader';
import SafeAreaInset from './SafeAreaInset';
import SafeAreaView from './SafeAreaView';
import Button from './buttons/Button';

const CameraNoAuth = ({
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContactSmall.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { ReactElement, memo } from 'react';
import { StyleProp, StyleSheet, ViewStyle } from 'react-native';

import { useProfile } from '../hooks/slashtags';
import { TouchableHighlight, TouchableOpacity } from '../styles/components';
import { XIcon } from '../styles/icons';
import { BodySSB } from '../styles/text';
import { useProfile } from '../hooks/slashtags';
import ProfileImage from './ProfileImage';
import { XIcon } from '../styles/icons';

const ContactSmall = ({
url,
Expand Down
Loading
Loading