From 34cfd45a9bc863f1e6a18516e6de51f1c5080149 Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:37:41 +0200 Subject: [PATCH 1/6] tests: update jest testMatch key & refactor existing tests --- jest.config.js | 5 +- jest/setup.js | 100 ++++++++++++------ src/constants/allToken.ts | 6 ++ .../__tests__/wrap-native-address.spec.ts | 21 ++-- .../utils/__tests__/helpers.test.ts | 2 +- .../getTokenNameFromDatabase.test.ts | 16 +-- 6 files changed, 91 insertions(+), 59 deletions(-) diff --git a/jest.config.js b/jest.config.js index 5845cbfcb..5c66ef4c0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,13 +6,14 @@ module.exports = { preset: 'jest-expo', transform: { - '\\.tsx?$': '/node_modules/babel-jest', - '\\.jsx?$': '/node_modules/babel-jest' + '\\.ts?$': '/node_modules/babel-jest', + '\\.js?$': '/node_modules/babel-jest' }, moduleNameMapper: { '^@features/(.*)$': '/src/features/$1', '^@constants/(.*)$': '/src/constants/$1' }, + testMatch: ['**/?(*.)+(spec|test).ts'], setupFiles: ['/jest/setup.js'], transformIgnorePatterns: [ 'node_modules/(?!(@neverdull-agency/expo-unlimited-secure-store|node_modules))(?!victory-native)/|node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)' diff --git a/jest/setup.js b/jest/setup.js index f18df20cc..76417e77c 100644 --- a/jest/setup.js +++ b/jest/setup.js @@ -1,6 +1,8 @@ import 'react-native-gesture-handler/jestSetup'; import mockSafeAreaContext from 'react-native-safe-area-context/jest/mock'; +const ETH_ADDRESS = '0x0000000000000000000000000000000000000000'; + const mockIsPackageInstalled = jest.fn((value) => ({ value, isInstalled: true @@ -20,6 +22,7 @@ jest.mock('@react-navigation/native', () => { }); jest.mock('react-native-reanimated', () => { + // eslint-disable-next-line @typescript-eslint/no-var-requires const Reanimated = require('react-native-reanimated/mock'); const ReanimatedLayoutAnimation = { stiffness: jest.fn(() => ReanimatedLayoutAnimation), @@ -38,6 +41,7 @@ jest.mock('react-native-reanimated', () => { Reanimated.Layout = ReanimatedLayoutAnimation; Reanimated.FadeInRight = ReanimatedLayoutAnimation; + // eslint-disable-next-line @typescript-eslint/no-empty-function Reanimated.default.call = () => {}; Reanimated.__reanimatedWorkletInit = jest.fn(); return Reanimated; @@ -45,15 +49,6 @@ jest.mock('react-native-reanimated', () => { jest.mock('react-native-safe-area-context', () => mockSafeAreaContext); -// () => { -// const inset = { top: 0, right: 0, bottom: 0, left: 0 }; -// return { -// SafeAreaProvider: jest.fn().mockImplementation(({ children }) => children), -// SafeAreaView: jest.fn().mockImplementation(({ children }) => children), -// useSafeAreaInsets: jest.fn().mockImplementation(() => inset) -// }; -// }); - jest.mock('@utils/createContextSelector', () => ({ createContextSelector: () => [{}, jest.fn()] })); @@ -123,36 +118,73 @@ jest.mock('@shopify/react-native-skia', () => ({ })); jest.mock('ethers', () => { - class MockContract { - constructor(address, abi, signerOrProvider) { - this.address = address; - this.abi = abi; - this.signerOrProvider = signerOrProvider; - } - } + const MockContract = jest.fn().mockImplementation(() => { + return { + address: ETH_ADDRESS, + abi: [], + getSigner: jest.fn().mockReturnValue({}), + call: jest.fn().mockResolvedValue(true) + }; + }); - class MockWallet { - constructor(privateKey, provider) { - this.privateKey = privateKey; - this.provider = provider; - } - } + const MockWallet = jest.fn().mockImplementation((privateKey, provider) => { + return { + privateKey, + provider, + connect: jest.fn().mockReturnValue({ + getAddress: jest.fn().mockResolvedValue(ETH_ADDRESS) + }) + }; + }); - class MockJsonRpcProvider { - constructor(url) { - this.url = url; - } + const MockJsonRpcProvider = jest.fn().mockImplementation((url) => { + return { + url, + getBlockNumber: jest.fn().mockResolvedValue(12345), + getNetwork: jest.fn().mockResolvedValue({ chainId: 1 }), // Mock network + getGasPrice: jest.fn().mockResolvedValue('10000000000'), + sendTransaction: jest.fn().mockResolvedValue('0xTransactionHash') + }; + }); - async getBlockNumber() { - return 12345; - } - } + const MockStaticJsonRpcProvider = jest.fn().mockImplementation((url) => { + return { + url, + getBlockNumber: jest.fn().mockResolvedValue(12345), + getGasPrice: jest.fn().mockResolvedValue('10000000000') + }; + }); + + const MockWeb3Provider = jest.fn().mockImplementation((provider) => { + return { + provider, + getSigner: jest.fn().mockReturnValue({ + getAddress: jest.fn().mockResolvedValue(ETH_ADDRESS) + }), + getNetwork: jest.fn().mockResolvedValue({ chainId: 1 }), + getBlockNumber: jest.fn().mockResolvedValue(12345) + }; + }); return { - Contract: MockContract, - Wallet: MockWallet, - providers: { - JsonRpcProvider: MockJsonRpcProvider + __esModule: true, + ethers: { + providers: { + Provider: jest.fn(), + JsonRpcProvider: MockJsonRpcProvider, + StaticJsonRpcProvider: MockStaticJsonRpcProvider, + Web3Provider: MockWeb3Provider + }, + lib: { + utils: { + isAddress: jest.fn() + } + }, + constants: { + AddressZero: ETH_ADDRESS + }, + Contract: MockContract, + Wallet: MockWallet } }; }); diff --git a/src/constants/allToken.ts b/src/constants/allToken.ts index 9ef5cc9a7..22ce7e66f 100644 --- a/src/constants/allToken.ts +++ b/src/constants/allToken.ts @@ -364,6 +364,12 @@ export const ALL_TOKENS_DATA: AllTokenDataModel = { } ], TESTNET: [ + { + address: ethers.constants.AddressZero, + decimals: 0, + name: 'AirDAO', + symbol: 'AMB' + }, { address: '0x2Cf845b49e1c4E5D657fbBF36E97B7B5B7B7b74b', decimals: 18, diff --git a/src/features/swap/utils/__tests__/wrap-native-address.spec.ts b/src/features/swap/utils/__tests__/wrap-native-address.spec.ts index d14dde5a4..101539003 100644 --- a/src/features/swap/utils/__tests__/wrap-native-address.spec.ts +++ b/src/features/swap/utils/__tests__/wrap-native-address.spec.ts @@ -1,11 +1,15 @@ +import { ethers } from 'ethers'; import { isNativeWrapped, wrapNativeAddress } from '../wrap-native-address'; +import { environment } from '@utils/environment'; + +const isTestnet = environment === 'testnet'; describe('wrapNativeAddress utility | Unit Test', () => { it('should wrap AMB to SAMB correctly', () => { const path = [ - '0xd78AB887A33EaC829B0DDE8714f79276E1255028', + ethers.constants.AddressZero, '0x765e3e03f8dfca312efdab378e386e1ea60ee93f' - ] as [string, string]; + ]; const expectedPath = [ '0x2Cf845b49e1c4E5D657fbBF36E97B7B5B7B7b74b', @@ -21,7 +25,7 @@ describe('wrapNativeAddress utility | Unit Test', () => { const path = [ '0xd78AB887A33EaC829B0DDE8714f79276E1255028', '0x765e3e03f8dfca312efdab378e386e1ea60ee93f' - ] as [string, string]; + ]; const expectedPath = [ '0xd78AB887A33EaC829B0DDE8714f79276E1255028', @@ -30,16 +34,17 @@ describe('wrapNativeAddress utility | Unit Test', () => { const excludeNativeETH = wrapNativeAddress(path); - expect(excludeNativeETH).not.toStrictEqual(expectedPath); + expect(excludeNativeETH).toStrictEqual(expectedPath); }); }); describe('isNativeWrapped utility | Unit Test', () => { it('should return true when native address is wrapped', () => { - const path = [ - '0xd78AB887A33EaC829B0DDE8714f79276E1255028', - '0x2Cf845b49e1c4E5D657fbBF36E97B7B5B7B7b74b' - ] as [string, string]; + const secondRoute = isTestnet + ? '0x2Cf845b49e1c4E5D657fbBF36E97B7B5B7B7b74b' + : '0x2b2d892C3fe2b4113dd7aC0D2c1882AF202FB28F'; + + const path = [ethers.constants.AddressZero, secondRoute]; const excludeNativeETH = wrapNativeAddress(path); const isSelectedSameTokens = isNativeWrapped(excludeNativeETH); diff --git a/src/features/wallet-connect/utils/__tests__/helpers.test.ts b/src/features/wallet-connect/utils/__tests__/helpers.test.ts index fcde3265f..5ce2782a1 100644 --- a/src/features/wallet-connect/utils/__tests__/helpers.test.ts +++ b/src/features/wallet-connect/utils/__tests__/helpers.test.ts @@ -26,7 +26,7 @@ describe('Supported Chains Utility', () => { expect(supportedChains(airdaoRequiredNamespaces, {})).toStrictEqual([ Config.env === 'testnet' ? { - id: 16718, + id: 22040, network: 'homestead', name: 'AirDAO', nativeCurrency: { name: 'AirDAO', symbol: 'AMB', decimals: 18 }, diff --git a/src/utils/__tests__/getTokenNameFromDatabase.test.ts b/src/utils/__tests__/getTokenNameFromDatabase.test.ts index f8ac9b367..748306e42 100644 --- a/src/utils/__tests__/getTokenNameFromDatabase.test.ts +++ b/src/utils/__tests__/getTokenNameFromDatabase.test.ts @@ -3,26 +3,14 @@ import { getTokenNameFromDatabase } from '@utils/getTokenNameFromDatabase'; const NATIVE_TOKEN_NAME = 'AirDAO'; -jest.mock('ethers', () => ({ - ethers: { - constants: { - AddressZero: '0x0000000000000000000000000000000000000000' - } - } -})); - describe('getTokenNameFromDatabase hook unit test', () => { it('should return the correct token name for a valid address', () => { - const address = ethers.constants.AddressZero; - - const tokenName = getTokenNameFromDatabase(address); + const tokenName = getTokenNameFromDatabase(ethers.constants.AddressZero); expect(tokenName).toBe(NATIVE_TOKEN_NAME); }); it('should return "unknown" for an invalid address', () => { - const address = 'invalid_address'; - - const tokenName = getTokenNameFromDatabase(address); + const tokenName = getTokenNameFromDatabase('invalid_address'); expect(tokenName).toBe('unknown'); }); }); From ef270705ef0f540bb193c68601d812b36a002ea9 Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:25:08 +0200 Subject: [PATCH 2/6] tests: remove extra mocks --- src/utils/__tests__/tokens.test.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/utils/__tests__/tokens.test.ts b/src/utils/__tests__/tokens.test.ts index 66425e076..48da9df64 100644 --- a/src/utils/__tests__/tokens.test.ts +++ b/src/utils/__tests__/tokens.test.ts @@ -15,14 +15,6 @@ const MockWithNameWithDB = { tokenNameFromDatabase: 'Astra' }; -jest.mock('ethers', () => ({ - ethers: { - constants: { - AddressZero: '0x0000000000000000000000000000000000000000' - } - } -})); - describe('tokens util test', () => { it('wrap token icon with token name from db', () => { const key = wrapTokenIcon(MockWithNameWithDB); From aa7db17e19e01aa80cc57bd5a97f1e9bbbc25adc Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:05:09 +0200 Subject: [PATCH 3/6] chore: reduce utils imports --- Providers.tsx | 2 +- .../BottomSheetStatusView/error/index.tsx | 3 +- .../base/BottomSheetStatusView/styles.ts | 2 +- .../BottomSheetStatusView/success/index.tsx | 3 +- src/components/base/FloatButton/index.tsx | 3 +- src/components/base/Input/Input.number.tsx | 2 +- src/components/base/Input/Input.text.tsx | 2 +- src/components/base/Spinner/index.tsx | 2 +- .../composite/BottomAwareSafeAreaView.tsx | 2 +- .../BottomSheet/BottomSheet.constants.ts | 2 +- .../BottomSheet/BottomSheet.styles.ts | 2 +- .../composite/Button/CopyToClipboard.tsx | 2 +- .../composite/CheckBox/CheckBox.circular.tsx | 2 +- .../composite/CheckBox/CheckBox.square.tsx | 2 +- src/components/composite/DatePicker/index.tsx | 2 +- .../composite/Header/Header.styles.ts | 2 +- .../composite/InputWithIcon/index.tsx | 2 +- .../composite/InputWithIcon/styles.ts | 2 +- .../composite/PasscodeKeyboard/index.tsx | 6 +-- src/components/composite/PercentChange.tsx | 2 +- .../composite/PercentageBox/styles.ts | 2 +- src/components/composite/PopUpInfo/index.tsx | 2 +- src/components/composite/PopUpInfo/styles.ts | 5 +-- .../composite/SegmentedPicker/styles.ts | 2 +- .../composite/TextOrSpinner/index.tsx | 2 +- src/components/modular/AnimatedTabs/index.tsx | 4 +- src/components/modular/AnimatedTabs/styles.ts | 4 +- .../modular/AnimatedTabsV2/index.tsx | 4 +- .../modular/AnimatedTabsV2/styles.ts | 4 +- src/components/modular/BalanceRow/index.tsx | 3 +- .../modular/BottomSheetFloat/styles.ts | 2 +- src/components/modular/Button/Gradient.tsx | 2 +- src/components/modular/Button/Secondary.tsx | 4 +- .../modular/CollectionItem/index.tsx | 2 +- src/components/modular/Passcode/index.tsx | 8 ++-- src/components/modular/Passcode/styles.ts | 2 +- .../modular/PrivateKeyMaskedInput/index.tsx | 3 +- .../modular/QRCodeWithLogo/styles.ts | 2 +- src/components/modular/SingleAsset/index.tsx | 5 +-- src/components/modular/SingleAsset/styles.ts | 2 +- .../modular/SingleAssetNFT/index.tsx | 3 +- .../modular/SingleAssetNFT/styles.ts | 2 +- src/components/modular/StakingPool/index.tsx | 4 +- src/components/modular/Toast/Toast.body.tsx | 2 +- src/components/modular/Toast/Toast.styles.ts | 2 +- .../modular/Toast/Toast.wrapper.tsx | 2 +- src/components/modular/TokenLogo/index.tsx | 2 +- .../modular/TokenSelector/index.tsx | 3 +- .../modular/TransactionItem/index.tsx | 4 +- .../modular/TransactionItem/styles.ts | 4 +- src/components/modular/WalletCard/index.tsx | 4 +- src/components/modular/WalletCard/styles.ts | 2 +- src/components/styles/index.ts | 2 +- src/components/svg/icons/CheckIconCircle.tsx | 4 +- src/components/svg/icons/Close.tsx | 4 +- src/components/svg/icons/History.tsx | 4 +- src/components/svg/icons/MediumIcon.tsx | 2 +- .../svg/icons/TelegramSettingsIcon.tsx | 2 +- src/components/svg/icons/XTwitterIcon.tsx | 2 +- .../products-active.tsx | 2 +- src/components/svg/icons/v2/index.ts | 2 + .../svg/icons/v2/settings/AboutIcon.tsx | 2 +- .../svg/icons/v2/settings/CompassIcon.tsx | 2 +- .../svg/icons/v2/settings/CopyIconV2.tsx | 2 +- .../svg/icons/v2/settings/DownloadIcon.tsx | 2 +- .../svg/icons/v2/settings/KeyIcon.tsx | 2 +- .../icons/v2/settings/NotificationIcon.tsx | 2 +- .../svg/icons/v2/settings/Preferences.tsx | 2 +- .../svg/icons/v2/settings/SecurityIcon.tsx | 2 +- .../svg/icons/v2/settings/WalletIcon.tsx | 2 +- .../templates/AMBPriceHistory/index.tsx | 2 +- .../templates/AMBPriceHistory/styles.ts | 4 +- .../components/ActionButton.tsx | 2 +- .../AccountActions/components/Receive.tsx | 4 +- .../templates/AccountActions/index.tsx | 2 +- .../AccountList/AccountList.paginated.tsx | 2 +- .../templates/AddWalletToList/index.tsx | 3 +- .../templates/AddWalletToList/styles.ts | 4 +- .../templates/AddressIndicator/index.tsx | 2 +- .../templates/AddressIndicator/styles.ts | 4 +- .../templates/AddressList/index.tsx | 2 +- .../templates/AddressList/styles.ts | 2 +- .../components/ScanSquare/styles.ts | 2 +- .../templates/BarcodeScanner/styles.ts | 4 +- .../templates/BezierChart/SelectionDot.tsx | 2 +- .../templates/BezierChart/index.tsx | 4 +- .../BottomSheetAddWalletToList/index.tsx | 2 +- .../index.tsx | 4 +- .../BottomSheetCreateRenameGroup/index.tsx | 7 ++-- .../BottomSheetCreateRenameGroup/styles.ts | 2 +- .../BottomSheetEditCollection/index.tsx | 3 +- .../BottomSheetEditCollection/styles.ts | 4 +- .../templates/BottomSheetEditWallet/styles.ts | 4 +- .../index.tsx | 2 +- .../styles.ts | 2 +- .../index.tsx | 4 +- .../styles.ts | 2 +- .../BottomSheetSharePortfolio/index.tsx | 3 +- .../BottomSheetSharePortfolio/styles.ts | 3 +- .../BottomSheetViewAccessKey.tsx | 3 +- .../BottomSheetViewAccessKey/styles.ts | 2 +- .../BottomSheetWalletCreateOrImport/index.tsx | 4 +- .../styles.tsx | 2 +- .../templates/BridgeSelectorItem/index.tsx | 2 +- .../templates/BridgeSelectorItem/styles.tsx | 2 +- .../templates/DropDownPanel/index.tsx | 2 +- .../templates/DropDownPanel/styles.tsx | 2 +- .../ExplorerAccount.Transactions.tsx | 2 +- .../address-row-with-action/index.tsx | 2 +- .../ExplorerAccount.TransactionItem.tsx | 2 +- .../templates/ExplorerAccount/index.tsx | 4 +- .../templates/ExplorerAccount/styles.ts | 2 +- .../BottomSheetTokensList/styles.ts | 2 +- .../templates/InputWithTokenSelect/index.tsx | 4 +- .../templates/InputWithTokenSelect/styles.ts | 2 +- .../InputWithoutTokenSelect/index.tsx | 5 +-- .../InputWithoutTokenSelect/styles.tsx | 2 +- .../templates/LocalizedRenderEmpty/index.tsx | 2 +- .../templates/LocalizedRenderEmpty/styles.ts | 2 +- .../templates/NotificationSettings/index.tsx | 2 +- .../templates/NotificationSettings/styles.ts | 2 +- .../templates/PortfolioPerformance/index.tsx | 3 +- .../templates/PortfolioPerformance/styles.ts | 2 +- .../templates/ReceiveFunds/index.tsx | 3 +- .../templates/ReceiveFunds/styles.ts | 2 +- .../templates/RenderEmpty/index.tsx | 2 +- .../templates/RenderEmpty/styles.ts | 2 +- .../SearchAddress/SearchAddress.NoMatch.tsx | 2 +- .../templates/SearchAddress/index.tsx | 15 +------- .../templates/SearchAddress/styles.ts | 2 +- .../templates/TokenPicker/index.tsx | 2 +- .../templates/TransactionDetails/index.tsx | 2 +- .../templates/TransactionDetails/styles.ts | 2 +- .../templates/WalletDepositFunds/styles.ts | 2 +- src/components/templates/WalletItem/index.tsx | 4 +- .../templates/WalletNoNFTsView/styles.ts | 2 +- .../WalletPicker/WalletPicker.item.tsx | 4 +- .../templates/WalletPicker/index.tsx | 2 +- .../NftAssets/styles.ts | 2 +- .../WalletAssets/index.tsx | 2 +- .../WalletAssets/styles.ts | 2 +- .../WalletTransactionsAndAssets/styles.ts | 2 +- src/constants/shadow.ts | 2 +- src/contexts/Localizations/index.tsx | 3 +- .../Navigation/Navigation.context.tsx | 2 +- src/entities/harbor/constants/index.ts | 2 +- src/entities/harbor/utils/getHarborToken.ts | 2 +- src/entities/kosmos/utils/chart.preset.ts | 2 +- .../lib/hooks/use-list-notifications.ts | 2 +- .../bridge/context/Bridge.Context.tsx | 2 +- .../hooks/useBridgeTransactionStatus.ts | 2 +- .../index.tsx | 2 +- .../BottomSheetBridgePreview.tsx | 2 +- .../GeneralPreviewTemplate.tsx | 3 +- .../PreviewDataTemplate.tsx | 2 +- .../components/PreviewDataItem.tsx | 3 +- .../BottomSheetBridgeTransactionHistory.tsx | 11 ++++-- .../styles.ts | 2 +- ...omSheetBridgeTransactionPendingHistory.tsx | 2 +- .../BridgeTransactionPendingTemplate.tsx | 2 +- .../styles.ts | 2 +- .../templates/BridgeForm/BridgeForm.tsx | 4 +- .../TokenSelectData/TokenSelectData.tsx | 4 +- .../bridge/templates/BridgeForm/styles.ts | 2 +- .../BridgeHistory.Transactions.tsx | 2 +- .../bridge/templates/BridgeHistory/styles.ts | 3 +- .../BridgeNetwork.Picker.tsx | 2 +- .../BridgeNetworkSelectors/styles.ts | 2 +- .../BridgeNetworksSelected.tsx | 2 +- .../BridgeNetworksSelected/styles.ts | 2 +- .../bridge/templates/BridgeTemplate.tsx | 2 +- .../components/Status/Status.styles.tsx | 2 +- .../templates/BridgeTransaction/index.tsx | 11 ++++-- src/features/bridge/templates/styles.ts | 2 +- .../preview-modules/error-template/index.tsx | 2 +- .../preview-modules/error-template/styles.ts | 2 +- .../preview-modules/form-template/index.tsx | 2 +- .../preview-modules/form-template/styles.tsx | 2 +- .../success-template/copy-hash/index.tsx | 3 +- .../success-template/index.tsx | 3 +- .../success-template/styes.tsx | 2 +- .../success-template/success-title/index.tsx | 2 +- .../base/stake-info-container/index.tsx | 3 +- .../base/stake-info-container/styles.ts | 2 +- .../components/base/tier-info-item/index.tsx | 2 +- .../components/base/tier-item/index.tsx | 2 +- .../components/base/tier-item/styles.tsx | 2 +- .../base/tiers-info-container/index.tsx | 2 +- .../components/base/tiers-selector/index.tsx | 3 +- .../components/base/tiers-selector/styles.tsx | 2 +- .../components/base/token-reward/index.tsx | 2 +- .../components/base/token-reward/styles.tsx | 2 +- .../components/base/withdraw-info/index.tsx | 2 +- .../components/base/withdraw-info/styles.tsx | 2 +- .../components/harbor-preview/index.tsx | 3 +- .../components/harbor-preview/styles.tsx | 2 +- .../components/tabs/stake-amb-tab/index.tsx | 2 +- .../components/tabs/stake-amb-tab/styles.ts | 2 +- .../tabs/withdraw-reward-only-tab/index.tsx | 2 +- .../tabs/withdraw-reward-only-tab/styles.ts | 2 +- .../tabs/withdraw-stake-reward-tab/index.tsx | 2 +- .../tabs/withdraw-stake-reward-tab/styles.ts | 2 +- .../harbor/hooks/calculateClaimAmount.ts | 2 +- .../hooks/parseDataHelpers/parseStakeData.ts | 3 +- .../parseDataHelpers/parseWithdrawReward.ts | 2 +- .../parseWithdrawStakePreview.ts | 2 +- .../hooks/processHelpers/resultHandler.ts | 2 +- .../base/chart-interval-item/index.tsx | 2 +- .../components/base/filters-item/styles.ts | 2 +- .../base/list-cell-headings/index.tsx | 2 +- .../base/market-list-item/index.tsx | 5 +-- .../base/market-list-item/styles.ts | 2 +- .../base/order-card-details/styles.ts | 2 +- .../base/transaction-history-item/styles.ts | 2 +- .../base/wrapped-lists-container/styles.ts | 2 +- .../buy-bond-input-with-error/index.tsx | 4 +- .../composite/chart-time-intervals/styles.ts | 2 +- .../claimable-order-card-details/styles.ts | 4 +- .../composite/market-table-details/index.tsx | 3 +- .../composite/market-table-details/styles.ts | 2 +- .../composite/total-orders-amount/styles.ts | 2 +- .../components/modular/balance/index.tsx | 4 +- .../modular/buy-bond-button/styles.ts | 2 +- .../modular/filters-selector/styles.ts | 2 +- .../review-bond-purchase-button/styles.ts | 2 +- .../modular/user-orders-list/styles.ts | 2 +- .../templates/bottom-sheet-filters/index.tsx | 4 +- .../templates/bottom-sheet-filters/styles.ts | 2 +- .../bottom-sheet-preview-purchase/index.tsx | 3 +- .../bottom-sheet-preview-purchase/styles.ts | 2 +- .../bottom-sheet-review-order/index.tsx | 4 +- .../bottom-sheet-review-order/styles.ts | 2 +- .../exact-market-token-tabs/styles.ts | 2 +- .../tabs/buy-bond/index.tsx | 4 +- .../tabs/buy-bond/styles.ts | 2 +- .../tabs/transactions/index.tsx | 14 +++---- .../tabs/transactions/styles.ts | 2 +- .../market-chart-with-timeframes/index.tsx | 3 +- .../market-chart-with-timeframes/styles.ts | 2 +- .../kosmos/lib/hooks/use-market-details.ts | 2 +- .../lib/hooks/use-passcode-actions.ts | 3 +- .../passcode/lib/hooks/use-passcode-init.ts | 2 +- .../passcode/utils/authenticate-popup.ts | 2 +- .../base/product-list-item/styles.ts | 2 +- .../templates/products-list/index.tsx | 2 +- .../templates/products-list/styles.ts | 2 +- .../base/tokens-list-item/index.tsx | 13 ++++--- .../base/tokens-list-item/styles.ts | 2 +- .../composite/tokens-list/styles.ts | 2 +- .../index.tsx | 2 +- .../styles.ts | 2 +- .../components/templates/header/index.tsx | 2 +- .../send-funds/lib/hooks/use-amb-entity.ts | 2 +- .../lib/hooks/use-amount-change-handler.ts | 3 +- .../bottom-sheet-review-token-item/index.tsx | 3 +- .../base/settings-input-with-label/styles.ts | 2 +- .../base/swap-buttons-list/styles.ts | 2 +- .../base/swap-buttons-list/swap/index.tsx | 2 +- .../components/composite/balance/index.tsx | 3 +- .../composite/preview-information/styles.ts | 2 +- .../styles.ts | 2 +- .../composite/swap-reverse-tokens/index.tsx | 2 +- .../composite/token-selector/index.tsx | 2 +- .../modular/bottom-sheet-token-item/index.tsx | 2 +- .../modular/bottom-sheet-token-item/styles.ts | 2 +- .../modular/input-with-token-select/index.tsx | 3 +- .../modular/input-with-token-select/styles.ts | 2 +- .../modular/review-swap-button/index.tsx | 2 +- .../modular/submit-swap-actions/styles.ts | 2 +- .../modular/token-info-plate/index.tsx | 2 +- .../components/error/index.tsx | 4 +- .../components/error/styles.ts | 2 +- .../components/render.tsx | 2 +- .../components/success/index.tsx | 4 +- .../components/success/styles.ts | 2 +- .../bottom-sheet-preview-swap/index.tsx | 3 +- .../bottom-sheet-preview-swap/styles.ts | 2 +- .../bottom-sheet-tokens-list/index.tsx | 2 +- .../bottom-sheet-tokens-list/styles.ts | 2 +- .../components/templates/swap-form/index.tsx | 3 +- .../components/templates/swap-form/styles.ts | 3 +- src/features/swap/context/swap.context.tsx | 2 +- .../lib/hooks/use-swap-better-currency.ts | 2 +- .../swap/lib/hooks/use-swap-settings.ts | 3 +- .../__tests__/wrap-native-address.spec.ts | 2 +- .../base/account-action-item/styles.ts | 2 +- .../assets-account-actions-list/styles.ts | 2 +- .../components/templates/header/index.tsx | 4 +- .../components/templates/header/styles.ts | 2 +- .../composite/wallet-approval-view/index.tsx | 2 +- .../composite/wallet-approval-view/styles.ts | 2 +- .../wallet-connection-failed-view/styles.ts | 2 +- .../styles.ts | 2 +- .../composite/wallet-sessions-list/index.tsx | 2 +- .../templates/wallet-connect-modal/styles.ts | 2 +- .../wallet-session-bottom-sheet/index.tsx | 2 +- .../wallet-session-bottom-sheet/styles.ts | 2 +- .../context/wallet-connect.context.ts | 2 +- .../hooks/use-wallet-kit-events-manager.ts | 2 +- src/hooks/cache/useWatchlist.ts | 2 +- src/hooks/query/useAmbrosusStakingPools.ts | 2 +- src/hooks/query/useEstimatedTransferFee.ts | 2 +- src/hooks/query/useTokensAndTransactions.ts | 2 +- src/hooks/query/useTransactionDetails.ts | 2 +- src/hooks/query/useTransactionsOfAddress.ts | 2 +- src/hooks/query/useTransactionsOfToken.ts | 2 +- src/hooks/useSettingsWalletActions.ts | 2 +- src/lib/crypto/AirDAOKeys.ts | 5 ++- src/models/Token.ts | 2 +- src/navigation/components/TabBar/index.tsx | 4 +- src/navigation/components/TabBar/styles.ts | 2 +- src/navigation/stacks/AppInit.tsx | 2 +- src/navigation/stacks/TabsNavigator.tsx | 2 +- src/screens/AMBMarket/components/About.tsx | 2 +- .../AMBMarket/components/DetailedInfo.tsx | 2 +- src/screens/AMBMarket/components/Market.tsx | 2 +- .../AMBMarket/components/PriceInfo.tsx | 2 +- src/screens/AMBMarket/index.tsx | 3 +- src/screens/AMBMarket/styles.ts | 2 +- src/screens/Address/index.tsx | 4 +- src/screens/Address/styles.ts | 2 +- src/screens/Asset/index.tsx | 11 ++++-- src/screens/Asset/styles.ts | 2 +- src/screens/Bridge/Bridge.tsx | 3 +- .../BridgeTransferError.styles.tsx | 2 +- .../BridgeTransferError.tsx | 2 +- .../CreateWalletStep0/Step0.styles.tsx | 2 +- .../screens/CreateWalletStep0/index.tsx | 2 +- .../screens/CreateWalletStep1/Step1.styles.ts | 2 +- .../screens/CreateWalletStep1/index.tsx | 3 +- .../CreateWalletStep2/MnemonicRandom.tsx | 2 +- .../CreateWalletStep2/MnemonicSelected.tsx | 2 +- .../CreateWalletStep2/Step2.styles.tsx | 2 +- .../screens/CreateWalletStep2/index.tsx | 3 +- src/screens/CreateWallet/styles.ts | 2 +- .../Harbor/ProcessStake/ProcessStake.tsx | 5 +-- .../components/HarborTitle/index.tsx | 2 +- .../components/RateInfo/RateInfo.tsx | 3 +- .../components/RateInfo/styles.tsx | 2 +- .../StakedBalanceInfo/StakedBalanceInfo.tsx | 3 +- .../components/StakedBalanceInfo/styles.tsx | 2 +- .../StakedHeaderIcon/StakeHeaderIcon.tsx | 2 +- .../components/StakedHeaderIcon/styles.tsx | 2 +- src/screens/Harbor/ProcessStake/styles.tsx | 2 +- .../WithdrawHarborScreen.tsx | 3 +- .../WithdrawRequests.style.tsx | 2 +- .../WithdrawRequests/WithdrawRequests.tsx | 3 +- src/screens/ImportWalletMethods/index.tsx | 2 +- .../screens/ImportWallet/ImportWallet.tsx | 11 ++++-- .../component/RenderWord/index.tsx | 2 +- .../component/RenderWord/style.tsx | 2 +- .../screens/ImportWallet/styles.ts | 2 +- .../PrivateKey/ImportWallet.PrivateKey.tsx | 13 ++++--- .../screens/PrivateKey/styles.ts | 3 +- src/screens/ImportWalletMethods/styles.ts | 2 +- .../Kosmos/screens/KosmosMarket/index.tsx | 3 +- src/screens/Kosmos/styles.ts | 2 +- src/screens/NoWallet/index.tsx | 2 +- src/screens/NoWallet/styles.ts | 2 +- .../Notifications/components/Header.tsx | 2 +- .../components/notification-box/index.tsx | 3 +- .../components/notification-box/styles.ts | 2 +- src/screens/Notifications/index.tsx | 3 +- src/screens/Notifications/styles.ts | 2 +- src/screens/PasscodeEntry/index.tsx | 4 +- .../components/address-input/index.tsx | 4 +- .../components/address-input/styles.ts | 2 +- .../SendFunds/components/confirm-tx/index.tsx | 10 +++-- .../SendFunds/components/confirm-tx/styles.ts | 2 +- .../components/estimated-fee/index.tsx | 2 +- .../components/show-usd-currency/index.tsx | 3 +- .../components/use-max-button/index.tsx | 2 +- src/screens/SendFunds/index.tsx | 10 +++-- src/screens/SendFunds/styles.ts | 2 +- src/screens/Settings/Settings.tsx | 2 +- src/screens/Settings/screens/About/index.tsx | 3 +- src/screens/Settings/screens/About/styles.ts | 2 +- .../tabs/Mnemonic/AccessKeys.Mnemonic.tsx | 2 +- .../AccessKeys/tabs/Mnemonic/styles.ts | 2 +- .../tabs/Private/AccessKeys.Private.tsx | 2 +- .../screens/AccessKeys/tabs/Private/styles.ts | 2 +- .../components/PrefrencesMenuItem.tsx | 2 +- .../components/SettingsModalItem.tsx | 2 +- .../modals/BottomSheetBaseCurrency/index.tsx | 2 +- .../BottomSheetSelectLanguage/index.tsx | 3 +- .../AppPreferences/components/modals/style.ts | 2 +- .../Settings/screens/AppPreferences/index.tsx | 5 +-- .../Settings/screens/AppPreferences/styles.ts | 2 +- .../Settings/screens/ChangePasscode/index.tsx | 2 +- .../screens/ChangePasscode/styles.tsx | 2 +- .../screens/Explore/components/WalletItem.tsx | 4 +- .../Settings/screens/Explore/index.tsx | 2 +- .../Settings/screens/Explore/styles.ts | 2 +- .../screens/ManageWallets/ManageWallets.tsx | 2 +- .../ManageWallets/components/AllWallets.tsx | 2 +- .../ManageWallets/components/Wallet.tsx | 3 +- .../screens/SecuritySettings/index.tsx | 2 +- .../screens/SingleWallet/SingleWallet.tsx | 2 +- .../Settings/screens/SingleWallet/styles.ts | 2 +- .../BottomSheetConfirmRemoveGroup/index.tsx | 3 +- .../BottomSheetConfirmRemoveGroup/styles.ts | 2 +- .../components/GroupItem/styles.ts | 2 +- .../components/ListsOfAddressGroup/index.tsx | 2 +- .../components/Collections/index.tsx | 2 +- .../components/Collections/styles.ts | 2 +- .../components/Watchlists/index.tsx | 2 +- .../components/Watchlists/styles.ts | 2 +- .../components/PortfolioScreenTabs/index.tsx | 2 +- .../components/PortfolioScreenTabs/styles.ts | 2 +- src/screens/Settings/styles.ts | 2 +- .../SetupPasscode/SetupPasscode.styles.tsx | 2 +- .../SetupPasscode/screens/ConfirmPasscode.tsx | 3 +- .../screens/SuccessSetupSecurity.tsx | 2 +- src/screens/SingleCollection/index.tsx | 4 +- .../BottomSheetAddNewAddressToGroup/index.tsx | 2 +- .../BottomSheetAddNewAddressToGroup/styles.ts | 2 +- .../modals/BottomSheetRenameAddress/index.tsx | 2 +- .../StakingPool/components/Pending/index.tsx | 2 +- .../components/Stake/Stake.Preview.tsx | 4 +- .../StakingPool/components/Stake/Stake.tsx | 4 +- .../StakingPool/components/StakingInfo.tsx | 3 +- .../Withdraw/BottomSheet/Withdraw.Preview.tsx | 4 +- .../components/Withdraw/BottomSheet/styles.ts | 2 +- .../components/Withdraw/Withdraw.tsx | 4 +- .../StakingPool/components/Withdraw/styles.ts | 2 +- src/screens/StakingPool/index.tsx | 3 +- .../StakingPool/screens/Stake.Error.tsx | 2 +- .../StakingPool/screens/Stake.Success.tsx | 2 +- src/screens/StakingPool/screens/styles.ts | 2 +- src/screens/StakingPool/style.ts | 2 +- src/screens/StakingPools/index.tsx | 2 +- src/screens/StakingPools/styles.ts | 2 +- .../Swap/screens/settings/settings.tsx | 2 +- src/screens/Swap/screens/settings/styles.ts | 2 +- src/screens/Swap/styles.ts | 2 +- src/screens/Wallets/index.tsx | 3 +- src/screens/Wallets/styles.ts | 2 +- ...test.ts => get-token-name-from-db.test.ts} | 2 +- src/utils/{ => __tests__}/numbers.test.tsx | 0 src/utils/{ => __tests__}/scaling.test.tsx | 0 src/utils/{ => __tests__}/share.test.tsx | 0 src/utils/{ => __tests__}/string.test.tsx | 0 ...mDatabase.ts => get-token-name-from-db.ts} | 0 src/utils/index.ts | 37 ++++++++++++++++++- src/utils/keys.ts | 4 +- src/utils/token.ts | 21 +++++++++++ src/utils/tokens.ts | 22 ----------- 447 files changed, 587 insertions(+), 661 deletions(-) rename src/utils/__tests__/{getTokenNameFromDatabase.test.ts => get-token-name-from-db.test.ts} (87%) rename src/utils/{ => __tests__}/numbers.test.tsx (100%) rename src/utils/{ => __tests__}/scaling.test.tsx (100%) rename src/utils/{ => __tests__}/share.test.tsx (100%) rename src/utils/{ => __tests__}/string.test.tsx (100%) rename src/utils/{getTokenNameFromDatabase.ts => get-token-name-from-db.ts} (100%) diff --git a/Providers.tsx b/Providers.tsx index 2f9cf5238..0b84445c6 100644 --- a/Providers.tsx +++ b/Providers.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { combineComponents } from '@utils/combineComponents'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { LocalizationProvider } from '@contexts'; @@ -10,6 +9,7 @@ import { BridgeContextProvider } from '@features/bridge/context'; import { SwapContextProvider } from '@features/swap/context'; import { WalletConnectContextProvider } from '@features/wallet-connect/context'; import Config from '@constants/config'; +import { combineComponents } from '@utils'; const queryClient = new QueryClient(); diff --git a/src/components/base/BottomSheetStatusView/error/index.tsx b/src/components/base/BottomSheetStatusView/error/index.tsx index 3ebda4cbb..190d0e096 100644 --- a/src/components/base/BottomSheetStatusView/error/index.tsx +++ b/src/components/base/BottomSheetStatusView/error/index.tsx @@ -8,8 +8,7 @@ import { Spacer } from '@components/base/Spacer'; import { PrimaryButton } from '@components/modular'; import { Text } from '@components/base/Text'; import { COLORS } from '@constants/colors'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale, cssShadowToNative } from '@utils'; interface BottomSheetSuccessViewProps extends PropsWithChildren { title?: string; diff --git a/src/components/base/BottomSheetStatusView/styles.ts b/src/components/base/BottomSheetStatusView/styles.ts index 5984d4230..306ee9508 100644 --- a/src/components/base/BottomSheetStatusView/styles.ts +++ b/src/components/base/BottomSheetStatusView/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/base/BottomSheetStatusView/success/index.tsx b/src/components/base/BottomSheetStatusView/success/index.tsx index ff879b888..ecf543f3f 100644 --- a/src/components/base/BottomSheetStatusView/success/index.tsx +++ b/src/components/base/BottomSheetStatusView/success/index.tsx @@ -7,8 +7,7 @@ import { Spacer } from '@components/base/Spacer'; import { PrimaryButton } from '@components/modular'; import { Text } from '@components/base/Text'; import { COLORS } from '@constants/colors'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; -import { verticalScale } from '@utils/scaling'; +import { cssShadowToNative, verticalScale } from '@utils'; import { SuccessIcon } from '@components/svg/icons/v2'; interface BottomSheetSuccessViewProps extends PropsWithChildren { diff --git a/src/components/base/FloatButton/index.tsx b/src/components/base/FloatButton/index.tsx index 2a7230f4a..e57217e33 100644 --- a/src/components/base/FloatButton/index.tsx +++ b/src/components/base/FloatButton/index.tsx @@ -3,9 +3,8 @@ import { Pressable, StyleSheet, TextStyle } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { COLORS } from '@constants/colors'; import { Spacer, Text } from '@components/base'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale, NavigationUtils } from '@utils'; import { useCurrentRoute } from '@contexts'; -import { NavigationUtils } from '@utils/navigation'; type Props = { title?: string; diff --git a/src/components/base/Input/Input.number.tsx b/src/components/base/Input/Input.number.tsx index 03da7980e..ca703c071 100644 --- a/src/components/base/Input/Input.number.tsx +++ b/src/components/base/Input/Input.number.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { InputProps, InputRef } from './Input.types'; import { TextInput } from './Input.text'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; +import { StringUtils } from '@utils'; export const NumberInput = React.forwardRef( (props, ref) => { diff --git a/src/components/base/Input/Input.text.tsx b/src/components/base/Input/Input.text.tsx index 7a8d538c0..136f2135f 100644 --- a/src/components/base/Input/Input.text.tsx +++ b/src/components/base/Input/Input.text.tsx @@ -1,7 +1,7 @@ import React, { useImperativeHandle, useRef, useState } from 'react'; import { TextInput as RNTextInput, StyleSheet } from 'react-native'; import { InputProps, InputRef } from './Input.types'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const TextInput = React.forwardRef( diff --git a/src/components/base/Spinner/index.tsx b/src/components/base/Spinner/index.tsx index aae9d67be..b1c1cc0c8 100644 --- a/src/components/base/Spinner/index.tsx +++ b/src/components/base/Spinner/index.tsx @@ -9,7 +9,7 @@ import Animated, { withTiming } from 'react-native-reanimated'; import { styles } from './styles'; -import { moderateScale } from '@utils/scaling'; +import { moderateScale } from '@utils'; export interface SpinnerProps { containerStyle?: ViewStyle; diff --git a/src/components/composite/BottomAwareSafeAreaView.tsx b/src/components/composite/BottomAwareSafeAreaView.tsx index 4767c56ba..2cf892183 100644 --- a/src/components/composite/BottomAwareSafeAreaView.tsx +++ b/src/components/composite/BottomAwareSafeAreaView.tsx @@ -1,7 +1,7 @@ -import { verticalScale } from '@utils/scaling'; import React from 'react'; import { View, ViewProps } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { verticalScale } from '@utils'; export const BottomAwareSafeAreaView = ( props: ViewProps & { paddingBottom?: number } diff --git a/src/components/composite/BottomSheet/BottomSheet.constants.ts b/src/components/composite/BottomSheet/BottomSheet.constants.ts index c46266b9d..b712d9d05 100644 --- a/src/components/composite/BottomSheet/BottomSheet.constants.ts +++ b/src/components/composite/BottomSheet/BottomSheet.constants.ts @@ -1,4 +1,4 @@ -import { moderateScale } from '@utils/scaling'; +import { moderateScale } from '@utils'; export const BottomSheetBorderRadius = moderateScale(32); export const BottomSheetAnimationDuration = 250; diff --git a/src/components/composite/BottomSheet/BottomSheet.styles.ts b/src/components/composite/BottomSheet/BottomSheet.styles.ts index 7b586e390..d1b22edae 100644 --- a/src/components/composite/BottomSheet/BottomSheet.styles.ts +++ b/src/components/composite/BottomSheet/BottomSheet.styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/composite/Button/CopyToClipboard.tsx b/src/components/composite/Button/CopyToClipboard.tsx index 6a9ffe576..0ae41592f 100644 --- a/src/components/composite/Button/CopyToClipboard.tsx +++ b/src/components/composite/Button/CopyToClipboard.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { TextProps } from '@components/base/Text/Text.types'; import { Button, Row, Spacer, Text } from '@components/base'; import { IconProps } from '@components/svg/icons'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { Toast, ToastOptions, diff --git a/src/components/composite/CheckBox/CheckBox.circular.tsx b/src/components/composite/CheckBox/CheckBox.circular.tsx index 0a95a6b25..bda38cabe 100644 --- a/src/components/composite/CheckBox/CheckBox.circular.tsx +++ b/src/components/composite/CheckBox/CheckBox.circular.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { View } from 'react-native'; import { CircularCheckBoxProps } from './CheckBox.types'; import { Button } from '@components/base'; -import { moderateScale } from '@utils/scaling'; +import { moderateScale } from '@utils'; import { COLORS } from '@constants/colors'; export const CheckBoxCircular = (props: CircularCheckBoxProps): JSX.Element => { diff --git a/src/components/composite/CheckBox/CheckBox.square.tsx b/src/components/composite/CheckBox/CheckBox.square.tsx index d5bf2ee76..fabe2ee12 100644 --- a/src/components/composite/CheckBox/CheckBox.square.tsx +++ b/src/components/composite/CheckBox/CheckBox.square.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { SquareCheckBoxProps } from './CheckBox.types'; import { Button } from '@components/base'; import { CheckIcon } from '@components/svg/icons'; -import { moderateScale, scale } from '@utils/scaling'; +import { moderateScale, scale } from '@utils'; import { COLORS } from '@constants/colors'; export const CheckBoxSquare = (props: SquareCheckBoxProps): JSX.Element => { diff --git a/src/components/composite/DatePicker/index.tsx b/src/components/composite/DatePicker/index.tsx index 6a633bf94..6d2c33b88 100644 --- a/src/components/composite/DatePicker/index.tsx +++ b/src/components/composite/DatePicker/index.tsx @@ -2,7 +2,7 @@ import React, { useCallback } from 'react'; import CalendarPicker from 'react-native-calendar-picker'; import { DatePickerProps } from './DatePicker.types'; import { Row, Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const DatePicker = (props: DatePickerProps): JSX.Element => { const { selectedStartDate, selectedEndDate, period } = props; diff --git a/src/components/composite/Header/Header.styles.ts b/src/components/composite/Header/Header.styles.ts index b9b032234..96d658f07 100644 --- a/src/components/composite/Header/Header.styles.ts +++ b/src/components/composite/Header/Header.styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; const leftPadding = '5%'; diff --git a/src/components/composite/InputWithIcon/index.tsx b/src/components/composite/InputWithIcon/index.tsx index 4aa9cfcbe..4159a90a9 100644 --- a/src/components/composite/InputWithIcon/index.tsx +++ b/src/components/composite/InputWithIcon/index.tsx @@ -1,7 +1,7 @@ import React, { forwardRef, useState } from 'react'; import { InputProps } from '@components/base/Input'; import { Input, InputRef, Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { styles } from './styles'; import { NativeSyntheticEvent, diff --git a/src/components/composite/InputWithIcon/styles.ts b/src/components/composite/InputWithIcon/styles.ts index 83f983fbc..5be5dc2d0 100644 --- a/src/components/composite/InputWithIcon/styles.ts +++ b/src/components/composite/InputWithIcon/styles.ts @@ -1,5 +1,5 @@ import { Platform, StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/composite/PasscodeKeyboard/index.tsx b/src/components/composite/PasscodeKeyboard/index.tsx index 807aa08aa..6ed3dd47f 100644 --- a/src/components/composite/PasscodeKeyboard/index.tsx +++ b/src/components/composite/PasscodeKeyboard/index.tsx @@ -9,12 +9,10 @@ import { } from 'react-native'; import { Row } from '@components/base'; import { DEVICE_HEIGHT } from '@constants/variables'; -import { scale } from '@utils/scaling'; -import { FaceIDIcon } from '@components/svg/icons/v2/FaceIDIcon'; +import { scale, DeviceUtils } from '@utils'; import { COLORS } from '@constants/colors'; import { BackIcon } from '@components/svg/icons'; -import { DeviceUtils } from '@utils/device'; -import { FingerPrintIcon } from '@components/svg/icons/v2/FingerPrintIcon'; +import { FingerPrintIcon, FaceIDIcon } from '@components/svg/icons/v2'; const DEFAULT_BUTTONS = [ ['1', '2', '3'], diff --git a/src/components/composite/PercentChange.tsx b/src/components/composite/PercentChange.tsx index fd751e5da..850f29876 100644 --- a/src/components/composite/PercentChange.tsx +++ b/src/components/composite/PercentChange.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Row, Text } from '@components/base'; import { TextProps } from '@components/base/Text/Text.types'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; interface PercentChangeProps diff --git a/src/components/composite/PercentageBox/styles.ts b/src/components/composite/PercentageBox/styles.ts index 2b0439d5e..91d908c5b 100644 --- a/src/components/composite/PercentageBox/styles.ts +++ b/src/components/composite/PercentageBox/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ percentageBox: { diff --git a/src/components/composite/PopUpInfo/index.tsx b/src/components/composite/PopUpInfo/index.tsx index 9cc6ca16f..1098c6ce5 100644 --- a/src/components/composite/PopUpInfo/index.tsx +++ b/src/components/composite/PopUpInfo/index.tsx @@ -4,7 +4,7 @@ import Popover, { PopoverPlacement } from 'react-native-popover-view'; import { Button, Spacer, Text } from '@components/base'; import { PopUpInfoProps } from './PopUpInfo.types'; import { styles } from './styles'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const PopUpInfo = (props: PopUpInfoProps): JSX.Element => { diff --git a/src/components/composite/PopUpInfo/styles.ts b/src/components/composite/PopUpInfo/styles.ts index 26424493c..29d40e391 100644 --- a/src/components/composite/PopUpInfo/styles.ts +++ b/src/components/composite/PopUpInfo/styles.ts @@ -1,7 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; -import { isAndroid } from '@utils/isPlatform'; +import { COLORS } from '@constants/colors'; +import { scale, isAndroid } from '@utils'; export const styles = StyleSheet.create({ popoverStyle: { diff --git a/src/components/composite/SegmentedPicker/styles.ts b/src/components/composite/SegmentedPicker/styles.ts index 2c9c79afe..2c9e823e1 100644 --- a/src/components/composite/SegmentedPicker/styles.ts +++ b/src/components/composite/SegmentedPicker/styles.ts @@ -1,7 +1,7 @@ import { Dimensions, StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { shadow } from '@constants/shadow'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/composite/TextOrSpinner/index.tsx b/src/components/composite/TextOrSpinner/index.tsx index d25d81ddc..de9146b9d 100644 --- a/src/components/composite/TextOrSpinner/index.tsx +++ b/src/components/composite/TextOrSpinner/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { FontFamily } from '@components/base/Text/Text.types'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; interface TextOrSpinnerProps { loading: boolean; diff --git a/src/components/modular/AnimatedTabs/index.tsx b/src/components/modular/AnimatedTabs/index.tsx index 2a5a5a139..08373e073 100644 --- a/src/components/modular/AnimatedTabs/index.tsx +++ b/src/components/modular/AnimatedTabs/index.tsx @@ -12,10 +12,10 @@ import Animated, { useSharedValue, withTiming } from 'react-native-reanimated'; +import { styles } from './styles'; import { Button, Row, Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; -import { styles } from './styles'; import { DEVICE_WIDTH } from '@constants/variables'; type AnimatedTab = { diff --git a/src/components/modular/AnimatedTabs/styles.ts b/src/components/modular/AnimatedTabs/styles.ts index 2cc42b17e..9f2037f37 100644 --- a/src/components/modular/AnimatedTabs/styles.ts +++ b/src/components/modular/AnimatedTabs/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ tabBarTitle: { diff --git a/src/components/modular/AnimatedTabsV2/index.tsx b/src/components/modular/AnimatedTabsV2/index.tsx index ee690df64..d922dce90 100644 --- a/src/components/modular/AnimatedTabsV2/index.tsx +++ b/src/components/modular/AnimatedTabsV2/index.tsx @@ -12,9 +12,9 @@ import Animated, { useSharedValue, withTiming } from 'react-native-reanimated'; -import { Button, Row, Text } from '@components/base'; -import { scale } from '@utils/scaling'; import { styles } from './styles'; +import { Button, Row, Text } from '@components/base'; +import { scale } from '@utils'; import { DEVICE_WIDTH } from '@constants/variables'; type AnimatedTab = { diff --git a/src/components/modular/AnimatedTabsV2/styles.ts b/src/components/modular/AnimatedTabsV2/styles.ts index ad8bc67ac..abff0491b 100644 --- a/src/components/modular/AnimatedTabsV2/styles.ts +++ b/src/components/modular/AnimatedTabsV2/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ tabBarTitle: { diff --git a/src/components/modular/BalanceRow/index.tsx b/src/components/modular/BalanceRow/index.tsx index f2291be2d..6342459ed 100644 --- a/src/components/modular/BalanceRow/index.tsx +++ b/src/components/modular/BalanceRow/index.tsx @@ -8,8 +8,7 @@ import { Button, Row, Spacer, Text } from '@components/base'; import { ShimmerLoader } from '@components/animations'; import { WalletOutlineIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; -import { scale } from '@utils/scaling'; +import { NumberUtils, scale } from '@utils'; import { useAMBEntity } from '@features/send-funds/lib/hooks'; import { useWalletStore } from '@entities/wallet'; diff --git a/src/components/modular/BottomSheetFloat/styles.ts b/src/components/modular/BottomSheetFloat/styles.ts index 9d79ac690..9979d3d7d 100644 --- a/src/components/modular/BottomSheetFloat/styles.ts +++ b/src/components/modular/BottomSheetFloat/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/modular/Button/Gradient.tsx b/src/components/modular/Button/Gradient.tsx index a65cdb970..8471dd0d9 100644 --- a/src/components/modular/Button/Gradient.tsx +++ b/src/components/modular/Button/Gradient.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { StyleSheet } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import { Button } from '@components/base'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { ButtonProps } from '@components/base/Button'; export interface GradientButtonProps extends React.PropsWithChildren { diff --git a/src/components/modular/Button/Secondary.tsx b/src/components/modular/Button/Secondary.tsx index 2700c5d11..d6055ac76 100644 --- a/src/components/modular/Button/Secondary.tsx +++ b/src/components/modular/Button/Secondary.tsx @@ -1,9 +1,9 @@ import React from 'react'; +import { StyleSheet } from 'react-native'; import { Button } from '@components/base'; import { ButtonProps } from '@components/base/Button'; -import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const SecondaryButton = (props: ButtonProps) => { return ( diff --git a/src/components/modular/CollectionItem/index.tsx b/src/components/modular/CollectionItem/index.tsx index 0181638ec..548bedcea 100644 --- a/src/components/modular/CollectionItem/index.tsx +++ b/src/components/modular/CollectionItem/index.tsx @@ -6,7 +6,7 @@ import { PercentChange } from '@components/composite'; import { COLORS } from '@constants/colors'; import { useAMBPrice } from '@hooks'; import { AccountList } from '@models'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; interface CollectionItemProps { collection: AccountList; diff --git a/src/components/modular/Passcode/index.tsx b/src/components/modular/Passcode/index.tsx index 59cb4bd80..c60890038 100644 --- a/src/components/modular/Passcode/index.tsx +++ b/src/components/modular/Passcode/index.tsx @@ -1,14 +1,12 @@ import React, { forwardRef, useCallback, useEffect, useState } from 'react'; import { TextInput, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import { split, dropRight } from 'lodash'; +import { dropRight, split } from 'lodash'; +import { PasscodeKeyboard } from '@components/composite/PasscodeKeyboard'; import { styles } from '@components/modular/Passcode/styles'; import { Button, Spacer } from '@components/base'; import { useForwardedRef } from '@hooks'; -import { StringUtils } from '@utils/string'; -import { DeviceUtils } from '@utils/device'; -import { PasscodeKeyboard } from '@components/composite/PasscodeKeyboard'; -import { scale } from '@utils/scaling'; +import { DeviceUtils, scale, StringUtils } from '@utils'; interface PasscodeProps { error?: boolean; diff --git a/src/components/modular/Passcode/styles.ts b/src/components/modular/Passcode/styles.ts index a17fa5ede..533dd9db7 100644 --- a/src/components/modular/Passcode/styles.ts +++ b/src/components/modular/Passcode/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ input: { diff --git a/src/components/modular/PrivateKeyMaskedInput/index.tsx b/src/components/modular/PrivateKeyMaskedInput/index.tsx index 415951b9d..4d23a8e08 100644 --- a/src/components/modular/PrivateKeyMaskedInput/index.tsx +++ b/src/components/modular/PrivateKeyMaskedInput/index.tsx @@ -13,11 +13,10 @@ import { TextStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { Clipboard } from '@utils/clipboard'; +import { Clipboard, moderateScale, scale, verticalScale } from '@utils'; import { TextInput } from '@components/base/Input/Input.text'; import { InputRef, TextInputProps } from '@components/base'; import { COLORS } from '@constants/colors'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; type SelectionKeys = 'start' | 'end'; type SelectionObject = Record; diff --git a/src/components/modular/QRCodeWithLogo/styles.ts b/src/components/modular/QRCodeWithLogo/styles.ts index 7d9bcc263..811e5f774 100644 --- a/src/components/modular/QRCodeWithLogo/styles.ts +++ b/src/components/modular/QRCodeWithLogo/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, verticalScale } from '@utils/scaling'; +import { moderateScale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/modular/SingleAsset/index.tsx b/src/components/modular/SingleAsset/index.tsx index f21206c14..66e43af82 100644 --- a/src/components/modular/SingleAsset/index.tsx +++ b/src/components/modular/SingleAsset/index.tsx @@ -3,14 +3,11 @@ import { View } from 'react-native'; import { ethers } from 'ethers'; import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { useUSDPrice } from '@hooks'; import { Token } from '@models'; import { TokenLogo, TokenLogoProps } from '../TokenLogo'; -import { NumberUtils } from '@utils/number'; -import { StringUtils } from '@utils/string'; -import { StringValidators } from '@utils'; +import { NumberUtils, StringUtils, StringValidators, scale } from '@utils'; interface SingleAssetProps { token: Token; diff --git a/src/components/modular/SingleAsset/styles.ts b/src/components/modular/SingleAsset/styles.ts index ee759d7cc..fdbc4c8f4 100644 --- a/src/components/modular/SingleAsset/styles.ts +++ b/src/components/modular/SingleAsset/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale } from '@utils/scaling'; +import { moderateScale, scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/modular/SingleAssetNFT/index.tsx b/src/components/modular/SingleAssetNFT/index.tsx index 37896aed9..4aef49177 100644 --- a/src/components/modular/SingleAssetNFT/index.tsx +++ b/src/components/modular/SingleAssetNFT/index.tsx @@ -3,10 +3,9 @@ import { View } from 'react-native'; import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { TokenLogo, TokenLogoProps } from '../TokenLogo'; -import { scale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { Token } from '@models'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale } from '@utils'; interface SingleAssetProps { token: Token; diff --git a/src/components/modular/SingleAssetNFT/styles.ts b/src/components/modular/SingleAssetNFT/styles.ts index 5d20dc437..fa79936b2 100644 --- a/src/components/modular/SingleAssetNFT/styles.ts +++ b/src/components/modular/SingleAssetNFT/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/modular/StakingPool/index.tsx b/src/components/modular/StakingPool/index.tsx index 33dcfcf28..11a31cd23 100644 --- a/src/components/modular/StakingPool/index.tsx +++ b/src/components/modular/StakingPool/index.tsx @@ -6,10 +6,8 @@ import { StakingPool } from '@models'; import { Row, Spacer, Text } from '@components/base'; import { useStakingPoolDetails } from '@entities/staking'; import { TokenLogo } from '../TokenLogo'; -import { TokenUtils } from '@utils/token'; -import { scale, verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; +import { scale, verticalScale, TokenUtils, NumberUtils } from '@utils'; interface StakingPoolItemProps { stakingPool: StakingPool; diff --git a/src/components/modular/Toast/Toast.body.tsx b/src/components/modular/Toast/Toast.body.tsx index 112baee9e..d269d67ca 100644 --- a/src/components/modular/Toast/Toast.body.tsx +++ b/src/components/modular/Toast/Toast.body.tsx @@ -2,11 +2,11 @@ import React from 'react'; import { View } from 'react-native'; import { Button, Row, Spacer, Text } from '@components/base'; import { CloseIcon } from '@components/svg/icons'; -import { verticalScale } from '@utils/scaling'; import { ToastAction, ToastOptions } from './Toast.types'; import { COLORS } from '@constants/colors'; import { ToastBg, ToastBorderColor, ToastStatusIcon } from './Toast.constants'; import { styles } from './Toast.styles'; +import { verticalScale } from '@utils'; export const AlertBanner = ( props: Pick & { diff --git a/src/components/modular/Toast/Toast.styles.ts b/src/components/modular/Toast/Toast.styles.ts index 6e05e82ae..47c470750 100644 --- a/src/components/modular/Toast/Toast.styles.ts +++ b/src/components/modular/Toast/Toast.styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/modular/Toast/Toast.wrapper.tsx b/src/components/modular/Toast/Toast.wrapper.tsx index 27ca34aba..79c535fc3 100644 --- a/src/components/modular/Toast/Toast.wrapper.tsx +++ b/src/components/modular/Toast/Toast.wrapper.tsx @@ -17,7 +17,7 @@ import Animated, { withTiming } from 'react-native-reanimated'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { ToastOptions, ToastPosition, ToastType } from './Toast.types'; import { TOAST_DEFAULT_DURATION } from './Toast.constants'; import { AlertBanner } from './Toast.body'; diff --git a/src/components/modular/TokenLogo/index.tsx b/src/components/modular/TokenLogo/index.tsx index d6da28523..c125b61d0 100644 --- a/src/components/modular/TokenLogo/index.tsx +++ b/src/components/modular/TokenLogo/index.tsx @@ -21,7 +21,7 @@ import { } from '@components/svg/icons'; import { CryptoCurrencyCode } from '@appTypes'; import NFTIcon from '@components/svg/icons/NFTIcon'; -import { getTokenNameFromDatabase } from '@utils/getTokenNameFromDatabase'; +import { getTokenNameFromDatabase } from '@utils'; export interface TokenLogoProps { token?: string; diff --git a/src/components/modular/TokenSelector/index.tsx b/src/components/modular/TokenSelector/index.tsx index 6081763e5..7149bc4d2 100644 --- a/src/components/modular/TokenSelector/index.tsx +++ b/src/components/modular/TokenSelector/index.tsx @@ -3,11 +3,10 @@ import { TextStyle, TouchableOpacity, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils/scaling'; import { TokenLogo } from '../TokenLogo'; import { COLORS } from '@constants/colors'; import { ArrowBottomFillIcon } from '@components/svg/icons/v2'; -import { TToken, wrapTokenIcon } from '@utils'; +import { TToken, wrapTokenIcon, scale } from '@utils'; interface TokenSelectorProps { readonly token: TToken; diff --git a/src/components/modular/TransactionItem/index.tsx b/src/components/modular/TransactionItem/index.tsx index e9a985221..03d6794f7 100644 --- a/src/components/modular/TransactionItem/index.tsx +++ b/src/components/modular/TransactionItem/index.tsx @@ -3,10 +3,8 @@ import { useTranslation } from 'react-i18next'; import { View } from 'react-native'; import { Transaction, TransactionTokenInfo } from '@models'; import { Row, Spacer, Text } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { styles } from './styles'; import { _txStatusLabel, _txStatusThumbnail } from '@features/explorer/utils'; diff --git a/src/components/modular/TransactionItem/styles.ts b/src/components/modular/TransactionItem/styles.ts index f0a5ab445..789b68897 100644 --- a/src/components/modular/TransactionItem/styles.ts +++ b/src/components/modular/TransactionItem/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { moderateScale, scale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { moderateScale, scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/modular/WalletCard/index.tsx b/src/components/modular/WalletCard/index.tsx index 981552b64..4ff71cc53 100644 --- a/src/components/modular/WalletCard/index.tsx +++ b/src/components/modular/WalletCard/index.tsx @@ -4,9 +4,7 @@ import { styles } from './styles'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { CopyToClipboardButton } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; -import { scale, verticalScale } from '@utils/scaling'; -import { StringUtils } from '@utils/string'; +import { StringUtils, NumberUtils, scale, verticalScale } from '@utils'; import { LogoGradient } from '@components/svg/icons'; import { ToastOptions, ToastPosition } from '../Toast'; import { TextProps } from '@components/base/Text/Text.types'; diff --git a/src/components/modular/WalletCard/styles.ts b/src/components/modular/WalletCard/styles.ts index 62763a4d8..3e6bb31c0 100644 --- a/src/components/modular/WalletCard/styles.ts +++ b/src/components/modular/WalletCard/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { shadow } from '@constants/shadow'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const WalletCardHeight = 139; diff --git a/src/components/styles/index.ts b/src/components/styles/index.ts index 58c1c4fd3..2519681c1 100644 --- a/src/components/styles/index.ts +++ b/src/components/styles/index.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const contentBox = { backgroundColor: COLORS.neutral100, diff --git a/src/components/svg/icons/CheckIconCircle.tsx b/src/components/svg/icons/CheckIconCircle.tsx index 8793d9f8b..5d01a044a 100644 --- a/src/components/svg/icons/CheckIconCircle.tsx +++ b/src/components/svg/icons/CheckIconCircle.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import { View } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { CheckIcon } from '@components/svg/icons/Check'; -import React from 'react'; export const CheckIconCircle = () => ( { const { scale = 1, color = COLORS.brand500 } = props; diff --git a/src/components/svg/icons/TelegramSettingsIcon.tsx b/src/components/svg/icons/TelegramSettingsIcon.tsx index 34bf9b890..b229149cd 100644 --- a/src/components/svg/icons/TelegramSettingsIcon.tsx +++ b/src/components/svg/icons/TelegramSettingsIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { ClipPath, Defs, G, Path } from 'react-native-svg'; import { IconProps } from '@components/svg/icons/Icon.types'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; export function TelegramSettingsIcon(props: IconProps) { const { scale = 1, color = '#000' } = props; diff --git a/src/components/svg/icons/XTwitterIcon.tsx b/src/components/svg/icons/XTwitterIcon.tsx index a32ff3715..3b4194c46 100644 --- a/src/components/svg/icons/XTwitterIcon.tsx +++ b/src/components/svg/icons/XTwitterIcon.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; const XTwitterIcon = (props: IconProps) => { const { scale = 1, color = COLORS.brand500 } = props; diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx index dd564f764..6acc6bb26 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; import { ProductsInnerIcon } from './products-inner-icon'; import { COLORS } from '@constants/colors'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; +import { cssShadowToNative } from '@utils'; import { IconProps } from '../../Icon.types'; export function ProductsActiveIcon({ color }: Pick) { diff --git a/src/components/svg/icons/v2/index.ts b/src/components/svg/icons/v2/index.ts index f46340f77..9c225e31f 100644 --- a/src/components/svg/icons/v2/index.ts +++ b/src/components/svg/icons/v2/index.ts @@ -19,3 +19,5 @@ export { ErrorIcon } from './Error'; export { SettingsOutlineIcon } from './SettingsOutline'; export { Edit } from './Edit'; export { Key } from './Key'; +export { FingerPrintIcon } from './FingerPrintIcon'; +export { FaceIDIcon } from './FaceIDIcon'; diff --git a/src/components/svg/icons/v2/settings/AboutIcon.tsx b/src/components/svg/icons/v2/settings/AboutIcon.tsx index 5217520c3..60acaabb5 100644 --- a/src/components/svg/icons/v2/settings/AboutIcon.tsx +++ b/src/components/svg/icons/v2/settings/AboutIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const AboutIcon = ({ diff --git a/src/components/svg/icons/v2/settings/CompassIcon.tsx b/src/components/svg/icons/v2/settings/CompassIcon.tsx index 7e69bb637..3dedecd98 100644 --- a/src/components/svg/icons/v2/settings/CompassIcon.tsx +++ b/src/components/svg/icons/v2/settings/CompassIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const CompassIcon = ({ diff --git a/src/components/svg/icons/v2/settings/CopyIconV2.tsx b/src/components/svg/icons/v2/settings/CopyIconV2.tsx index 87aa3138c..b6a21eab3 100644 --- a/src/components/svg/icons/v2/settings/CopyIconV2.tsx +++ b/src/components/svg/icons/v2/settings/CopyIconV2.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const CopyIconV2 = ({ diff --git a/src/components/svg/icons/v2/settings/DownloadIcon.tsx b/src/components/svg/icons/v2/settings/DownloadIcon.tsx index 458676726..bc793aec2 100644 --- a/src/components/svg/icons/v2/settings/DownloadIcon.tsx +++ b/src/components/svg/icons/v2/settings/DownloadIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const DownloadIcon = ({ diff --git a/src/components/svg/icons/v2/settings/KeyIcon.tsx b/src/components/svg/icons/v2/settings/KeyIcon.tsx index 935369393..11af382a0 100644 --- a/src/components/svg/icons/v2/settings/KeyIcon.tsx +++ b/src/components/svg/icons/v2/settings/KeyIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const KeyIcon = ({ diff --git a/src/components/svg/icons/v2/settings/NotificationIcon.tsx b/src/components/svg/icons/v2/settings/NotificationIcon.tsx index 35f82cf66..3f87522ee 100644 --- a/src/components/svg/icons/v2/settings/NotificationIcon.tsx +++ b/src/components/svg/icons/v2/settings/NotificationIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const NotificationIcon = ({ diff --git a/src/components/svg/icons/v2/settings/Preferences.tsx b/src/components/svg/icons/v2/settings/Preferences.tsx index 7e8045861..49bc0adf2 100644 --- a/src/components/svg/icons/v2/settings/Preferences.tsx +++ b/src/components/svg/icons/v2/settings/Preferences.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const Preferences = ({ diff --git a/src/components/svg/icons/v2/settings/SecurityIcon.tsx b/src/components/svg/icons/v2/settings/SecurityIcon.tsx index 9bff9ede5..426d52492 100644 --- a/src/components/svg/icons/v2/settings/SecurityIcon.tsx +++ b/src/components/svg/icons/v2/settings/SecurityIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const SecurityIcon = ({ diff --git a/src/components/svg/icons/v2/settings/WalletIcon.tsx b/src/components/svg/icons/v2/settings/WalletIcon.tsx index 4a8b76374..d1173b2dd 100644 --- a/src/components/svg/icons/v2/settings/WalletIcon.tsx +++ b/src/components/svg/icons/v2/settings/WalletIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils/scaling'; +import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; export const WalletIcon = ({ diff --git a/src/components/templates/AMBPriceHistory/index.tsx b/src/components/templates/AMBPriceHistory/index.tsx index 60eaff711..bb99e62a0 100644 --- a/src/components/templates/AMBPriceHistory/index.tsx +++ b/src/components/templates/AMBPriceHistory/index.tsx @@ -16,7 +16,7 @@ import { AnimatedText, Button, Row, Spacer } from '@components/base'; import { ChevronDownIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { useAMBPrice, useAMBPriceHistorical } from '@hooks'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { Badge } from '@components/base/Badge'; import { PercentChange } from '@components/composite'; import { MONTH_NAMES } from '@constants/variables'; diff --git a/src/components/templates/AMBPriceHistory/styles.ts b/src/components/templates/AMBPriceHistory/styles.ts index 3257342d8..201db6d03 100644 --- a/src/components/templates/AMBPriceHistory/styles.ts +++ b/src/components/templates/AMBPriceHistory/styles.ts @@ -1,7 +1,7 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { shadow } from '@constants/shadow'; -import { scale, verticalScale } from '@utils/scaling'; -import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/AccountActions/components/ActionButton.tsx b/src/components/templates/AccountActions/components/ActionButton.tsx index 0c52c97f2..0af7161da 100644 --- a/src/components/templates/AccountActions/components/ActionButton.tsx +++ b/src/components/templates/AccountActions/components/ActionButton.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import { Button, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { moderateScale, verticalScale } from '@utils/scaling'; +import { moderateScale, verticalScale } from '@utils'; import { IconProps } from '@components/svg/icons'; export interface AccountActionButtonProps { diff --git a/src/components/templates/AccountActions/components/Receive.tsx b/src/components/templates/AccountActions/components/Receive.tsx index 91670588f..0c1a8a1dc 100644 --- a/src/components/templates/AccountActions/components/Receive.tsx +++ b/src/components/templates/AccountActions/components/Receive.tsx @@ -1,12 +1,12 @@ import React, { useRef } from 'react'; +import { StyleSheet, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { ReceiveQRCodeIcon } from '@components/svg/icons'; import Config from '@constants/config'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { ReceiveFunds } from '@components/templates/ReceiveFunds'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { AccountActionButton } from './ActionButton'; -import { StyleSheet, View } from 'react-native'; interface ReceiveProps { address: string; diff --git a/src/components/templates/AccountActions/index.tsx b/src/components/templates/AccountActions/index.tsx index 0ebc73139..f4a683c9b 100644 --- a/src/components/templates/AccountActions/index.tsx +++ b/src/components/templates/AccountActions/index.tsx @@ -1,7 +1,7 @@ import React, { ComponentType, useCallback } from 'react'; import { Row } from '@components/base'; import { AccountActionsKey } from './ActionButton.types'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { Send, Swap, Staking, Bridge, Kosmos } from './components'; import { ExplorerAccount, Token } from '@models'; import Config from '@constants/config'; diff --git a/src/components/templates/AccountList/AccountList.paginated.tsx b/src/components/templates/AccountList/AccountList.paginated.tsx index ed8567119..1f7ee19cc 100644 --- a/src/components/templates/AccountList/AccountList.paginated.tsx +++ b/src/components/templates/AccountList/AccountList.paginated.tsx @@ -4,7 +4,7 @@ import { NativeScrollEvent, NativeSyntheticEvent } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { AccountListProps } from './AccountList.types'; import { AccountList } from './AccountList'; diff --git a/src/components/templates/AddWalletToList/index.tsx b/src/components/templates/AddWalletToList/index.tsx index 87199a47e..438086950 100644 --- a/src/components/templates/AddWalletToList/index.tsx +++ b/src/components/templates/AddWalletToList/index.tsx @@ -4,12 +4,11 @@ import { useTranslation } from 'react-i18next'; import { styles } from './styles'; import { Button, Row, Spacer, Text } from '@components/base'; import { InputWithIcon } from '@components/composite'; -import { scale, verticalScale } from '@utils/scaling'; import { ExplorerAccount } from '@models/Explorer'; import { AccountList } from '@models/AccountList'; import { COLORS } from '@constants/colors'; import { SearchIcon } from '@components/svg/icons'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale, verticalScale } from '@utils'; import { useListActions } from '@features/lists'; import { diff --git a/src/components/templates/AddWalletToList/styles.ts b/src/components/templates/AddWalletToList/styles.ts index 6eb111458..04631d9b7 100644 --- a/src/components/templates/AddWalletToList/styles.ts +++ b/src/components/templates/AddWalletToList/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ header: { diff --git a/src/components/templates/AddressIndicator/index.tsx b/src/components/templates/AddressIndicator/index.tsx index bd4e72ada..3db663fc4 100644 --- a/src/components/templates/AddressIndicator/index.tsx +++ b/src/components/templates/AddressIndicator/index.tsx @@ -5,7 +5,7 @@ import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { useWatchlist } from '@hooks'; import { WatchlistIcon } from '@components/svg/icons'; -import { StringUtils } from '@utils/string'; +import { StringUtils } from '@utils'; import { useListsSelector } from '@entities/lists'; interface AddressIndicatorProps { diff --git a/src/components/templates/AddressIndicator/styles.ts b/src/components/templates/AddressIndicator/styles.ts index 1e6e15a17..a2611eb3b 100644 --- a/src/components/templates/AddressIndicator/styles.ts +++ b/src/components/templates/AddressIndicator/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/AddressList/index.tsx b/src/components/templates/AddressList/index.tsx index e228cc9de..18c0b155f 100644 --- a/src/components/templates/AddressList/index.tsx +++ b/src/components/templates/AddressList/index.tsx @@ -7,7 +7,7 @@ import { } from 'react-native'; import Animated, { SlideInDown, SlideOutRight } from 'react-native-reanimated'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { ExplorerAccount } from '@models/Explorer'; import { SwipeableWalletItem, diff --git a/src/components/templates/AddressList/styles.ts b/src/components/templates/AddressList/styles.ts index e453a3154..49b959bfe 100644 --- a/src/components/templates/AddressList/styles.ts +++ b/src/components/templates/AddressList/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/BarcodeScanner/components/ScanSquare/styles.ts b/src/components/templates/BarcodeScanner/components/ScanSquare/styles.ts index 20c3cab2c..026030e33 100644 --- a/src/components/templates/BarcodeScanner/components/ScanSquare/styles.ts +++ b/src/components/templates/BarcodeScanner/components/ScanSquare/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/BarcodeScanner/styles.ts b/src/components/templates/BarcodeScanner/styles.ts index a7b8479d7..e4b27fd1d 100644 --- a/src/components/templates/BarcodeScanner/styles.ts +++ b/src/components/templates/BarcodeScanner/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/BezierChart/SelectionDot.tsx b/src/components/templates/BezierChart/SelectionDot.tsx index c044d7edb..6e37086a0 100644 --- a/src/components/templates/BezierChart/SelectionDot.tsx +++ b/src/components/templates/BezierChart/SelectionDot.tsx @@ -2,7 +2,7 @@ import React, { useCallback } from 'react'; import { runOnJS, useAnimatedReaction } from 'react-native-reanimated'; import { runSpring, useValue, Circle, Group } from '@shopify/react-native-skia'; import type { SelectionDotProps } from 'react-native-graph'; -import { moderateScale } from '@utils/scaling'; +import { moderateScale } from '@utils'; import { COLORS } from '@constants/colors'; export function SelectionDot({ diff --git a/src/components/templates/BezierChart/index.tsx b/src/components/templates/BezierChart/index.tsx index 21b5e5c10..df78e530d 100644 --- a/src/components/templates/BezierChart/index.tsx +++ b/src/components/templates/BezierChart/index.tsx @@ -1,9 +1,9 @@ import React, { useCallback, useRef } from 'react'; +import { StyleSheet, View } from 'react-native'; import { LineGraph, GraphPoint } from 'react-native-graph'; import { COLORS } from '@constants/colors'; -import { StyleSheet, View } from 'react-native'; import { Button, Row, Text } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { SelectionDot } from './SelectionDot'; interface Interval { diff --git a/src/components/templates/BottomSheetAddWalletToList/index.tsx b/src/components/templates/BottomSheetAddWalletToList/index.tsx index 0f95e380c..02db1241c 100644 --- a/src/components/templates/BottomSheetAddWalletToList/index.tsx +++ b/src/components/templates/BottomSheetAddWalletToList/index.tsx @@ -5,7 +5,7 @@ import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { AddWalletToList, AddWalletToListProps } from '../AddWalletToList'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { PrimaryButton } from '@components/modular'; import { BottomSheetCreateRenameGroup } from '@components/templates/BottomSheetCreateRenameGroup'; import { DEVICE_HEIGHT } from '@constants/variables'; diff --git a/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx b/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx index 41d224cf3..602144a33 100644 --- a/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx +++ b/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx @@ -1,12 +1,12 @@ import React, { ForwardedRef, forwardRef, RefObject } from 'react'; import { View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { BottomSheetRef } from '@components/composite'; import { Button, Spacer, Text } from '@components/base'; import { BottomSheetFloat, PrimaryButton } from '@components/modular'; import { useForwardedRef } from '@hooks'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; -import { useTranslation } from 'react-i18next'; type Props = { ref: RefObject; diff --git a/src/components/templates/BottomSheetCreateRenameGroup/index.tsx b/src/components/templates/BottomSheetCreateRenameGroup/index.tsx index f0abf79c0..c23cdaa1c 100644 --- a/src/components/templates/BottomSheetCreateRenameGroup/index.tsx +++ b/src/components/templates/BottomSheetCreateRenameGroup/index.tsx @@ -7,6 +7,8 @@ import React, { useState } from 'react'; import { Platform, View } from 'react-native'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useTranslation } from 'react-i18next'; import { Spacer } from '@components/base/Spacer'; import { Button, Input, InputRef, Text } from '@components/base'; import { COLORS } from '@constants/colors'; @@ -19,10 +21,7 @@ import { ToastPosition, ToastType } from '@components/modular'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { verticalScale } from '@utils/scaling'; -import { StringUtils } from '@utils/string'; -import { useTranslation } from 'react-i18next'; +import { StringUtils, verticalScale } from '@utils'; import { BottomSheet } from '@components/composite'; import { diff --git a/src/components/templates/BottomSheetCreateRenameGroup/styles.ts b/src/components/templates/BottomSheetCreateRenameGroup/styles.ts index 061878e93..e12547e7c 100644 --- a/src/components/templates/BottomSheetCreateRenameGroup/styles.ts +++ b/src/components/templates/BottomSheetCreateRenameGroup/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/BottomSheetEditCollection/index.tsx b/src/components/templates/BottomSheetEditCollection/index.tsx index 466af5bff..dce9e22b0 100644 --- a/src/components/templates/BottomSheetEditCollection/index.tsx +++ b/src/components/templates/BottomSheetEditCollection/index.tsx @@ -12,8 +12,7 @@ import { Button, Text } from '@components/base'; import { useForwardedRef } from '@hooks/useForwardedRef'; import { COLORS } from '@constants/colors'; import { AccountList } from '@models'; -import { StringUtils } from '@utils/string'; -import { verticalScale } from '@utils/scaling'; +import { StringUtils, verticalScale } from '@utils'; import { BottomSheetCreateRenameGroup } from '../BottomSheetCreateRenameGroup'; interface BottomSheetEditCollectionProps extends BottomSheetProps { diff --git a/src/components/templates/BottomSheetEditCollection/styles.ts b/src/components/templates/BottomSheetEditCollection/styles.ts index c5baf43b0..986ecb4f4 100644 --- a/src/components/templates/BottomSheetEditCollection/styles.ts +++ b/src/components/templates/BottomSheetEditCollection/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ content: { diff --git a/src/components/templates/BottomSheetEditWallet/styles.ts b/src/components/templates/BottomSheetEditWallet/styles.ts index c5baf43b0..986ecb4f4 100644 --- a/src/components/templates/BottomSheetEditWallet/styles.ts +++ b/src/components/templates/BottomSheetEditWallet/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ content: { diff --git a/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx b/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx index fc90c6a09..1135aeac6 100644 --- a/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx +++ b/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx @@ -16,7 +16,7 @@ import { useForwardedRef } from '@hooks'; import { COLORS } from '@constants/colors'; import { ExplorerAccount } from '@models'; import { BottomSheetFloat } from '@components/modular'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; type Props = { ref: RefObject; diff --git a/src/components/templates/BottomSheetRemoveAddressFromCollection/styles.ts b/src/components/templates/BottomSheetRemoveAddressFromCollection/styles.ts index 52f3a0824..2e7da70b7 100644 --- a/src/components/templates/BottomSheetRemoveAddressFromCollection/styles.ts +++ b/src/components/templates/BottomSheetRemoveAddressFromCollection/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ icon: { diff --git a/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx b/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx index 874f798e0..44f87f4b1 100644 --- a/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx +++ b/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx @@ -1,13 +1,13 @@ import React, { ForwardedRef, forwardRef, RefObject, useCallback } from 'react'; import { View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Button, Spacer, Text } from '@components/base'; import { BottomSheetRef } from '@components/composite'; import { useForwardedRef, useWatchlist } from '@hooks'; import { COLORS } from '@constants/colors'; import { ExplorerAccount } from '@models'; import { BottomSheetFloat } from '@components/modular'; -import { verticalScale } from '@utils/scaling'; -import { useTranslation } from 'react-i18next'; +import { verticalScale } from '@utils'; import { styles } from './styles'; type Props = { diff --git a/src/components/templates/BottomSheetRemoveAddressFromWatchlists/styles.ts b/src/components/templates/BottomSheetRemoveAddressFromWatchlists/styles.ts index 52f3a0824..2e7da70b7 100644 --- a/src/components/templates/BottomSheetRemoveAddressFromWatchlists/styles.ts +++ b/src/components/templates/BottomSheetRemoveAddressFromWatchlists/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ icon: { diff --git a/src/components/templates/BottomSheetSharePortfolio/index.tsx b/src/components/templates/BottomSheetSharePortfolio/index.tsx index 976be58d2..97b7f0b51 100644 --- a/src/components/templates/BottomSheetSharePortfolio/index.tsx +++ b/src/components/templates/BottomSheetSharePortfolio/index.tsx @@ -12,8 +12,7 @@ import { PortfolioPerformanceProps } from '@components/templates/PortfolioPerformance'; import { MessagesIcon, PlusIcon, TwitterIcon } from '@components/svg/icons'; -import { scale, verticalScale } from '@utils/scaling'; -import { ShareUtils } from '@utils/share'; +import { ShareUtils, scale, verticalScale } from '@utils'; import { Social } from '@appTypes/Sharing'; import { styles } from './styles'; diff --git a/src/components/templates/BottomSheetSharePortfolio/styles.ts b/src/components/templates/BottomSheetSharePortfolio/styles.ts index 2c298d31d..c7296c991 100644 --- a/src/components/templates/BottomSheetSharePortfolio/styles.ts +++ b/src/components/templates/BottomSheetSharePortfolio/styles.ts @@ -1,5 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; + export const styles = StyleSheet.create({ container: { paddingBottom: verticalScale(24) diff --git a/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx b/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx index fbc653b98..e2c0beb21 100644 --- a/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx +++ b/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx @@ -12,10 +12,9 @@ import { import { PrimaryButton } from '@components/modular'; import { Spacer, Text } from '@components/base'; import { useForwardedRef } from '@hooks'; -import { scale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { SettingsTabNavigationProp } from '@appTypes'; -import { _delayNavigation } from '@utils'; +import { _delayNavigation, scale } from '@utils'; interface BottomSheetViewAccessKeyProps extends BottomSheetProps { walletHash: string; diff --git a/src/components/templates/BottomSheetViewAccessKey/styles.ts b/src/components/templates/BottomSheetViewAccessKey/styles.ts index 471252e6e..a0b6df386 100644 --- a/src/components/templates/BottomSheetViewAccessKey/styles.ts +++ b/src/components/templates/BottomSheetViewAccessKey/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ innerContainer: { diff --git a/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx b/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx index 1924951ba..7f2b9bed7 100644 --- a/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx +++ b/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx @@ -10,7 +10,7 @@ import { } from '@components/composite'; import { Button, Spacer, Text } from '@components/base'; import { useForwardedRef } from '@hooks'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { HomeNavigationProp } from '@appTypes'; import { AddIcon, CloseIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; @@ -30,6 +30,7 @@ export const BottomSheetWalletCreateOrImport = forwardRef< const navigateToWalletCreate = useCallback(() => { onChangeName(''); onChangeMnemonicLength(128); + // @ts-ignore navigation.navigate('CreateWalletStep0'); localRef.current?.dismiss(); }, [localRef, navigation, onChangeMnemonicLength, onChangeName]); @@ -37,6 +38,7 @@ export const BottomSheetWalletCreateOrImport = forwardRef< const navigateToImportWallet = useCallback(() => { onChangeName(''); onChangeMnemonicLength(128); + // @ts-ignore navigation.navigate('ImportWalletMethods'); localRef.current?.dismiss(); }, [localRef, navigation, onChangeMnemonicLength, onChangeName]); diff --git a/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx b/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx index 7af27af70..aa3c4f21c 100644 --- a/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx +++ b/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/BridgeSelectorItem/index.tsx b/src/components/templates/BridgeSelectorItem/index.tsx index 4e3b192ef..13be8e2fa 100644 --- a/src/components/templates/BridgeSelectorItem/index.tsx +++ b/src/components/templates/BridgeSelectorItem/index.tsx @@ -2,7 +2,7 @@ import React, { ReactNode, useMemo } from 'react'; import { View } from 'react-native'; import { Button, Spacer, Text } from '@components/base'; import { ParsedBridge, RenderTokenItem } from '@models/Bridge'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { TokenLogo } from '@components/modular'; import { styles } from './styles'; import { CryptoCurrencyCode } from '@appTypes'; diff --git a/src/components/templates/BridgeSelectorItem/styles.tsx b/src/components/templates/BridgeSelectorItem/styles.tsx index 287f3b6b6..7b6f8cc21 100644 --- a/src/components/templates/BridgeSelectorItem/styles.tsx +++ b/src/components/templates/BridgeSelectorItem/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/DropDownPanel/index.tsx b/src/components/templates/DropDownPanel/index.tsx index 82acdd346..765e32d6e 100644 --- a/src/components/templates/DropDownPanel/index.tsx +++ b/src/components/templates/DropDownPanel/index.tsx @@ -11,7 +11,7 @@ import Animated, { withTiming } from 'react-native-reanimated'; import { Row, Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; import { BackIcon } from '@components/svg/icons'; import { styles } from './styles'; diff --git a/src/components/templates/DropDownPanel/styles.tsx b/src/components/templates/DropDownPanel/styles.tsx index 9b9818f62..748df1726 100644 --- a/src/components/templates/DropDownPanel/styles.tsx +++ b/src/components/templates/DropDownPanel/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { contentBox } from '@components/styles'; import { COLORS } from '@constants/colors'; diff --git a/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx b/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx index 6b61f15d2..4e874fe66 100644 --- a/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx +++ b/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx @@ -16,7 +16,7 @@ import { CenteredSpinner } from '@components/composite'; import { Spacer, Text } from '@components/base'; import { ExplorerAccountTransactionItem } from './components'; import { LocalizedRenderEmpty } from '../LocalizedRenderEmpty'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; interface ExplorerAccountViewTransactionsProps { diff --git a/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx b/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx index 2572c033d..ffba1ae73 100644 --- a/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx +++ b/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx @@ -5,7 +5,7 @@ import { DetailsItemTypography } from '@components/base/ExplorerTransactions'; import { Row } from '@components/base'; import { ClipboardIcon } from '@components/svg/icons/v2'; import { Checkmark } from '@components/svg/icons'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; interface AddressRowWithActionProps { readonly label: string; diff --git a/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx b/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx index 952461d27..2017f8a56 100644 --- a/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx +++ b/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx @@ -6,7 +6,7 @@ import { Button, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { TransactionItem } from '@components/modular'; import { Transaction, TransactionTokenInfo } from '@models/Transaction'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { AMB_DECIMALS } from '@constants/variables'; import { COLORS } from '@constants/colors'; import { TransactionDetails } from '@components/templates/TransactionDetails'; diff --git a/src/components/templates/ExplorerAccount/index.tsx b/src/components/templates/ExplorerAccount/index.tsx index 08995a211..e45787d25 100644 --- a/src/components/templates/ExplorerAccount/index.tsx +++ b/src/components/templates/ExplorerAccount/index.tsx @@ -3,10 +3,8 @@ import { ScrollView, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Badge, Button, Row, Spacer, Text } from '@components/base'; import { ExplorerAccount } from '@models/Explorer'; -import { scale, verticalScale } from '@utils/scaling'; -import { StringUtils } from '@utils/string'; import { useAMBPrice } from '@hooks/query'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale, verticalScale, StringUtils } from '@utils'; import { styles } from './styles'; import { BottomSheetRef, CopyToClipboardButton } from '@components/composite'; import { COLORS } from '@constants/colors'; diff --git a/src/components/templates/ExplorerAccount/styles.ts b/src/components/templates/ExplorerAccount/styles.ts index 02b263618..da8d6a609 100644 --- a/src/components/templates/ExplorerAccount/styles.ts +++ b/src/components/templates/ExplorerAccount/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/styles.ts b/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/styles.ts index 66e2bda45..0bd09cf1b 100644 --- a/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/styles.ts +++ b/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/InputWithTokenSelect/index.tsx b/src/components/templates/InputWithTokenSelect/index.tsx index f0cdfb055..67d7d718d 100644 --- a/src/components/templates/InputWithTokenSelect/index.tsx +++ b/src/components/templates/InputWithTokenSelect/index.tsx @@ -24,10 +24,8 @@ import { BottomSheetRef } from '@components/composite'; import { BalanceRow, TokenSelector } from '@components/modular'; import { Token } from '@models'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; import { useForwardedRef } from '@hooks'; -import { isAndroid } from '@utils/isPlatform'; +import { isAndroid, StringUtils, NumberUtils } from '@utils'; interface InputWithTokenSelectProps { readonly title?: string; diff --git a/src/components/templates/InputWithTokenSelect/styles.ts b/src/components/templates/InputWithTokenSelect/styles.ts index 368182822..38482ef48 100644 --- a/src/components/templates/InputWithTokenSelect/styles.ts +++ b/src/components/templates/InputWithTokenSelect/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, verticalScale } from '@utils/scaling'; +import { moderateScale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ upperRow: { diff --git a/src/components/templates/InputWithoutTokenSelect/index.tsx b/src/components/templates/InputWithoutTokenSelect/index.tsx index 7367ed097..e46ac6ecf 100644 --- a/src/components/templates/InputWithoutTokenSelect/index.tsx +++ b/src/components/templates/InputWithoutTokenSelect/index.tsx @@ -30,11 +30,8 @@ import { BottomSheetRef } from '@components/composite'; import { TokenLogo, TokenSelector } from '@components/modular'; import { Token } from '@models'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; import { useForwardedRef } from '@hooks'; -import { isAndroid } from '@utils/isPlatform'; -import { scale } from '@utils/scaling'; +import { scale, StringUtils, NumberUtils, isAndroid } from '@utils'; import { DownArrowIcon } from '@components/svg/icons'; interface InputWithoutTokenSelectProps { diff --git a/src/components/templates/InputWithoutTokenSelect/styles.tsx b/src/components/templates/InputWithoutTokenSelect/styles.tsx index 5896a6e6a..c10df6463 100644 --- a/src/components/templates/InputWithoutTokenSelect/styles.tsx +++ b/src/components/templates/InputWithoutTokenSelect/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/LocalizedRenderEmpty/index.tsx b/src/components/templates/LocalizedRenderEmpty/index.tsx index 20e215b3f..36d4426ba 100644 --- a/src/components/templates/LocalizedRenderEmpty/index.tsx +++ b/src/components/templates/LocalizedRenderEmpty/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { View } from 'react-native'; import { EmptyAddressListPlaceholderIcon } from '@components/svg/icons'; import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { styles } from '@components/templates/LocalizedRenderEmpty/styles'; import { useTranslation } from 'react-i18next'; import { COLORS } from '@constants/colors'; diff --git a/src/components/templates/LocalizedRenderEmpty/styles.ts b/src/components/templates/LocalizedRenderEmpty/styles.ts index 8c8e2c629..67107e410 100644 --- a/src/components/templates/LocalizedRenderEmpty/styles.ts +++ b/src/components/templates/LocalizedRenderEmpty/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ emptyContainer: { diff --git a/src/components/templates/NotificationSettings/index.tsx b/src/components/templates/NotificationSettings/index.tsx index 5635a8687..c3780b1c0 100644 --- a/src/components/templates/NotificationSettings/index.tsx +++ b/src/components/templates/NotificationSettings/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { Segment } from '@components/composite'; import { Button, Row, Spacer, Switch, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { useNotificationSettings } from '@hooks/cache'; import { NotificationSettings } from '@appTypes/notification'; import { styles } from './styles'; diff --git a/src/components/templates/NotificationSettings/styles.ts b/src/components/templates/NotificationSettings/styles.ts index 2c5c7490f..e22d1c088 100644 --- a/src/components/templates/NotificationSettings/styles.ts +++ b/src/components/templates/NotificationSettings/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/PortfolioPerformance/index.tsx b/src/components/templates/PortfolioPerformance/index.tsx index 4c8484792..2c19577cf 100644 --- a/src/components/templates/PortfolioPerformance/index.tsx +++ b/src/components/templates/PortfolioPerformance/index.tsx @@ -5,8 +5,7 @@ import { useTranslation } from 'react-i18next'; import moment from 'moment'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; -import { NumberUtils } from '@utils/number'; +import { scale, verticalScale, NumberUtils } from '@utils'; import { Badge } from '@components/base/Badge'; import { styles } from './styles'; diff --git a/src/components/templates/PortfolioPerformance/styles.ts b/src/components/templates/PortfolioPerformance/styles.ts index 6ecd5329c..a1b98e53e 100644 --- a/src/components/templates/PortfolioPerformance/styles.ts +++ b/src/components/templates/PortfolioPerformance/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/ReceiveFunds/index.tsx b/src/components/templates/ReceiveFunds/index.tsx index 9ff2a872f..13f704b0d 100644 --- a/src/components/templates/ReceiveFunds/index.tsx +++ b/src/components/templates/ReceiveFunds/index.tsx @@ -2,10 +2,9 @@ import React, { useReducer } from 'react'; import { useTranslation } from 'react-i18next'; import { View } from 'react-native'; import { Button, Row, Spacer, Text } from '@components/base'; -import { moderateScale, verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { QRCodeWithLogo } from '@components/modular'; -import { Clipboard } from '@utils/clipboard'; +import { Clipboard, moderateScale, verticalScale } from '@utils'; import { styles } from './styles'; import { CheckboxCircleFill } from '@components/svg/icons/v2'; diff --git a/src/components/templates/ReceiveFunds/styles.ts b/src/components/templates/ReceiveFunds/styles.ts index 6011e473d..89c044143 100644 --- a/src/components/templates/ReceiveFunds/styles.ts +++ b/src/components/templates/ReceiveFunds/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, verticalScale } from '@utils/scaling'; +import { moderateScale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/RenderEmpty/index.tsx b/src/components/templates/RenderEmpty/index.tsx index 9a2a387f1..21aec5143 100644 --- a/src/components/templates/RenderEmpty/index.tsx +++ b/src/components/templates/RenderEmpty/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { View } from 'react-native'; import { EmptyWalletListPlaceholderIcon } from '@components/svg/icons'; import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { styles } from '@components/templates/LocalizedRenderEmpty/styles'; import { useTranslation } from 'react-i18next'; diff --git a/src/components/templates/RenderEmpty/styles.ts b/src/components/templates/RenderEmpty/styles.ts index 140f73cc2..ca8213ad6 100644 --- a/src/components/templates/RenderEmpty/styles.ts +++ b/src/components/templates/RenderEmpty/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ emptyContainer: { diff --git a/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx b/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx index 50b79afe4..9dc33866a 100644 --- a/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx +++ b/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { moderateScale, verticalScale } from '@utils/scaling'; +import { moderateScale, verticalScale } from '@utils'; import { NoMatch } from '@components/svg/icons/NoMatch'; import { useTranslation } from 'react-i18next'; diff --git a/src/components/templates/SearchAddress/index.tsx b/src/components/templates/SearchAddress/index.tsx index 6cc300231..78d95da78 100644 --- a/src/components/templates/SearchAddress/index.tsx +++ b/src/components/templates/SearchAddress/index.tsx @@ -5,7 +5,6 @@ import React, { useState } from 'react'; import { Alert, useWindowDimensions, View, ViewStyle } from 'react-native'; -import { useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; import { styles } from './styles'; import { AccountTransactions, ExplorerAccountView } from '../ExplorerAccount'; @@ -28,7 +27,7 @@ import { InputWithIcon } from '@components/composite'; import { CloseIcon, ScannerQRIcon, SearchIcon } from '@components/svg/icons'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { useExplorerInfo, useSearchAccount, @@ -39,7 +38,6 @@ import { ethereumAddressRegex } from '@constants/regex'; import { Toast, ToastPosition, ToastType } from '@components/modular'; import { CRYPTO_ADDRESS_MAX_LENGTH } from '@constants/variables'; import { COLORS } from '@constants/colors'; -import { SearchTabNavigationProp } from '@appTypes'; import { CustomAppEvents, @@ -72,7 +70,6 @@ export const SearchAddress = forwardRef( ref ): JSX.Element => { const { t } = useTranslation(); - const navigation = useNavigation(); const { height: WINDOW_HEIGHT } = useWindowDimensions(); const { data: explorerInfo } = useExplorerInfo(); const [address, setAddress] = useState(''); @@ -227,10 +224,6 @@ export const SearchAddress = forwardRef( (loading && !!address && !isHashLoading) || (!loading && !!address && isHashLoading); - const navigateToAddressDetails = (address: string) => { - navigation.navigate('Address', { address }); - }; - const onChangeText = (text: string) => { setSearchSubmitted(false); setAddress(text); @@ -350,11 +343,7 @@ export const SearchAddress = forwardRef( {t('common.transaction.details')} - + ) : null} diff --git a/src/components/templates/SearchAddress/styles.ts b/src/components/templates/SearchAddress/styles.ts index 405ddd4a1..fab8b4879 100644 --- a/src/components/templates/SearchAddress/styles.ts +++ b/src/components/templates/SearchAddress/styles.ts @@ -1,5 +1,5 @@ import { Dimensions, StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/TokenPicker/index.tsx b/src/components/templates/TokenPicker/index.tsx index fad9332b5..af4767d51 100644 --- a/src/components/templates/TokenPicker/index.tsx +++ b/src/components/templates/TokenPicker/index.tsx @@ -6,7 +6,7 @@ import { BottomSheet, BottomSheetRef } from '@components/composite'; import { SingleAsset, TokenLogo } from '@components/modular'; import { ChevronDownIcon } from '@components/svg/icons'; import { Token } from '@models'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; interface TokenPickerProps { diff --git a/src/components/templates/TransactionDetails/index.tsx b/src/components/templates/TransactionDetails/index.tsx index e9d1bad8a..e7a59910a 100644 --- a/src/components/templates/TransactionDetails/index.tsx +++ b/src/components/templates/TransactionDetails/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer, Text } from '@components/base'; import { BottomSheetRef } from '@components/composite'; import { Transaction, TransactionTokenInfo } from '@models/Transaction'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; import { SharePortfolio } from '../BottomSheetSharePortfolio'; import { styles } from './styles'; diff --git a/src/components/templates/TransactionDetails/styles.ts b/src/components/templates/TransactionDetails/styles.ts index 137a8a381..3dc11a2c8 100644 --- a/src/components/templates/TransactionDetails/styles.ts +++ b/src/components/templates/TransactionDetails/styles.ts @@ -1,5 +1,5 @@ -import { moderateScale, scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ status: { diff --git a/src/components/templates/WalletDepositFunds/styles.ts b/src/components/templates/WalletDepositFunds/styles.ts index 917ca0ad1..585324e6d 100644 --- a/src/components/templates/WalletDepositFunds/styles.ts +++ b/src/components/templates/WalletDepositFunds/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { DEVICE_WIDTH } from '@constants/variables'; export const styles = StyleSheet.create({ diff --git a/src/components/templates/WalletItem/index.tsx b/src/components/templates/WalletItem/index.tsx index 8a34c5e8e..2cbe4fc4e 100644 --- a/src/components/templates/WalletItem/index.tsx +++ b/src/components/templates/WalletItem/index.tsx @@ -1,13 +1,11 @@ import React, { useMemo } from 'react'; import { FlexAlignType, View } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; -import { NumberUtils } from '@utils/number'; import { ExplorerAccount } from '@models/Explorer'; -import { StringUtils } from '@utils/string'; import { useAMBPrice } from '@hooks'; import { PercentChange } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale, NumberUtils, StringUtils } from '@utils'; import { AddressIndicator } from '../AddressIndicator'; interface WalletItemProps { diff --git a/src/components/templates/WalletNoNFTsView/styles.ts b/src/components/templates/WalletNoNFTsView/styles.ts index 8c37752eb..bd4cb6c17 100644 --- a/src/components/templates/WalletNoNFTsView/styles.ts +++ b/src/components/templates/WalletNoNFTsView/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ gestureContainer: { diff --git a/src/components/templates/WalletPicker/WalletPicker.item.tsx b/src/components/templates/WalletPicker/WalletPicker.item.tsx index cd13207d4..3e6bf774c 100644 --- a/src/components/templates/WalletPicker/WalletPicker.item.tsx +++ b/src/components/templates/WalletPicker/WalletPicker.item.tsx @@ -5,9 +5,7 @@ import { AccountDBModel } from '@database'; import { WalletAvatars } from './WalletPicker.constants'; import { useBalanceOfAddress, useUSDPrice } from '@hooks'; import { CryptoCurrencyCode } from '@appTypes'; -import { scale, verticalScale } from '@utils/scaling'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { styles } from './styles'; import { COLORS } from '@constants/colors'; import { CheckIcon } from '@components/svg/icons'; diff --git a/src/components/templates/WalletPicker/index.tsx b/src/components/templates/WalletPicker/index.tsx index c4ed6299b..da1487ea0 100644 --- a/src/components/templates/WalletPicker/index.tsx +++ b/src/components/templates/WalletPicker/index.tsx @@ -3,7 +3,7 @@ import { ScrollView, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Button, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import { AccountDBModel } from '@database'; import { WalletAvatarDefault } from '@components/svg/icons'; diff --git a/src/components/templates/WalletTransactionsAndAssets/NftAssets/styles.ts b/src/components/templates/WalletTransactionsAndAssets/NftAssets/styles.ts index fdc44c5df..7ae1454bd 100644 --- a/src/components/templates/WalletTransactionsAndAssets/NftAssets/styles.ts +++ b/src/components/templates/WalletTransactionsAndAssets/NftAssets/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx b/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx index e6e0b63bc..4332c89b1 100644 --- a/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx +++ b/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx @@ -9,7 +9,7 @@ import { SingleAsset } from '@components/modular'; import { Button, Spinner } from '@components/base'; import { CryptoCurrencyCode, HomeNavigationProp } from '@appTypes'; import { ExplorerAccount, Token } from '@models'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; import { AMB_DECIMALS } from '@constants/variables'; interface WalletAssetsProps { diff --git a/src/components/templates/WalletTransactionsAndAssets/WalletAssets/styles.ts b/src/components/templates/WalletTransactionsAndAssets/WalletAssets/styles.ts index 5d36d0077..a9a632843 100644 --- a/src/components/templates/WalletTransactionsAndAssets/WalletAssets/styles.ts +++ b/src/components/templates/WalletTransactionsAndAssets/WalletAssets/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { flex: 1 }, diff --git a/src/components/templates/WalletTransactionsAndAssets/styles.ts b/src/components/templates/WalletTransactionsAndAssets/styles.ts index 187fa1250..7a4b61dbe 100644 --- a/src/components/templates/WalletTransactionsAndAssets/styles.ts +++ b/src/components/templates/WalletTransactionsAndAssets/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { flex: 1 }, diff --git a/src/constants/shadow.ts b/src/constants/shadow.ts index b86e8acfc..8dfe7ffbb 100644 --- a/src/constants/shadow.ts +++ b/src/constants/shadow.ts @@ -1,6 +1,6 @@ import { StyleProp, ViewStyle } from 'react-native'; import { COLORS } from './colors'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; +import { cssShadowToNative } from '@utils'; export const buttonWithShadowStyle = ( disabled: boolean, diff --git a/src/contexts/Localizations/index.tsx b/src/contexts/Localizations/index.tsx index 07cd732d7..0c119e6d9 100644 --- a/src/contexts/Localizations/index.tsx +++ b/src/contexts/Localizations/index.tsx @@ -9,9 +9,8 @@ import React, { import * as SecureStore from 'expo-secure-store'; import moment from 'moment'; import dayjs from 'dayjs'; -// import i18n from '../../localization/i18n'; import { Language, LanguageCode } from '@appTypes'; -import { LocalizationUtils } from '@utils/localization'; +import { LocalizationUtils } from '@utils'; import i18n from '@localization/i18n'; interface ILanguageContext { diff --git a/src/contexts/Navigation/Navigation.context.tsx b/src/contexts/Navigation/Navigation.context.tsx index c299efd23..c0c6e3398 100644 --- a/src/contexts/Navigation/Navigation.context.tsx +++ b/src/contexts/Navigation/Navigation.context.tsx @@ -1,4 +1,4 @@ -import { createContextSelector } from '@utils/createContextSelector'; +import { createContextSelector } from '@utils'; const NavigationContext = ({ currentRoute }: { currentRoute: string }) => { return { diff --git a/src/entities/harbor/constants/index.ts b/src/entities/harbor/constants/index.ts index d70c1e24d..1c7bf4cc0 100644 --- a/src/entities/harbor/constants/index.ts +++ b/src/entities/harbor/constants/index.ts @@ -1,7 +1,7 @@ import { BigNumber } from 'ethers'; import { Token } from '@models'; import { CryptoCurrencyCode } from '@appTypes'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; import { TierRewardList } from '@entities/harbor/model/types'; export const EMPTY_TOKEN = new Token( diff --git a/src/entities/harbor/utils/getHarborToken.ts b/src/entities/harbor/utils/getHarborToken.ts index 080f86f7c..46b16a5c7 100644 --- a/src/entities/harbor/utils/getHarborToken.ts +++ b/src/entities/harbor/utils/getHarborToken.ts @@ -1,5 +1,5 @@ import { API } from '@api/api'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; import Config from '@constants/config'; import { EMPTY_TOKEN } from '@entities/harbor/constants'; diff --git a/src/entities/kosmos/utils/chart.preset.ts b/src/entities/kosmos/utils/chart.preset.ts index 6bfd504a2..d90c0d967 100644 --- a/src/entities/kosmos/utils/chart.preset.ts +++ b/src/entities/kosmos/utils/chart.preset.ts @@ -1,5 +1,5 @@ import { DEVICE_WIDTH } from '@constants/variables'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const CHART_WIDTH = DEVICE_WIDTH - 32; export const CHART_HEIGHT = 200; diff --git a/src/features/addresses/lib/hooks/use-list-notifications.ts b/src/features/addresses/lib/hooks/use-list-notifications.ts index 8e24cfa96..ff33559c4 100644 --- a/src/features/addresses/lib/hooks/use-list-notifications.ts +++ b/src/features/addresses/lib/hooks/use-list-notifications.ts @@ -5,7 +5,7 @@ import { AirDAOEventType, AirDAONotificationReceiveEventPayload } from '@appTypes'; -import { AddressUtils } from '@utils/address'; +import { AddressUtils } from '@utils'; import { AirDAOEventDispatcher } from '@lib'; export function useListNotifications() { diff --git a/src/features/bridge/context/Bridge.Context.tsx b/src/features/bridge/context/Bridge.Context.tsx index 6a3f42df9..54e174c4e 100644 --- a/src/features/bridge/context/Bridge.Context.tsx +++ b/src/features/bridge/context/Bridge.Context.tsx @@ -1,5 +1,5 @@ -import { createContextSelector } from '@utils/createContextSelector'; import { useCallback, useEffect, useMemo, useState } from 'react'; +import { createContextSelector } from '@utils'; import { BridgeDataState, Config as BridgeConfigModel, diff --git a/src/features/bridge/hooks/useBridgeTransactionStatus.ts b/src/features/bridge/hooks/useBridgeTransactionStatus.ts index d694cc9d5..468908da7 100644 --- a/src/features/bridge/hooks/useBridgeTransactionStatus.ts +++ b/src/features/bridge/hooks/useBridgeTransactionStatus.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useState } from 'react'; import Config from '@constants/config'; -import { keepWSAlive } from '@utils/keepWSlive'; +import { keepWSAlive } from '@utils'; const POINTED_STAGES = ['1.1', '2.1', '2.2', '3.1', '3.1', '4']; const WSS_BRIDGE_TRANSACTIONS_HISTORY_URL = Config.WSS_BRIDGE_HISTORY_URL; diff --git a/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx b/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx index 995a771e5..ddcbc0711 100644 --- a/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; import { useBridgeContextData } from '@features/bridge/context'; import { FlatList, TouchableOpacity } from 'react-native'; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx index 2428f1fe9..12bdbc733 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx @@ -6,7 +6,7 @@ import { CloseCircleIcon } from '@components/svg/icons/v2'; import { Row, Spacer, Text } from '@components/base'; import { useBridgeContextData } from '@features/bridge/context'; import { amountCheckers } from '@features/bridge/templates/BottomSheetBridgePreview/helpers/amountChecker'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import { TouchableOpacity, View } from 'react-native'; import { GeneralPreviewTemplate } from './components'; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx index 219240c0e..b3f08c2dc 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx @@ -7,8 +7,7 @@ import { useBridgeContextData } from '@features/bridge/context'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; -import { scale } from '@utils/scaling'; +import { NumberUtils, scale } from '@utils'; import { CloseCircleIcon } from '@components/svg/icons/v2'; import { PrimaryButton } from '@components/modular'; import { PreviewDataTemplate } from '../PreviewDataTemplate/PreviewDataTemplate'; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx index 5449670de..703b79815 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { FlatList, View } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { Spacer } from '@components/base'; import { BridgeNetworksSelected } from '@features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected'; import { PreviewDataItem } from '@features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem'; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx index 2786519a5..ca6dc0292 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx @@ -3,9 +3,8 @@ import { View } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; import { DataToPreviewModel } from '@models/Bridge'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale } from '@utils'; import { formatUnits } from 'ethers/lib/utils'; interface PreviewDataItemProps { diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx index 324c2d4e7..8fdcaff53 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx @@ -4,15 +4,18 @@ import { styles } from './styles'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Row, Spacer, Text } from '@components/base'; import { useTranslation } from 'react-i18next'; -import { verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; import { TokenLogo } from '@components/modular'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import { StringUtils } from '@utils/string'; import { useUSDPrice } from '@hooks'; import { CryptoCurrencyCode } from '@appTypes'; -import { NETWORK, timestamp } from '@utils/bridge'; +import { + NETWORK, + timestamp, + verticalScale, + NumberUtils, + StringUtils +} from '@utils'; import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; type RowRightItemType = 'default' | 'status' | 'token' | 'amount'; diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts index e9de8968c..f698845f8 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx index 8f7ff2777..5d833991a 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'; import { useTranslation } from 'react-i18next'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Spacer, Text } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { COLORS } from '@constants/colors'; import { PrimaryButton } from '@components/modular'; diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx index 83b4bfe80..f3607adb3 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx @@ -6,7 +6,7 @@ import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; import { RowStageSection } from '../RowStageSection/RowStageSection'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; interface BridgeTransactionPendingTemplateModel { diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles.ts b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles.ts index 0f98819d2..8bdf93e4e 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles.ts +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/bridge/templates/BridgeForm/BridgeForm.tsx b/src/features/bridge/templates/BridgeForm/BridgeForm.tsx index fa1e9c950..2e268ed01 100644 --- a/src/features/bridge/templates/BridgeForm/BridgeForm.tsx +++ b/src/features/bridge/templates/BridgeForm/BridgeForm.tsx @@ -25,8 +25,6 @@ import { useBridgeContextData } from '@features/bridge/context'; import { useKeyboardHeight } from '@hooks'; import { DEVICE_HEIGHT } from '@constants/variables'; import { PrimaryButton } from '@components/modular'; -import { scale, verticalScale } from '@utils/scaling'; -import { isAndroid } from '@utils/isPlatform'; import { COLORS } from '@constants/colors'; import { TokenSelectData } from '@features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData'; import { InputWithTokenSelect } from '@components/templates'; @@ -35,7 +33,7 @@ import { parseUnits } from 'ethers/lib/utils'; import { BottomSheetBridgePreview } from '@features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview'; import { getFeeData } from '@features/bridge/utils/getBridgeFee'; import { FeeData } from '@lib/bridgeSDK/models/types'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale, verticalScale, isAndroid } from '@utils'; import { DEFAULT_TRANSACTION, EMPTY_FEE_DATA diff --git a/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx b/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx index d89f2ee98..1fe9d8e90 100644 --- a/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx +++ b/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx @@ -1,10 +1,8 @@ import React, { forwardRef } from 'react'; import { formatUnits } from 'ethers/lib/utils'; - import { FlatList, View } from 'react-native'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; -import { scale } from '@utils/scaling'; +import { scale, NumberUtils } from '@utils'; import { Text } from '@components/base'; import { BottomSheetRef } from '@components/composite'; import { BridgeSelectorItem } from '@components/templates/BridgeSelectorItem'; diff --git a/src/features/bridge/templates/BridgeForm/styles.ts b/src/features/bridge/templates/BridgeForm/styles.ts index 0faa61d85..1de7d2638 100644 --- a/src/features/bridge/templates/BridgeForm/styles.ts +++ b/src/features/bridge/templates/BridgeForm/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ loader: { diff --git a/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx b/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx index f0b0ec6b9..8d4fd49f4 100644 --- a/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx +++ b/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx @@ -12,7 +12,7 @@ import { LocalizedRenderEmpty } from '@components/templates'; import { Spacer, Text } from '@components/base'; import { CenteredSpinner } from '@components/composite'; import { useBridgeHistory } from '@hooks/query/useBridgeHistory'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { parseBridgeTransaction } from '@lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction'; diff --git a/src/features/bridge/templates/BridgeHistory/styles.ts b/src/features/bridge/templates/BridgeHistory/styles.ts index 0aac0e7f3..99495dad2 100644 --- a/src/features/bridge/templates/BridgeHistory/styles.ts +++ b/src/features/bridge/templates/BridgeHistory/styles.ts @@ -1,5 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; + export const styles = StyleSheet.create({ list: { flexGrow: 1, diff --git a/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx b/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx index 078a18929..e201d3b2d 100644 --- a/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx +++ b/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx @@ -9,7 +9,7 @@ import { TokenLogo } from '@components/modular'; import { useBridgeContextData } from '@features/bridge/context'; import { ChevronDownIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { useTranslation } from 'react-i18next'; export const BridgeNetworkPicker = ({ type }: BridgeNetworkPickerProps) => { diff --git a/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts b/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts index 9baceb804..08a72e121 100644 --- a/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts +++ b/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx b/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx index a5633b839..a686c4dbc 100644 --- a/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx +++ b/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; -import { NETWORK, SHORTEN_NETWORK } from '@utils/bridge'; +import { NETWORK, SHORTEN_NETWORK } from '@utils'; import { RightArrowIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { View } from 'react-native'; diff --git a/src/features/bridge/templates/BridgeNetworksSelected/styles.ts b/src/features/bridge/templates/BridgeNetworksSelected/styles.ts index ea0678f88..8fe2e6f3b 100644 --- a/src/features/bridge/templates/BridgeNetworksSelected/styles.ts +++ b/src/features/bridge/templates/BridgeNetworksSelected/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/bridge/templates/BridgeTemplate.tsx b/src/features/bridge/templates/BridgeTemplate.tsx index 58de40dbb..abb860b09 100644 --- a/src/features/bridge/templates/BridgeTemplate.tsx +++ b/src/features/bridge/templates/BridgeTemplate.tsx @@ -3,7 +3,7 @@ import { View } from 'react-native'; import { styles } from './styles'; import { BridgeNetworkSelectors } from './BridgeNetworkSelectors/BridgeNetwork.Selectors'; import { Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { BridgeForm } from '@features/bridge/templates/BridgeForm/BridgeForm'; export const BridgeTemplate = () => { diff --git a/src/features/bridge/templates/BridgeTransaction/components/Status/Status.styles.tsx b/src/features/bridge/templates/BridgeTransaction/components/Status/Status.styles.tsx index 58c425f6d..14e7888be 100644 --- a/src/features/bridge/templates/BridgeTransaction/components/Status/Status.styles.tsx +++ b/src/features/bridge/templates/BridgeTransaction/components/Status/Status.styles.tsx @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { FONT } from '@constants/fonts'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ statusMain: { diff --git a/src/features/bridge/templates/BridgeTransaction/index.tsx b/src/features/bridge/templates/BridgeTransaction/index.tsx index 07117ac87..41c73e4a9 100644 --- a/src/features/bridge/templates/BridgeTransaction/index.tsx +++ b/src/features/bridge/templates/BridgeTransaction/index.tsx @@ -1,15 +1,18 @@ import React, { useMemo, useRef } from 'react'; import { View } from 'react-native'; import { styles } from './BridgeTransaction.style'; - import { TokenLogo } from '@components/modular'; -import { scale } from '@utils/scaling'; -import { NumberUtils } from '@utils/number'; +import { + NumberUtils, + scale, + NETWORK, + tokenThumb, + transactionFrom +} from '@utils'; import { BottomSheetRef } from '@components/composite'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { Button, Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { NETWORK, tokenThumb, transactionFrom } from '@utils/bridge'; import { useBridgeTransactionStatus } from '@features/bridge/hooks/useBridgeTransactionStatus'; import { useTranslation } from 'react-i18next'; import { DECIMAL_LIMIT } from '@constants/variables'; diff --git a/src/features/bridge/templates/styles.ts b/src/features/bridge/templates/styles.ts index 160e3a7d1..bf4a9c74f 100644 --- a/src/features/bridge/templates/styles.ts +++ b/src/features/bridge/templates/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/harbor/components/base/preview-modules/error-template/index.tsx b/src/features/harbor/components/base/preview-modules/error-template/index.tsx index 5c7612b42..b01a72462 100644 --- a/src/features/harbor/components/base/preview-modules/error-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/error-template/index.tsx @@ -6,7 +6,7 @@ import { Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { ErrorIcon } from '@components/svg/icons/v2/harbor'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; interface PreviewFormModel { onClose: () => void; diff --git a/src/features/harbor/components/base/preview-modules/error-template/styles.ts b/src/features/harbor/components/base/preview-modules/error-template/styles.ts index 68cb256df..da8716f70 100644 --- a/src/features/harbor/components/base/preview-modules/error-template/styles.ts +++ b/src/features/harbor/components/base/preview-modules/error-template/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/harbor/components/base/preview-modules/form-template/index.tsx b/src/features/harbor/components/base/preview-modules/form-template/index.tsx index 5545c32c4..6067ac3b5 100644 --- a/src/features/harbor/components/base/preview-modules/form-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/form-template/index.tsx @@ -8,7 +8,7 @@ import { import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { PrimaryButton } from '@components/modular'; import { TextOrSpinner } from '@components/composite'; diff --git a/src/features/harbor/components/base/preview-modules/form-template/styles.tsx b/src/features/harbor/components/base/preview-modules/form-template/styles.tsx index 5f84a9481..782915ab2 100644 --- a/src/features/harbor/components/base/preview-modules/form-template/styles.tsx +++ b/src/features/harbor/components/base/preview-modules/form-template/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx index 09965df9c..df9ecd124 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx @@ -4,11 +4,10 @@ import { Pressable } from 'react-native'; import * as Clipboard from 'expo-clipboard'; import { Row, Text } from '@components/base'; import { GlobeIcon } from '@components/svg/icons/v2'; -import { StringUtils } from '@utils/string'; import { COLORS } from '@constants/colors'; import { contentBox } from '@components/styles'; import { Toast, ToastPosition, ToastType } from '@components/modular'; -import { scale } from '@utils/scaling'; +import { scale, StringUtils } from '@utils'; interface CopyHashModel { hash: string; diff --git a/src/features/harbor/components/base/preview-modules/success-template/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/index.tsx index 23d4896bc..be1a7b334 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/index.tsx @@ -8,12 +8,11 @@ import { } from '@features/harbor/components/harbor-preview/model'; import { Row, Spacer, Text } from '@components/base'; import { SuccessIcon } from '@components/svg/icons/v2/harbor'; -import { scale } from '@utils/scaling'; import { SuccessTitle } from '@features/harbor/components/base/preview-modules/success-template/success-title'; import { COLORS } from '@constants/colors'; import { PrimaryButton, SecondaryButton } from '@components/modular'; import { CopyHash } from './copy-hash'; -import { delay } from '@utils/delay'; +import { delay, scale } from '@utils'; import { useNavigation } from '@react-navigation/native'; import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { styles } from './styes'; diff --git a/src/features/harbor/components/base/preview-modules/success-template/styes.tsx b/src/features/harbor/components/base/preview-modules/success-template/styes.tsx index 8aadc0c2d..5da5ff2ec 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/styes.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/styes.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx index 45abf0641..cc5a6802e 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { TextStyle, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; import { TokenLogo } from '@components/modular'; import { CryptoCurrencyCode } from '@appTypes'; diff --git a/src/features/harbor/components/base/stake-info-container/index.tsx b/src/features/harbor/components/base/stake-info-container/index.tsx index dfbd4fe0a..cfbccf182 100644 --- a/src/features/harbor/components/base/stake-info-container/index.tsx +++ b/src/features/harbor/components/base/stake-info-container/index.tsx @@ -5,11 +5,10 @@ import { formatEther } from 'ethers/lib/utils'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { PrimaryButton, TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; import { useNavigation } from '@react-navigation/native'; import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { PlusIcon } from '@components/svg/icons/v2'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale } from '@utils'; import { CryptoCurrencyCode } from '@appTypes'; import { styles } from './styles'; import { useAMBPrice } from '@hooks'; diff --git a/src/features/harbor/components/base/stake-info-container/styles.ts b/src/features/harbor/components/base/stake-info-container/styles.ts index bf5cbc646..222e2af93 100644 --- a/src/features/harbor/components/base/stake-info-container/styles.ts +++ b/src/features/harbor/components/base/stake-info-container/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { contentBox } from '@components/styles'; export const styles = StyleSheet.create({ diff --git a/src/features/harbor/components/base/tier-info-item/index.tsx b/src/features/harbor/components/base/tier-info-item/index.tsx index 84fa6c922..d58ec28b4 100644 --- a/src/features/harbor/components/base/tier-info-item/index.tsx +++ b/src/features/harbor/components/base/tier-info-item/index.tsx @@ -3,7 +3,7 @@ import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { styles } from './styles'; interface TierInfoItemProps { diff --git a/src/features/harbor/components/base/tier-item/index.tsx b/src/features/harbor/components/base/tier-item/index.tsx index 86edca5ad..78e24a699 100644 --- a/src/features/harbor/components/base/tier-item/index.tsx +++ b/src/features/harbor/components/base/tier-item/index.tsx @@ -3,7 +3,7 @@ import { View } from 'react-native'; import { Text } from '@components/base'; import { TierRewardItem } from '@entities/harbor/model/types'; import { styles } from './styles'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; interface TierItemProps { rewardValue: TierRewardItem; diff --git a/src/features/harbor/components/base/tier-item/styles.tsx b/src/features/harbor/components/base/tier-item/styles.tsx index 0e5500e9c..647003456 100644 --- a/src/features/harbor/components/base/tier-item/styles.tsx +++ b/src/features/harbor/components/base/tier-item/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/features/harbor/components/base/tiers-info-container/index.tsx b/src/features/harbor/components/base/tiers-info-container/index.tsx index 34f8914bd..dbc5dc4e2 100644 --- a/src/features/harbor/components/base/tiers-info-container/index.tsx +++ b/src/features/harbor/components/base/tiers-info-container/index.tsx @@ -3,7 +3,7 @@ import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { ImportantInfo } from '@components/svg/icons/v2/harbor'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; import { DropDownPanel } from '@components/templates'; import { styles } from './styles'; diff --git a/src/features/harbor/components/base/tiers-selector/index.tsx b/src/features/harbor/components/base/tiers-selector/index.tsx index b3060572e..89ed49d05 100644 --- a/src/features/harbor/components/base/tiers-selector/index.tsx +++ b/src/features/harbor/components/base/tiers-selector/index.tsx @@ -3,7 +3,6 @@ import { TouchableOpacity, View } from 'react-native'; import Tooltip from 'react-native-walkthrough-tooltip'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils/scaling'; import { EMPTY_SELECTED_TIER, REWARD_TIERS_LIST @@ -15,7 +14,7 @@ import { styles } from './styles'; import { TokenReward } from '@features/harbor/components/base/token-reward'; import { calculateClaimAmount } from '@features/harbor/hooks'; import { CircleInfoIcon } from '@components/svg/icons/v2/harbor'; -import { isAndroid } from '@utils/isPlatform'; +import { isAndroid, scale } from '@utils'; interface TiersContainerProps { bondAmount: string; diff --git a/src/features/harbor/components/base/tiers-selector/styles.tsx b/src/features/harbor/components/base/tiers-selector/styles.tsx index fd6a0fc61..3c5784ba6 100644 --- a/src/features/harbor/components/base/tiers-selector/styles.tsx +++ b/src/features/harbor/components/base/tiers-selector/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { contentBox } from '@components/styles'; export const styles = StyleSheet.create({ diff --git a/src/features/harbor/components/base/token-reward/index.tsx b/src/features/harbor/components/base/token-reward/index.tsx index f0c44bcac..fd6458557 100644 --- a/src/features/harbor/components/base/token-reward/index.tsx +++ b/src/features/harbor/components/base/token-reward/index.tsx @@ -8,7 +8,7 @@ import { } from '@entities/harbor/model/types'; import { TierItem } from '../tier-item'; import { styles } from './styles'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; interface TokenRewardProps { rewardTokenName: RewardTokenNamesModel; diff --git a/src/features/harbor/components/base/token-reward/styles.tsx b/src/features/harbor/components/base/token-reward/styles.tsx index d889d9bb9..9093c589d 100644 --- a/src/features/harbor/components/base/token-reward/styles.tsx +++ b/src/features/harbor/components/base/token-reward/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ valueText: { diff --git a/src/features/harbor/components/base/withdraw-info/index.tsx b/src/features/harbor/components/base/withdraw-info/index.tsx index 0233e054f..55fdc8ba5 100644 --- a/src/features/harbor/components/base/withdraw-info/index.tsx +++ b/src/features/harbor/components/base/withdraw-info/index.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { View } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { styles } from './styles'; diff --git a/src/features/harbor/components/base/withdraw-info/styles.tsx b/src/features/harbor/components/base/withdraw-info/styles.tsx index bc806efdb..4132c5621 100644 --- a/src/features/harbor/components/base/withdraw-info/styles.tsx +++ b/src/features/harbor/components/base/withdraw-info/styles.tsx @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; import { contentBox } from '@components/styles'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/features/harbor/components/harbor-preview/index.tsx b/src/features/harbor/components/harbor-preview/index.tsx index a0e913c39..9e24ce069 100644 --- a/src/features/harbor/components/harbor-preview/index.tsx +++ b/src/features/harbor/components/harbor-preview/index.tsx @@ -6,8 +6,7 @@ import { styles } from './styles'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { useForwardedRef } from '@hooks'; import { Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; -import { isAndroid } from '@utils/isPlatform'; +import { isAndroid, scale } from '@utils'; import { BottomSheetHarborPreViewProps, EmptyHarborProcessTransaction diff --git a/src/features/harbor/components/harbor-preview/styles.tsx b/src/features/harbor/components/harbor-preview/styles.tsx index d6ad413d4..0578ad346 100644 --- a/src/features/harbor/components/harbor-preview/styles.tsx +++ b/src/features/harbor/components/harbor-preview/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/harbor/components/tabs/stake-amb-tab/index.tsx b/src/features/harbor/components/tabs/stake-amb-tab/index.tsx index c12b9e3b4..f7e6edb88 100644 --- a/src/features/harbor/components/tabs/stake-amb-tab/index.tsx +++ b/src/features/harbor/components/tabs/stake-amb-tab/index.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from 'react'; import { RefreshControl, ScrollView, View } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { Spacer } from '@components/base'; import { styles } from './styles'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; diff --git a/src/features/harbor/components/tabs/stake-amb-tab/styles.ts b/src/features/harbor/components/tabs/stake-amb-tab/styles.ts index 847489766..e51475d4e 100644 --- a/src/features/harbor/components/tabs/stake-amb-tab/styles.ts +++ b/src/features/harbor/components/tabs/stake-amb-tab/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { height: '100%', paddingHorizontal: scale(8) } diff --git a/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx b/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx index 98400b8f1..ab4477e8c 100644 --- a/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx +++ b/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useRef, useState } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { TiersSelector } from '../../base/tiers-selector'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; diff --git a/src/features/harbor/components/tabs/withdraw-reward-only-tab/styles.ts b/src/features/harbor/components/tabs/withdraw-reward-only-tab/styles.ts index 8617de9e1..baf44f2a3 100644 --- a/src/features/harbor/components/tabs/withdraw-reward-only-tab/styles.ts +++ b/src/features/harbor/components/tabs/withdraw-reward-only-tab/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx b/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx index ade61b2f3..8b91d618d 100644 --- a/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx +++ b/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx @@ -13,7 +13,7 @@ import Animated, { } from 'react-native-reanimated'; import { formatEther, parseEther } from 'ethers/lib/utils'; import { useTranslation } from 'react-i18next'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { InputWithoutTokenSelect } from '@components/templates'; import { Spacer, Text } from '@components/base'; diff --git a/src/features/harbor/components/tabs/withdraw-stake-reward-tab/styles.ts b/src/features/harbor/components/tabs/withdraw-stake-reward-tab/styles.ts index 06759deba..519706f54 100644 --- a/src/features/harbor/components/tabs/withdraw-stake-reward-tab/styles.ts +++ b/src/features/harbor/components/tabs/withdraw-stake-reward-tab/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/features/harbor/hooks/calculateClaimAmount.ts b/src/features/harbor/hooks/calculateClaimAmount.ts index dc9559a25..66db6cbfc 100644 --- a/src/features/harbor/hooks/calculateClaimAmount.ts +++ b/src/features/harbor/hooks/calculateClaimAmount.ts @@ -4,7 +4,7 @@ import { TierRewardItem } from '@entities/harbor/model/types'; import { formatEther } from 'ethers/lib/utils'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; export const calculateClaimAmount = ( claimAmount: BigNumberish, diff --git a/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts b/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts index cb5c844c9..673df4225 100644 --- a/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts +++ b/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts @@ -1,8 +1,7 @@ import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; import { StakePreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { CryptoCurrencyCode } from '@appTypes'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, StringUtils } from '@utils'; export const parseStakeData = (previewData: StakePreviewDataModel) => { return { diff --git a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts index bb9655763..bb7660074 100644 --- a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts +++ b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts @@ -1,7 +1,7 @@ import { WithdrawPreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { CryptoCurrencyCode } from '@appTypes'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; export const parseWithdrawReward = (previewData: WithdrawPreviewDataModel) => { return { diff --git a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts index 8415d5ca3..5c80d994b 100644 --- a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts +++ b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts @@ -1,6 +1,6 @@ import { WithdrawPreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { CryptoCurrencyCode } from '@appTypes'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; export const parseWithdrawStakePreview = ( previewData: WithdrawPreviewDataModel diff --git a/src/features/harbor/hooks/processHelpers/resultHandler.ts b/src/features/harbor/hooks/processHelpers/resultHandler.ts index 7a5110bcd..fbb679033 100644 --- a/src/features/harbor/hooks/processHelpers/resultHandler.ts +++ b/src/features/harbor/hooks/processHelpers/resultHandler.ts @@ -1,4 +1,4 @@ -import { delay } from '@utils/delay'; +import { delay } from '@utils'; import { explorerService } from '@api/explorer-service'; export const resultHandler = async (result: any) => { diff --git a/src/features/kosmos/components/base/chart-interval-item/index.tsx b/src/features/kosmos/components/base/chart-interval-item/index.tsx index 76bc80715..154b7c837 100644 --- a/src/features/kosmos/components/base/chart-interval-item/index.tsx +++ b/src/features/kosmos/components/base/chart-interval-item/index.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from 'react'; import { StyleProp, TouchableOpacity, ViewStyle } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; diff --git a/src/features/kosmos/components/base/filters-item/styles.ts b/src/features/kosmos/components/base/filters-item/styles.ts index c41c7c8e2..86b05dff7 100644 --- a/src/features/kosmos/components/base/filters-item/styles.ts +++ b/src/features/kosmos/components/base/filters-item/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, moderateScale } from '@utils/scaling'; +import { scale, moderateScale } from '@utils'; export const styles = StyleSheet.create({ itemContainer: { diff --git a/src/features/kosmos/components/base/list-cell-headings/index.tsx b/src/features/kosmos/components/base/list-cell-headings/index.tsx index ee942a94e..81495d625 100644 --- a/src/features/kosmos/components/base/list-cell-headings/index.tsx +++ b/src/features/kosmos/components/base/list-cell-headings/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import capitalize from 'lodash/capitalize'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const ListCellHeadings = () => { const { t } = useTranslation(); diff --git a/src/features/kosmos/components/base/market-list-item/index.tsx b/src/features/kosmos/components/base/market-list-item/index.tsx index c028bd838..6c41cc601 100644 --- a/src/features/kosmos/components/base/market-list-item/index.tsx +++ b/src/features/kosmos/components/base/market-list-item/index.tsx @@ -1,11 +1,10 @@ import React from 'react'; import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { MarketType } from '@features/kosmos/types'; import { COLORS } from '@constants/colors'; import { TokenLogo } from '@components/modular'; -import { NumberUtils } from '@utils/number'; -import { useToken } from '@entities/kosmos'; +import { NumberUtils } from '@utils'; +import { MarketType, useToken } from '@entities/kosmos'; import { $discount, discountColor } from '@features/kosmos/utils'; interface MarketListItemProps { diff --git a/src/features/kosmos/components/base/market-list-item/styles.ts b/src/features/kosmos/components/base/market-list-item/styles.ts index 65662e816..ab41944fe 100644 --- a/src/features/kosmos/components/base/market-list-item/styles.ts +++ b/src/features/kosmos/components/base/market-list-item/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/base/order-card-details/styles.ts b/src/features/kosmos/components/base/order-card-details/styles.ts index 5d5bcd532..1a9f77598 100644 --- a/src/features/kosmos/components/base/order-card-details/styles.ts +++ b/src/features/kosmos/components/base/order-card-details/styles.ts @@ -1,5 +1,5 @@ -import { verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ innerRowContainer: { diff --git a/src/features/kosmos/components/base/transaction-history-item/styles.ts b/src/features/kosmos/components/base/transaction-history-item/styles.ts index 84dd5f834..f32570e95 100644 --- a/src/features/kosmos/components/base/transaction-history-item/styles.ts +++ b/src/features/kosmos/components/base/transaction-history-item/styles.ts @@ -1,4 +1,4 @@ -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/kosmos/components/base/wrapped-lists-container/styles.ts b/src/features/kosmos/components/base/wrapped-lists-container/styles.ts index 9e813a3df..a288fd3d7 100644 --- a/src/features/kosmos/components/base/wrapped-lists-container/styles.ts +++ b/src/features/kosmos/components/base/wrapped-lists-container/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx b/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx index 549c9c09e..7aa1f8f2b 100644 --- a/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx +++ b/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx @@ -5,10 +5,8 @@ import { InputWithIcon } from '@components/composite'; import { InputRef, Spacer, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; import { useTransactionErrorHandler } from '@features/kosmos/lib/hooks'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; +import { StringUtils, NumberUtils, verticalScale } from '@utils'; import { usePurchaseStore } from '@features/kosmos'; import { MarketType, Token } from '@entities/kosmos'; diff --git a/src/features/kosmos/components/composite/chart-time-intervals/styles.ts b/src/features/kosmos/components/composite/chart-time-intervals/styles.ts index 2354ecb42..9447dc40b 100644 --- a/src/features/kosmos/components/composite/chart-time-intervals/styles.ts +++ b/src/features/kosmos/components/composite/chart-time-intervals/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/composite/claimable-order-card-details/styles.ts b/src/features/kosmos/components/composite/claimable-order-card-details/styles.ts index ef6d507cc..aef28ebe6 100644 --- a/src/features/kosmos/components/composite/claimable-order-card-details/styles.ts +++ b/src/features/kosmos/components/composite/claimable-order-card-details/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/composite/market-table-details/index.tsx b/src/features/kosmos/components/composite/market-table-details/index.tsx index 68bd10543..ef9c59ca9 100644 --- a/src/features/kosmos/components/composite/market-table-details/index.tsx +++ b/src/features/kosmos/components/composite/market-table-details/index.tsx @@ -6,9 +6,8 @@ import { Status } from '@features/bridge/templates/BridgeTransaction/components/ import { RowJustifyAlignedItem } from '@features/kosmos/components/base'; import { Row, Text } from '@components/base'; import { useMarketDetails } from '@features/kosmos/lib/hooks'; - import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; import { MarketType, _timestampToDate, diff --git a/src/features/kosmos/components/composite/market-table-details/styles.ts b/src/features/kosmos/components/composite/market-table-details/styles.ts index fbca84b0c..7931d3dab 100644 --- a/src/features/kosmos/components/composite/market-table-details/styles.ts +++ b/src/features/kosmos/components/composite/market-table-details/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/composite/total-orders-amount/styles.ts b/src/features/kosmos/components/composite/total-orders-amount/styles.ts index 00e433d42..cbda1e8da 100644 --- a/src/features/kosmos/components/composite/total-orders-amount/styles.ts +++ b/src/features/kosmos/components/composite/total-orders-amount/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/modular/balance/index.tsx b/src/features/kosmos/components/modular/balance/index.tsx index e870a0a5f..d7ff433d4 100644 --- a/src/features/kosmos/components/modular/balance/index.tsx +++ b/src/features/kosmos/components/modular/balance/index.tsx @@ -2,9 +2,9 @@ import React, { useCallback } from 'react'; import { TouchableOpacity, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Spinner, Text } from '@components/base'; -import { MarketType, Token } from '@features/kosmos/types'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; +import { MarketType, Token } from '@entities/kosmos'; interface BalanceWithButtonProps { quoteToken: Token | undefined; diff --git a/src/features/kosmos/components/modular/buy-bond-button/styles.ts b/src/features/kosmos/components/modular/buy-bond-button/styles.ts index 6e1b7ce9c..fa217a547 100644 --- a/src/features/kosmos/components/modular/buy-bond-button/styles.ts +++ b/src/features/kosmos/components/modular/buy-bond-button/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ button: { diff --git a/src/features/kosmos/components/modular/filters-selector/styles.ts b/src/features/kosmos/components/modular/filters-selector/styles.ts index 3955cb538..2d8b6483f 100644 --- a/src/features/kosmos/components/modular/filters-selector/styles.ts +++ b/src/features/kosmos/components/modular/filters-selector/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/kosmos/components/modular/review-bond-purchase-button/styles.ts b/src/features/kosmos/components/modular/review-bond-purchase-button/styles.ts index 8e53635dd..b2dd48099 100644 --- a/src/features/kosmos/components/modular/review-bond-purchase-button/styles.ts +++ b/src/features/kosmos/components/modular/review-bond-purchase-button/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ footer: { diff --git a/src/features/kosmos/components/modular/user-orders-list/styles.ts b/src/features/kosmos/components/modular/user-orders-list/styles.ts index a0f339cc4..e30c04b0f 100644 --- a/src/features/kosmos/components/modular/user-orders-list/styles.ts +++ b/src/features/kosmos/components/modular/user-orders-list/styles.ts @@ -1,4 +1,4 @@ -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx b/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx index 8715a7dc9..6e19fa1e6 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx +++ b/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx @@ -8,15 +8,15 @@ import React, { import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { styles } from './styles'; -import { FiltersState } from '@features/kosmos/types'; import { FiltersSections } from '@features/kosmos/components/composite'; import { Row, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { useForwardedRef } from '@hooks'; import { SecondaryButton } from '@components/modular'; import { INITIAL_FILTERS } from '@features/kosmos/utils'; +import { FiltersState } from '@entities/kosmos'; interface BottomSheetFiltersProps { updateFilters: Dispatch>; diff --git a/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts b/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts index 2f00fb3ec..4747ed198 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts +++ b/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx b/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx index 2a9da9f7d..e87399ad2 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx +++ b/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx @@ -26,8 +26,7 @@ import { timestampToFormattedDate, useTokensStore } from '@entities/kosmos'; -import { verticalScale } from '@utils/scaling'; -import { isAndroid } from '@utils/isPlatform'; +import { isAndroid, verticalScale } from '@utils'; interface BottomSheetPreviewPurchaseProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/styles.ts b/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/styles.ts index 570dedadc..8624f2f8c 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/styles.ts +++ b/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ heading: { diff --git a/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx b/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx index daacbbeab..12381b971 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx +++ b/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx @@ -13,9 +13,7 @@ import { discountColor, formatDecimals } from '@features/kosmos/utils'; -import { StringUtils } from '@utils/string'; import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; -import { NumberUtils } from '@utils/number'; import { _timestampToDate, Token, @@ -23,7 +21,7 @@ import { useTokensStore, VESTINGS } from '@entities/kosmos'; -import { environment } from '@utils/environment'; +import { environment, NumberUtils, StringUtils } from '@utils'; const ADDRESS_LEFT_PADDING = 5; const ADDRESS_RIGHT_PADDING = 4; diff --git a/src/features/kosmos/components/templates/bottom-sheet-review-order/styles.ts b/src/features/kosmos/components/templates/bottom-sheet-review-order/styles.ts index 876e7d4ca..39d93f944 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-review-order/styles.ts +++ b/src/features/kosmos/components/templates/bottom-sheet-review-order/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/styles.ts b/src/features/kosmos/components/templates/exact-market-token-tabs/styles.ts index e2545560a..f811d774e 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/styles.ts +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx index 7344fd573..5697ce0da 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx @@ -25,11 +25,9 @@ import { $discount, discountColor } from '@features/kosmos/utils'; import { usePurchaseStore } from '@features/kosmos'; import { BottomSheetPreviewPurchase } from '../../../bottom-sheet-preview-purchase'; import { BottomSheetRef } from '@components/composite'; -import { isAndroid, isIos } from '@utils/isPlatform'; - import { InputWithTokenSelect } from '@components/templates'; import { Token } from '@models'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, isAndroid, isIos } from '@utils'; import { MarketType } from '@entities/kosmos'; interface BuyBondTabProps { diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/styles.ts b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/styles.ts index c67ee1245..037d7f9ac 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/styles.ts +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ innerContainer: { diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx index 99a8a9474..ebc1b3f5f 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx @@ -3,17 +3,17 @@ import { RefreshControl, View, VirtualizedList } from 'react-native'; import { useTranslation } from 'react-i18next'; import { styles } from './styles'; import { TransactionHistoryItem } from '@features/kosmos/components/base'; -import { - MarketType, - TransactionListItem, - TxType -} from '@features/kosmos/types'; import { useMarketDetails } from '@features/kosmos/lib/hooks'; import { upperCase } from 'lodash'; import { COLORS } from '@constants/colors'; import { Row, Spinner, Text } from '@components/base'; -import { useMarketTransactions } from '@entities/kosmos'; -import { isIos } from '@utils/isPlatform'; +import { + MarketType, + TransactionListItem, + TxType, + useMarketTransactions +} from '@entities/kosmos'; +import { isIos } from '@utils'; interface TransactionsHistoryTabProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/styles.ts b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/styles.ts index 41915d410..3bcf79532 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/styles.ts +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx b/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx index fafeb1e1f..9d82e030f 100644 --- a/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx +++ b/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx @@ -8,10 +8,9 @@ import { import { useTranslation } from 'react-i18next'; import { styles } from './styles'; import { MarketChart } from '@features/kosmos/components/modular'; - import { useMarketDetails } from '@features/kosmos/lib/hooks'; import { ChartTimeIntervals } from '@features/kosmos/components/composite'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { CHART_INTERVALS, MarketType } from '@entities/kosmos'; diff --git a/src/features/kosmos/components/templates/market-chart-with-timeframes/styles.ts b/src/features/kosmos/components/templates/market-chart-with-timeframes/styles.ts index f28d414b5..61b6869e7 100644 --- a/src/features/kosmos/components/templates/market-chart-with-timeframes/styles.ts +++ b/src/features/kosmos/components/templates/market-chart-with-timeframes/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ indicator: { diff --git a/src/features/kosmos/lib/hooks/use-market-details.ts b/src/features/kosmos/lib/hooks/use-market-details.ts index 38359ef90..d097031ed 100644 --- a/src/features/kosmos/lib/hooks/use-market-details.ts +++ b/src/features/kosmos/lib/hooks/use-market-details.ts @@ -10,7 +10,7 @@ import { VESTINGS } from '@entities/kosmos'; import { usePurchaseStore } from '@features/kosmos'; -import { environment } from '@utils/environment'; +import { environment } from '@utils'; export function useMarketDetails(market: MarketType | undefined) { const { extractTokenCb } = useToken(); diff --git a/src/features/passcode/lib/hooks/use-passcode-actions.ts b/src/features/passcode/lib/hooks/use-passcode-actions.ts index ca05001f7..2f4ea6ce5 100644 --- a/src/features/passcode/lib/hooks/use-passcode-actions.ts +++ b/src/features/passcode/lib/hooks/use-passcode-actions.ts @@ -1,8 +1,7 @@ import { useCallback } from 'react'; import * as LocalAuthentication from 'expo-local-authentication'; import { toLength } from 'lodash'; -import { PasscodeUtils } from '@utils/passcode'; -import { DeviceUtils } from '@utils/device'; +import { DeviceUtils, PasscodeUtils } from '@utils'; import { Cache, CacheKey } from '@lib/cache'; import { useSupportedBiometrics } from '@hooks'; import { diff --git a/src/features/passcode/lib/hooks/use-passcode-init.ts b/src/features/passcode/lib/hooks/use-passcode-init.ts index 43377fcf6..ab2aa3951 100644 --- a/src/features/passcode/lib/hooks/use-passcode-init.ts +++ b/src/features/passcode/lib/hooks/use-passcode-init.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import { usePasscodeStore } from '@features/passcode/model'; -import { PasscodeUtils } from '@utils/passcode'; +import { PasscodeUtils } from '@utils'; export function usePasscodeInit() { const { diff --git a/src/features/passcode/utils/authenticate-popup.ts b/src/features/passcode/utils/authenticate-popup.ts index 994951de8..2c55b7a49 100644 --- a/src/features/passcode/utils/authenticate-popup.ts +++ b/src/features/passcode/utils/authenticate-popup.ts @@ -1,6 +1,6 @@ import * as LocalAuthentication from 'expo-local-authentication'; import { t } from 'i18next'; -import { DeviceUtils } from '@utils/device'; +import { DeviceUtils } from '@utils'; interface AuthenticateNativePopupArgs { readonly hasFaceId: boolean; diff --git a/src/features/products/components/base/product-list-item/styles.ts b/src/features/products/components/base/product-list-item/styles.ts index 3897d7483..5101c0816 100644 --- a/src/features/products/components/base/product-list-item/styles.ts +++ b/src/features/products/components/base/product-list-item/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/products/components/templates/products-list/index.tsx b/src/features/products/components/templates/products-list/index.tsx index 66d4af742..7a1a01b6b 100644 --- a/src/features/products/components/templates/products-list/index.tsx +++ b/src/features/products/components/templates/products-list/index.tsx @@ -10,7 +10,7 @@ import { PRODUCTS } from '@features/products/entities'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { ProductListItem } from '../../base'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; export const ProductsList = () => { diff --git a/src/features/products/components/templates/products-list/styles.ts b/src/features/products/components/templates/products-list/styles.ts index d67182ed3..ee130c1b3 100644 --- a/src/features/products/components/templates/products-list/styles.ts +++ b/src/features/products/components/templates/products-list/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/send-funds/components/base/tokens-list-item/index.tsx b/src/features/send-funds/components/base/tokens-list-item/index.tsx index c84b0307d..9cc319423 100644 --- a/src/features/send-funds/components/base/tokens-list-item/index.tsx +++ b/src/features/send-funds/components/base/tokens-list-item/index.tsx @@ -1,13 +1,16 @@ import React, { useCallback, useMemo } from 'react'; +import { StyleProp, TouchableOpacity, View, ViewStyle } from 'react-native'; +import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { Token } from '@models'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { StyleProp, TouchableOpacity, View, ViewStyle } from 'react-native'; -import { styles } from './styles'; -import { NumberUtils } from '@utils/number'; -import { StringValidators, wrapTokenIcon } from '@utils'; -import { StringUtils } from '@utils/string'; +import { + StringValidators, + wrapTokenIcon, + NumberUtils, + StringUtils +} from '@utils'; import { useUSDPrice } from '@hooks'; import { CryptoCurrencyCode } from '@appTypes'; diff --git a/src/features/send-funds/components/base/tokens-list-item/styles.ts b/src/features/send-funds/components/base/tokens-list-item/styles.ts index d26912bc9..63f6529c5 100644 --- a/src/features/send-funds/components/base/tokens-list-item/styles.ts +++ b/src/features/send-funds/components/base/tokens-list-item/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/send-funds/components/composite/tokens-list/styles.ts b/src/features/send-funds/components/composite/tokens-list/styles.ts index d6f8228b4..bf2d90652 100644 --- a/src/features/send-funds/components/composite/tokens-list/styles.ts +++ b/src/features/send-funds/components/composite/tokens-list/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { DEVICE_HEIGHT } from '@constants/variables'; export const styles = StyleSheet.create({ diff --git a/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx b/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx index 18674176e..7cb344bc2 100644 --- a/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx +++ b/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx @@ -8,7 +8,7 @@ import Animated, { import { styles } from './styles'; import { Row } from '@components/base'; import { PercentageItem } from '../../base'; -import { isIos } from '@utils/isPlatform'; +import { isIos } from '@utils'; const PERCENTS = [25, 50, 75, 100]; diff --git a/src/features/send-funds/components/modular/amount-selection-keyboard-extend/styles.ts b/src/features/send-funds/components/modular/amount-selection-keyboard-extend/styles.ts index 16027f8af..babf55f68 100644 --- a/src/features/send-funds/components/modular/amount-selection-keyboard-extend/styles.ts +++ b/src/features/send-funds/components/modular/amount-selection-keyboard-extend/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/features/send-funds/components/templates/header/index.tsx b/src/features/send-funds/components/templates/header/index.tsx index f9b57ce52..5396a4aff 100644 --- a/src/features/send-funds/components/templates/header/index.tsx +++ b/src/features/send-funds/components/templates/header/index.tsx @@ -7,7 +7,7 @@ import { Header } from '@components/composite'; import { BarcodeScannerIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { useBarcode } from '@features/send-funds/lib/hooks'; -import { StringUtils } from '@utils/string'; +import { StringUtils } from '@utils'; interface FundsHeaderProps { sender: string; diff --git a/src/features/send-funds/lib/hooks/use-amb-entity.ts b/src/features/send-funds/lib/hooks/use-amb-entity.ts index c4e8eedd9..ab3aaa481 100644 --- a/src/features/send-funds/lib/hooks/use-amb-entity.ts +++ b/src/features/send-funds/lib/hooks/use-amb-entity.ts @@ -4,7 +4,7 @@ import { CryptoCurrencyCode } from '@appTypes'; import { AMB_DECIMALS } from '@constants/variables'; import { useBalanceOfAddress } from '@hooks'; import { Token } from '@models'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; export function useAMBEntity(senderAddress: string) { const { data: tokenBalance } = useBalanceOfAddress(senderAddress); diff --git a/src/features/send-funds/lib/hooks/use-amount-change-handler.ts b/src/features/send-funds/lib/hooks/use-amount-change-handler.ts index 8d829f991..01f553ba3 100644 --- a/src/features/send-funds/lib/hooks/use-amount-change-handler.ts +++ b/src/features/send-funds/lib/hooks/use-amount-change-handler.ts @@ -1,6 +1,5 @@ import { useCallback, useState } from 'react'; -import { NumberUtils } from '@utils/number'; -import { StringUtils } from '@utils/string'; +import { NumberUtils, StringUtils } from '@utils'; export function useAmountChangeHandler() { const [amountInCrypto, setAmountInCrypto] = useState(''); diff --git a/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx b/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx index 1bc9fd4c0..244c986cb 100644 --- a/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx +++ b/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx @@ -7,9 +7,8 @@ import { FIELD } from '@features/swap/types'; import { SwapStringUtils } from '@features/swap/utils'; import { TokenLogo } from '@components/modular'; import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, verticalScale } from '@utils'; interface BottomSheetReviewTokenItemProps { type: keyof typeof FIELD; diff --git a/src/features/swap/components/base/settings-input-with-label/styles.ts b/src/features/swap/components/base/settings-input-with-label/styles.ts index 42dae7fc9..b17ff05ca 100644 --- a/src/features/swap/components/base/settings-input-with-label/styles.ts +++ b/src/features/swap/components/base/settings-input-with-label/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/swap/components/base/swap-buttons-list/styles.ts b/src/features/swap/components/base/swap-buttons-list/styles.ts index b8a7dbe7d..739194855 100644 --- a/src/features/swap/components/base/swap-buttons-list/styles.ts +++ b/src/features/swap/components/base/swap-buttons-list/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ row: { diff --git a/src/features/swap/components/base/swap-buttons-list/swap/index.tsx b/src/features/swap/components/base/swap-buttons-list/swap/index.tsx index 4022d492e..9073bcf2b 100644 --- a/src/features/swap/components/base/swap-buttons-list/swap/index.tsx +++ b/src/features/swap/components/base/swap-buttons-list/swap/index.tsx @@ -7,7 +7,7 @@ import { COLORS } from '@constants/colors'; import { styles } from '../styles'; import { useSwapContextSelector } from '@features/swap/context'; import { isETHtoWrapped, isWrappedToETH } from '@features/swap/utils'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; +import { cssShadowToNative } from '@utils'; interface SwapButtonProps { isProcessingSwap: boolean; diff --git a/src/features/swap/components/composite/balance/index.tsx b/src/features/swap/components/composite/balance/index.tsx index 381072fff..16e0f8be2 100644 --- a/src/features/swap/components/composite/balance/index.tsx +++ b/src/features/swap/components/composite/balance/index.tsx @@ -3,10 +3,9 @@ import { formatEther } from 'ethers/lib/utils'; import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer, Text } from '@components/base'; import { FIELD, SelectedTokensKeys } from '@features/swap/types'; -import { scale } from '@utils/scaling'; import { useSwapContextSelector } from '@features/swap/context'; import { useSwapBalance, useSwapFieldsHandler } from '@features/swap/lib/hooks'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale } from '@utils'; import { useUSDPrice } from '@hooks'; import { CryptoCurrencyCode } from '@appTypes'; import { COLORS } from '@constants/colors'; diff --git a/src/features/swap/components/composite/preview-information/styles.ts b/src/features/swap/components/composite/preview-information/styles.ts index 487dc7e2d..a197ffaf9 100644 --- a/src/features/swap/components/composite/preview-information/styles.ts +++ b/src/features/swap/components/composite/preview-information/styles.ts @@ -1,5 +1,5 @@ -import { verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/swap/components/composite/settings-slippage-tolerance-form/styles.ts b/src/features/swap/components/composite/settings-slippage-tolerance-form/styles.ts index 456e18dfd..6c1b0584c 100644 --- a/src/features/swap/components/composite/settings-slippage-tolerance-form/styles.ts +++ b/src/features/swap/components/composite/settings-slippage-tolerance-form/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/swap/components/composite/swap-reverse-tokens/index.tsx b/src/features/swap/components/composite/swap-reverse-tokens/index.tsx index cb065f1e8..66e2effe1 100644 --- a/src/features/swap/components/composite/swap-reverse-tokens/index.tsx +++ b/src/features/swap/components/composite/swap-reverse-tokens/index.tsx @@ -11,7 +11,7 @@ import { Divider } from '@/features/swap/components/base'; import { Button, Spacer } from '@components/base'; import { SwapOppositeArrowsIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const SwapReverseTokens = () => { const { onReverseSelectedTokens } = useSwapSelectTokens(); diff --git a/src/features/swap/components/composite/token-selector/index.tsx b/src/features/swap/components/composite/token-selector/index.tsx index 4c79fd16b..59e2f6745 100644 --- a/src/features/swap/components/composite/token-selector/index.tsx +++ b/src/features/swap/components/composite/token-selector/index.tsx @@ -5,7 +5,7 @@ import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { useSwapContextSelector } from '@features/swap/context'; import { SelectedTokensKeys } from '@features/swap/types'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; diff --git a/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx b/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx index 3003f8017..1b1db673c 100644 --- a/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx +++ b/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx @@ -18,7 +18,7 @@ import { useSwapSelectTokens } from '@features/swap/lib/hooks'; import { SwapStringUtils } from '@features/swap/utils'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils } from '@utils'; interface BottomSheetTokenItemProps { token: ListRenderItemInfo['item']; diff --git a/src/features/swap/components/modular/bottom-sheet-token-item/styles.ts b/src/features/swap/components/modular/bottom-sheet-token-item/styles.ts index 863a779bd..1f09c408d 100644 --- a/src/features/swap/components/modular/bottom-sheet-token-item/styles.ts +++ b/src/features/swap/components/modular/bottom-sheet-token-item/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/swap/components/modular/input-with-token-select/index.tsx b/src/features/swap/components/modular/input-with-token-select/index.tsx index 3adedc24e..032b88d52 100644 --- a/src/features/swap/components/modular/input-with-token-select/index.tsx +++ b/src/features/swap/components/modular/input-with-token-select/index.tsx @@ -8,8 +8,7 @@ import { Balance, TokenSelector } from '@features/swap/components/composite'; import { FIELD, SelectedTokensKeys } from '@features/swap/types'; import { useSwapFieldsHandler } from '@features/swap/lib/hooks'; import { useSwapContextSelector } from '@features/swap/context'; -import { NumberUtils } from '@utils/number'; -import { StringUtils } from '@utils/string'; +import { StringUtils, NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; interface InputWithTokenSelectProps { diff --git a/src/features/swap/components/modular/input-with-token-select/styles.ts b/src/features/swap/components/modular/input-with-token-select/styles.ts index 816f25f28..d22c8f7be 100644 --- a/src/features/swap/components/modular/input-with-token-select/styles.ts +++ b/src/features/swap/components/modular/input-with-token-select/styles.ts @@ -1,5 +1,5 @@ -import { moderateScale, scale, verticalScale } from '@utils/scaling'; import { StyleSheet } from 'react-native'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/features/swap/components/modular/review-swap-button/index.tsx b/src/features/swap/components/modular/review-swap-button/index.tsx index e8f0ad41d..c195cb4eb 100644 --- a/src/features/swap/components/modular/review-swap-button/index.tsx +++ b/src/features/swap/components/modular/review-swap-button/index.tsx @@ -9,7 +9,7 @@ import { useSwapMultiplyBalance } from '@features/swap/lib/hooks'; import { buttonActionString } from '@features/swap/utils/button-action.string'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; +import { cssShadowToNative } from '@utils'; import { TextOrSpinner } from '@components/composite'; import { FontFamily } from '@components/base/Text/Text.types'; diff --git a/src/features/swap/components/modular/submit-swap-actions/styles.ts b/src/features/swap/components/modular/submit-swap-actions/styles.ts index 5bc57a92d..264879ac6 100644 --- a/src/features/swap/components/modular/submit-swap-actions/styles.ts +++ b/src/features/swap/components/modular/submit-swap-actions/styles.ts @@ -1,4 +1,4 @@ -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/swap/components/modular/token-info-plate/index.tsx b/src/features/swap/components/modular/token-info-plate/index.tsx index 7fe6f1748..1547caf97 100644 --- a/src/features/swap/components/modular/token-info-plate/index.tsx +++ b/src/features/swap/components/modular/token-info-plate/index.tsx @@ -6,7 +6,7 @@ import { useSwapTokens, useSwapBetterRate } from '@features/swap/lib/hooks'; import { SwapStringUtils, plateVisibility } from '@features/swap/utils'; import { COLORS } from '@constants/colors'; import { StyleProp, ViewStyle } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const TokenInfoPlate = () => { const { _refExactGetter, _refSettingsGetter } = useSwapContextSelector(); diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx index 89b8e720e..28f815331 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx @@ -10,9 +10,7 @@ import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; import { BottomSheetStatus } from '@features/swap/types'; import { COLORS } from '@constants/colors'; import { ErrorIcon } from '@components/svg/icons/v2'; -import { verticalScale } from '@utils/scaling'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; -import { _delayNavigation } from '@utils/navigate'; +import { cssShadowToNative, verticalScale, _delayNavigation } from '@utils'; export const ErrorSwapView = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts index 8d7178007..755d522ed 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx index 21384a3c1..e8b65660b 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx @@ -11,7 +11,7 @@ import { } from '@features/swap/lib/hooks'; import { BottomSheetStatus, FIELD } from '@features/swap/types'; import { isETHtoWrapped, isWrappedToETH } from '@features/swap/utils'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { SuccessSwapView } from './success'; import { ErrorSwapView } from './error'; diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx index 2223be53e..fae8f328c 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx @@ -11,9 +11,7 @@ import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; import { BottomSheetStatus } from '@features/swap/types'; import { COLORS } from '@constants/colors'; import { SuccessIcon } from '@components/svg/icons/v2'; -import { verticalScale } from '@utils/scaling'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; -import { _delayNavigation } from '@utils/navigate'; +import { _delayNavigation, verticalScale, cssShadowToNative } from '@utils'; export const SuccessSwapView = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/styles.ts b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/styles.ts index 4dcd7e112..b51a52bc2 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx index 4da3a0107..80b5cf1c2 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx @@ -4,13 +4,12 @@ import { styles } from './styles'; import { useForwardedRef } from '@hooks'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale, _delayNavigation } from '@utils'; import { useSwapContextSelector } from '@features/swap/context'; import { RenderBottomSheetStatusView } from './components/render'; import { useTranslation } from 'react-i18next'; import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; import { BottomSheetStatus } from '@features/swap/types'; -import { _delayNavigation } from '@utils'; import { CommonActions, useNavigation } from '@react-navigation/native'; import { HomeNavigationProp } from '@appTypes'; diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts b/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts index 0ddaebdc5..1f3f63bca 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx b/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx index adbf2d03d..c294d83aa 100644 --- a/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx @@ -7,7 +7,7 @@ import { Spacer } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { useForwardedRef } from '@hooks'; import Config from '@constants/config'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { BottomSheetTokenItem } from '@features/swap/components/modular'; import { FIELD, SelectedTokensKeys, SwapToken } from '@features/swap/types'; import { useSwapAllBalances } from '@features/swap/lib/hooks/use-swap-all-balances'; diff --git a/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts b/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts index 95721580e..833a2ae1d 100644 --- a/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts @@ -1,4 +1,4 @@ -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/swap/components/templates/swap-form/index.tsx b/src/features/swap/components/templates/swap-form/index.tsx index a5e9eb4d0..b5eacbe61 100644 --- a/src/features/swap/components/templates/swap-form/index.tsx +++ b/src/features/swap/components/templates/swap-form/index.tsx @@ -3,7 +3,7 @@ import { KeyboardAvoidingView, View } from 'react-native'; import { styles } from './styles'; import { KeyboardDismissingView, Spacer } from '@components/base'; import { FIELD } from '@features/swap/types'; -import { scale } from '@utils/scaling'; +import { scale, isIos } from '@utils'; import { InputWithTokenSelect, ReviewSwapButton, @@ -11,7 +11,6 @@ import { } from '@/features/swap/components/modular'; import { SwapReverseTokens } from '@/features/swap/components/composite'; import { useSwapInterface } from '@features/swap/lib/hooks'; -import { isIos } from '@utils/isPlatform'; const KEYBOARD_BEHAVIOR = isIos ? 'padding' : 'height'; diff --git a/src/features/swap/components/templates/swap-form/styles.ts b/src/features/swap/components/templates/swap-form/styles.ts index ea7c25d6f..bb35edc21 100644 --- a/src/features/swap/components/templates/swap-form/styles.ts +++ b/src/features/swap/components/templates/swap-form/styles.ts @@ -1,6 +1,5 @@ import { StyleSheet } from 'react-native'; -import { isAndroid } from '@utils/isPlatform'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale, isAndroid } from '@utils'; export const styles = StyleSheet.create({ container: { flex: 1 }, diff --git a/src/features/swap/context/swap.context.tsx b/src/features/swap/context/swap.context.tsx index 82da15049..9c0c0c768 100644 --- a/src/features/swap/context/swap.context.tsx +++ b/src/features/swap/context/swap.context.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react'; -import { createContextSelector } from '@utils/createContextSelector'; +import { createContextSelector } from '@utils'; import { INITIAL_UI_BOTTOM_SHEET_INFORMATION, INITIAL_SELECTED_TOKENS, diff --git a/src/features/swap/lib/hooks/use-swap-better-currency.ts b/src/features/swap/lib/hooks/use-swap-better-currency.ts index 7b3c343e4..8a4abf870 100644 --- a/src/features/swap/lib/hooks/use-swap-better-currency.ts +++ b/src/features/swap/lib/hooks/use-swap-better-currency.ts @@ -4,7 +4,7 @@ import { extractArrayOfMiddleMultiHopAddresses, dexValidators } from '@features/swap/utils'; -import { getObjectKeyByValue } from '@utils/object'; +import { getObjectKeyByValue } from '@utils'; import { ethers, BigNumber } from 'ethers'; import { getAmountsOut, getAmountsIn } from '../contracts'; import { useSwapContextSelector } from '@features/swap/context'; diff --git a/src/features/swap/lib/hooks/use-swap-settings.ts b/src/features/swap/lib/hooks/use-swap-settings.ts index 65fc0f14b..5606bf2cf 100644 --- a/src/features/swap/lib/hooks/use-swap-settings.ts +++ b/src/features/swap/lib/hooks/use-swap-settings.ts @@ -1,8 +1,7 @@ import { useCallback, useEffect, useRef } from 'react'; import { useSwapContextSelector } from '@features/swap/context'; import { Settings, SettingsKeys } from '@features/swap/types'; -import { NumberUtils } from '@utils/number'; -import { StringUtils } from '@utils/string'; +import { StringUtils, NumberUtils } from '@utils'; export function useSwapSettings() { const { setSettings, _refSettingsGetter } = useSwapContextSelector(); diff --git a/src/features/swap/utils/__tests__/wrap-native-address.spec.ts b/src/features/swap/utils/__tests__/wrap-native-address.spec.ts index 101539003..52ff76fee 100644 --- a/src/features/swap/utils/__tests__/wrap-native-address.spec.ts +++ b/src/features/swap/utils/__tests__/wrap-native-address.spec.ts @@ -1,6 +1,6 @@ import { ethers } from 'ethers'; import { isNativeWrapped, wrapNativeAddress } from '../wrap-native-address'; -import { environment } from '@utils/environment'; +import { environment } from '@utils'; const isTestnet = environment === 'testnet'; diff --git a/src/features/wallet-assets/components/base/account-action-item/styles.ts b/src/features/wallet-assets/components/base/account-action-item/styles.ts index abaf1fa69..d248ea719 100644 --- a/src/features/wallet-assets/components/base/account-action-item/styles.ts +++ b/src/features/wallet-assets/components/base/account-action-item/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { verticalScale, scale } from '@utils/scaling'; +import { verticalScale, scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts b/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts index 502e6c914..1da194413 100644 --- a/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts +++ b/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/wallet-assets/components/templates/header/index.tsx b/src/features/wallet-assets/components/templates/header/index.tsx index a2cb5e001..e1f7c4fac 100644 --- a/src/features/wallet-assets/components/templates/header/index.tsx +++ b/src/features/wallet-assets/components/templates/header/index.tsx @@ -25,11 +25,9 @@ import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { scale } from '@utils/scaling'; import { HomeNavigationProp } from '@appTypes/navigation'; -import { StringUtils } from '@utils/string'; import { ExplorerAccount } from '@models'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, StringUtils, scale } from '@utils'; import { useBarcode, useNewNotificationsCount diff --git a/src/features/wallet-assets/components/templates/header/styles.ts b/src/features/wallet-assets/components/templates/header/styles.ts index a257527df..2026ed396 100644 --- a/src/features/wallet-assets/components/templates/header/styles.ts +++ b/src/features/wallet-assets/components/templates/header/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, moderateScale } from '@utils/scaling'; +import { scale, moderateScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx b/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx index e29da7613..bacfd4fd6 100644 --- a/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx @@ -9,7 +9,7 @@ import { useHandleBottomSheetActions } from '@features/wallet-connect/lib/hooks'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { PrimaryButton, SecondaryButton, diff --git a/src/features/wallet-connect/components/composite/wallet-approval-view/styles.ts b/src/features/wallet-connect/components/composite/wallet-approval-view/styles.ts index 0be971990..529d1a874 100644 --- a/src/features/wallet-connect/components/composite/wallet-approval-view/styles.ts +++ b/src/features/wallet-connect/components/composite/wallet-approval-view/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-connect/components/composite/wallet-connection-failed-view/styles.ts b/src/features/wallet-connect/components/composite/wallet-connection-failed-view/styles.ts index 47c24ec22..fd828d83b 100644 --- a/src/features/wallet-connect/components/composite/wallet-connection-failed-view/styles.ts +++ b/src/features/wallet-connect/components/composite/wallet-connection-failed-view/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/styles.ts b/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/styles.ts index 47c24ec22..fd828d83b 100644 --- a/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/styles.ts +++ b/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx b/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx index 7466a87e1..5977b6a20 100644 --- a/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx @@ -9,7 +9,7 @@ import { import { SessionTypes } from '@walletconnect/types'; import { useWalletConnectContextSelector } from '@features/wallet-connect/lib/hooks'; import { WalletSessionItem } from '../../base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const WalletSessionsList = () => { const { activeSessions } = useWalletConnectContextSelector(); diff --git a/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts b/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts index 6fc9af3dc..99b3b4ef0 100644 --- a/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts +++ b/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx index a129c4af3..27f8ec6cc 100644 --- a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx +++ b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx @@ -11,7 +11,7 @@ import { import { COLORS } from '@constants/colors'; import { CloseCircleIcon } from '@components/svg/icons/v2'; import { WalletSessionsList } from '../../composite'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const WalletSessionsBottomSheet = () => { const { t } = useTranslation(); diff --git a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts index b52a077a6..c4694f27a 100644 --- a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts +++ b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts @@ -1,4 +1,4 @@ -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/features/wallet-connect/context/wallet-connect.context.ts b/src/features/wallet-connect/context/wallet-connect.context.ts index 9cd839188..e9f0df17d 100644 --- a/src/features/wallet-connect/context/wallet-connect.context.ts +++ b/src/features/wallet-connect/context/wallet-connect.context.ts @@ -1,5 +1,5 @@ import { useCallback, useRef, useState } from 'react'; -import { createContextSelector } from '@utils/createContextSelector'; +import { createContextSelector } from '@utils'; import { SessionTypes } from '@walletconnect/types'; import { CONNECT_VIEW_STEPS, diff --git a/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts b/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts index f7ef0dcb7..bc9b6d007 100644 --- a/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts +++ b/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts @@ -14,7 +14,7 @@ import { useHandleBottomSheetActions } from './use-handle-bottom-sheet-actions'; import { AirDAOEventDispatcher } from '@lib'; import { AirDAOEventType } from '@appTypes'; import Config from '@constants/config'; -import { delay } from '@utils/delay'; +import { delay } from '@utils'; export function useWalletKitEventsManager(isWalletKitInitiated: boolean) { const { onShowWalletConnectBottomSheet } = useHandleBottomSheetActions(); diff --git a/src/hooks/cache/useWatchlist.ts b/src/hooks/cache/useWatchlist.ts index c3e786277..0a5035992 100644 --- a/src/hooks/cache/useWatchlist.ts +++ b/src/hooks/cache/useWatchlist.ts @@ -3,7 +3,7 @@ import { useAddressesActions } from '@features/addresses'; import { useAddressesStore } from '@entities/addresses'; import { API } from '@api/api'; import { ExplorerAccount } from '@models/Explorer'; -import { AddressUtils } from '@utils/address'; +import { AddressUtils } from '@utils'; import { CustomAppEvents, diff --git a/src/hooks/query/useAmbrosusStakingPools.ts b/src/hooks/query/useAmbrosusStakingPools.ts index 30540cc5f..62898ff32 100644 --- a/src/hooks/query/useAmbrosusStakingPools.ts +++ b/src/hooks/query/useAmbrosusStakingPools.ts @@ -1,7 +1,7 @@ import { API } from '@api/api'; import { StakingPool, StakingPoolDTO } from '@models'; import { useQuery } from '@tanstack/react-query'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; export function useAmbrosusStakingPools() { const { data, isLoading, isRefetching, error, refetch } = useQuery< diff --git a/src/hooks/query/useEstimatedTransferFee.ts b/src/hooks/query/useEstimatedTransferFee.ts index 1fa284b8d..57c6b8d64 100644 --- a/src/hooks/query/useEstimatedTransferFee.ts +++ b/src/hooks/query/useEstimatedTransferFee.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useState } from 'react'; -import { TransactionUtils } from '@utils/transaction'; +import { TransactionUtils } from '@utils'; import { Token } from '@models'; export const useEstimatedTransferFee = ( diff --git a/src/hooks/query/useTokensAndTransactions.ts b/src/hooks/query/useTokensAndTransactions.ts index c9845666c..8ce7dbfae 100644 --- a/src/hooks/query/useTokensAndTransactions.ts +++ b/src/hooks/query/useTokensAndTransactions.ts @@ -10,7 +10,7 @@ import { AirDAOEventType, AirDAONotificationReceiveEventPayload } from '@appTypes'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; export function useTokensAndTransactions( address: string, diff --git a/src/hooks/query/useTransactionDetails.ts b/src/hooks/query/useTransactionDetails.ts index 56908657b..a1fad86a4 100644 --- a/src/hooks/query/useTransactionDetails.ts +++ b/src/hooks/query/useTransactionDetails.ts @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'; import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { explorerService } from '@api/explorer-service'; import { Transaction } from '@models'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; export function useTransactionDetails(hash: string, enabled = true) { const { data, error, isInitialLoading } = useQuery( diff --git a/src/hooks/query/useTransactionsOfAddress.ts b/src/hooks/query/useTransactionsOfAddress.ts index d5a784e15..ab17c7b03 100644 --- a/src/hooks/query/useTransactionsOfAddress.ts +++ b/src/hooks/query/useTransactionsOfAddress.ts @@ -5,7 +5,7 @@ import { Transaction } from '@models/index'; import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { TransactionType } from '@appTypes/enums'; import { PaginatedResponseBody } from '@appTypes/Pagination'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; export function useTransactionsOfAccount( address: string, diff --git a/src/hooks/query/useTransactionsOfToken.ts b/src/hooks/query/useTransactionsOfToken.ts index d7572c7e4..1d495e969 100644 --- a/src/hooks/query/useTransactionsOfToken.ts +++ b/src/hooks/query/useTransactionsOfToken.ts @@ -4,7 +4,7 @@ import { API } from '@api/api'; import { PaginatedResponseBody } from '@appTypes/Pagination'; import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { Transaction } from '@models'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils } from '@utils'; export function useTransactionsOfToken( address: string, diff --git a/src/hooks/useSettingsWalletActions.ts b/src/hooks/useSettingsWalletActions.ts index 1b05756e2..991fbcb4c 100644 --- a/src/hooks/useSettingsWalletActions.ts +++ b/src/hooks/useSettingsWalletActions.ts @@ -1,6 +1,6 @@ import { CommonActions, useNavigation } from '@react-navigation/native'; import { DatabaseTable, SettingsTabNavigationProp } from '@appTypes'; -import { WalletUtils } from '@utils/wallet'; +import { WalletUtils } from '@utils'; import { API } from '@api/api'; import { Database, WalletDBModel } from '@database'; diff --git a/src/lib/crypto/AirDAOKeys.ts b/src/lib/crypto/AirDAOKeys.ts index aa992cbda..85248649e 100644 --- a/src/lib/crypto/AirDAOKeys.ts +++ b/src/lib/crypto/AirDAOKeys.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -import KeysUtills from '@utils/keys'; + +import { KeysUtils } from '@utils/keys'; const bip32 = require('bip32'); interface CacheRoots { @@ -12,7 +13,7 @@ class AirDAOKeys { async getSeedCached(mnemonic: string) { const mnemonicCache = mnemonic.toLowerCase(); if (typeof CACHE[mnemonicCache] === 'undefined') { - CACHE[mnemonicCache] = await KeysUtills.bip39MnemonicToSeed( + CACHE[mnemonicCache] = await KeysUtils.bip39MnemonicToSeed( mnemonic.toLowerCase() ); } diff --git a/src/models/Token.ts b/src/models/Token.ts index ffca67a01..b7adf84fa 100644 --- a/src/models/Token.ts +++ b/src/models/Token.ts @@ -2,7 +2,7 @@ import { CryptoCurrencyCode } from '@appTypes'; import { TokenDTO } from './dtos'; import { formatUnits } from 'ethers/lib/utils'; import { AMB_DECIMALS } from '@constants/variables'; -import { getTokenNameFromDatabase } from '@utils/getTokenNameFromDatabase'; +import { getTokenNameFromDatabase } from '@utils/get-token-name-from-db'; export class Token { address: string; diff --git a/src/navigation/components/TabBar/index.tsx b/src/navigation/components/TabBar/index.tsx index 9edc66259..aa5ec918e 100644 --- a/src/navigation/components/TabBar/index.tsx +++ b/src/navigation/components/TabBar/index.tsx @@ -2,19 +2,17 @@ import React, { useLayoutEffect, useMemo, useState } from 'react'; import { Pressable, StyleProp, ViewStyle } from 'react-native'; import { BottomTabBarProps } from '@react-navigation/bottom-tabs'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { NavigationUtils } from '@utils/navigation'; import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated'; import { useFocusEffect } from '@react-navigation/native'; import { styles } from './styles'; - import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale, NavigationUtils } from '@utils'; import { MAIN_TABS } from '@navigation/constants'; import { useCurrentRoute } from '@contexts/Navigation/Navigation.context'; diff --git a/src/navigation/components/TabBar/styles.ts b/src/navigation/components/TabBar/styles.ts index 456c260de..2bb0c5e51 100644 --- a/src/navigation/components/TabBar/styles.ts +++ b/src/navigation/components/TabBar/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { isIos } from '@utils/isPlatform'; +import { isIos } from '@utils'; export const styles = StyleSheet.create({ mainContainer: { diff --git a/src/navigation/stacks/AppInit.tsx b/src/navigation/stacks/AppInit.tsx index b9a8c6e31..bc3c591eb 100644 --- a/src/navigation/stacks/AppInit.tsx +++ b/src/navigation/stacks/AppInit.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { useNavigation } from '@react-navigation/native'; import { Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { RootNavigationProp } from '@appTypes'; import { useAllWallets } from '@hooks/database'; import { Cache, CacheKey } from '@lib/cache'; diff --git a/src/navigation/stacks/TabsNavigator.tsx b/src/navigation/stacks/TabsNavigator.tsx index 9b59a4759..96c89a3b3 100644 --- a/src/navigation/stacks/TabsNavigator.tsx +++ b/src/navigation/stacks/TabsNavigator.tsx @@ -9,7 +9,7 @@ import TabBar from '@navigation/components/TabBar'; import { useKeyboardHeight, usePasscodeEntryRevealer } from '@hooks'; import SettingsStack from './Tabs/SettingsStack'; import HomeStack from './Tabs/HomeStack'; -import { DeviceUtils } from '@utils/device'; +import { DeviceUtils } from '@utils'; import ProductsStack from './Tabs/ProductsStack'; const BottomTabs = createBottomTabNavigator(); diff --git a/src/screens/AMBMarket/components/About.tsx b/src/screens/AMBMarket/components/About.tsx index 30cbdbade..450f7f241 100644 --- a/src/screens/AMBMarket/components/About.tsx +++ b/src/screens/AMBMarket/components/About.tsx @@ -10,7 +10,7 @@ import { TelegramIcon, TwitterIcon } from '@components/svg/icons'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; import Config from '@constants/config'; diff --git a/src/screens/AMBMarket/components/DetailedInfo.tsx b/src/screens/AMBMarket/components/DetailedInfo.tsx index 2e0a1273c..df7e55444 100644 --- a/src/screens/AMBMarket/components/DetailedInfo.tsx +++ b/src/screens/AMBMarket/components/DetailedInfo.tsx @@ -9,7 +9,7 @@ import { } from '../AMBMarket.constants'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; type AMBDetailedInfoProps = { [key in InfoKey]: string; diff --git a/src/screens/AMBMarket/components/Market.tsx b/src/screens/AMBMarket/components/Market.tsx index 6d559bce2..9c5d76bd2 100644 --- a/src/screens/AMBMarket/components/Market.tsx +++ b/src/screens/AMBMarket/components/Market.tsx @@ -8,7 +8,7 @@ import { MexcIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; interface MarketItem { title: string; diff --git a/src/screens/AMBMarket/components/PriceInfo.tsx b/src/screens/AMBMarket/components/PriceInfo.tsx index dba7ccc0e..c1fa505b1 100644 --- a/src/screens/AMBMarket/components/PriceInfo.tsx +++ b/src/screens/AMBMarket/components/PriceInfo.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; import { AMBPriceHistory } from '@components/templates'; import { COLORS } from '@constants/colors'; -import { moderateScale, verticalScale } from '@utils/scaling'; +import { moderateScale, verticalScale } from '@utils'; import { LogoGradientCircular } from '@components/svg/icons'; import { Spacer, Text } from '@components/base'; diff --git a/src/screens/AMBMarket/index.tsx b/src/screens/AMBMarket/index.tsx index 8ad131286..77be302ca 100644 --- a/src/screens/AMBMarket/index.tsx +++ b/src/screens/AMBMarket/index.tsx @@ -11,10 +11,9 @@ import { } from './components'; import { Row, Spacer, Text } from '@components/base'; import { CenteredSpinner, Header } from '@components/composite'; -import { NumberUtils } from '@utils/number'; import { COLORS } from '@constants/colors'; import { useAMBPrice } from '@hooks/query'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale, NumberUtils } from '@utils'; const BodyTitle = ({ title }: { title: string }) => ( diff --git a/src/screens/AMBMarket/styles.ts b/src/screens/AMBMarket/styles.ts index bef793d65..4915a1752 100644 --- a/src/screens/AMBMarket/styles.ts +++ b/src/screens/AMBMarket/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Address/index.tsx b/src/screens/Address/index.tsx index fd3d87230..68a8d1b99 100644 --- a/src/screens/Address/index.tsx +++ b/src/screens/Address/index.tsx @@ -17,14 +17,12 @@ import { useTransactionsOfAccount, useWatchlist } from '@hooks'; -import { scale, verticalScale } from '@utils/scaling'; import { CommonStackParamsList } from '@appTypes/navigation/common'; import { BottomSheetEditWallet } from '@components/templates/BottomSheetEditWallet'; import { Toast, ToastPosition, ToastType } from '@components/modular'; import { styles } from './styles'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; -import { StringUtils } from '@utils/string'; +import { StringUtils, NumberUtils, scale, verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; const TRANSACTION_LIMIT = 50; diff --git a/src/screens/Address/styles.ts b/src/screens/Address/styles.ts index 261c2fc4d..1b6593dc5 100644 --- a/src/screens/Address/styles.ts +++ b/src/screens/Address/styles.ts @@ -1,4 +1,4 @@ -import { moderateScale, scale } from '@utils/scaling'; +import { moderateScale, scale } from '@utils'; import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; diff --git a/src/screens/Asset/index.tsx b/src/screens/Asset/index.tsx index 6a46f3970..f43588ba3 100644 --- a/src/screens/Asset/index.tsx +++ b/src/screens/Asset/index.tsx @@ -7,16 +7,19 @@ import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; import { HomeNavigationProp, HomeParamsList } from '@appTypes'; import { Header } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { useAMBPrice, useTokensAndTransactions, useUSDPrice } from '@hooks'; -import { NumberUtils } from '@utils/number'; import { useTransactionsOfToken } from '@hooks/query/useTransactionsOfToken'; import { TokenLogo } from '@components/modular'; import { ChartIcon } from '@components/svg/icons/v2'; -import { StringUtils } from '@utils/string'; +import { + StringUtils, + StringValidators, + NumberUtils, + scale, + verticalScale +} from '@utils'; import { AssetsAccountActionsList } from '@features/wallet-assets/components/modular'; import { AccountTransactions } from '@components/templates'; -import { StringValidators } from '@utils'; export const AssetScreen = () => { const { diff --git a/src/screens/Asset/styles.ts b/src/screens/Asset/styles.ts index fe76dd4c4..fb5164686 100644 --- a/src/screens/Asset/styles.ts +++ b/src/screens/Asset/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ headerContentRightContainer: { diff --git a/src/screens/Bridge/Bridge.tsx b/src/screens/Bridge/Bridge.tsx index 72d00a96d..9b36649ba 100644 --- a/src/screens/Bridge/Bridge.tsx +++ b/src/screens/Bridge/Bridge.tsx @@ -7,11 +7,10 @@ import { CopyToClipboardButton, Header } from '@components/composite'; import { HistoryIcon } from '@components/svg/icons'; import { HomeNavigationProp } from '@appTypes'; import { Spacer, Spinner } from '@components/base'; -import { scale } from '@utils/scaling'; import { useBridgeContextData } from '@features/bridge/context'; import { BridgeTemplate } from '@features/bridge/templates'; import { usePendingTransactions } from '@features/bridge/hooks/usePendingTransactions'; -import { StringUtils } from '@utils/string'; +import { StringUtils, scale } from '@utils'; import { useWalletStore } from '@entities/wallet'; export const Bridge = () => { diff --git a/src/screens/Bridge/BridgeTransferError/BridgeTransferError.styles.tsx b/src/screens/Bridge/BridgeTransferError/BridgeTransferError.styles.tsx index 6553417cb..40e3c141c 100644 --- a/src/screens/Bridge/BridgeTransferError/BridgeTransferError.styles.tsx +++ b/src/screens/Bridge/BridgeTransferError/BridgeTransferError.styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx b/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx index 3c35322ba..2b01a5725 100644 --- a/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx +++ b/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx @@ -3,7 +3,7 @@ import { styles } from './BridgeTransferError.styles'; import { PrimaryButton, SecondaryButton } from '@components/modular'; import { InfoIcon } from '@components/svg/icons'; import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep0/Step0.styles.tsx b/src/screens/CreateWallet/screens/CreateWalletStep0/Step0.styles.tsx index c6179605f..7318d800d 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep0/Step0.styles.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep0/Step0.styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const stylesStep0 = StyleSheet.create({ flexStyle: { flex: 1, alignItems: 'center' }, diff --git a/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx b/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx index ec7464f1f..c3ac777f4 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx @@ -10,7 +10,7 @@ import { } from '@components/composite'; import { Button, Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { styles } from '@screens/CreateWallet/styles'; import { stylesStep0 } from './Step0.styles'; import { SettingsTabNavigationProp } from '@appTypes'; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts b/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts index bdca6dc40..1bd38dc13 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts +++ b/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx b/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx index d4790e008..4cc14567c 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx @@ -12,8 +12,7 @@ import { useTranslation } from 'react-i18next'; import { styles } from './Step1.styles'; import { Spacer, Spinner, Text } from '@components/base'; import { BottomAwareSafeAreaView, Header } from '@components/composite'; -import { MnemonicUtils } from '@utils/mnemonics'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale, MnemonicUtils } from '@utils'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; import { HomeNavigationProp } from '@appTypes'; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx index 53dd27006..7a018f369 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx @@ -1,6 +1,6 @@ import { Button, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import React from 'react'; import { StyleSheet } from 'react-native'; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx index 96fbb44d7..453ae3d2c 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx @@ -1,6 +1,6 @@ import { Button, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import React from 'react'; import { StyleSheet } from 'react-native'; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx index e27f938f9..1b6addeed 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx index 286d89c84..84ce6d8e7 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx @@ -5,9 +5,8 @@ import { CommonActions, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; import { BottomAwareSafeAreaView, Header } from '@components/composite'; import { Button, Row, Spacer, Text, Spinner } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale, WalletUtils } from '@utils'; import { COLORS } from '@constants/colors'; -import { WalletUtils } from '@utils/wallet'; import { HomeNavigationProp } from '@appTypes'; import { MnemonicRandom } from './MnemonicRandom'; import { MnemonicSelected } from './MnemonicSelected'; diff --git a/src/screens/CreateWallet/styles.ts b/src/screens/CreateWallet/styles.ts index 500898dbe..9a5e8a5e2 100644 --- a/src/screens/CreateWallet/styles.ts +++ b/src/screens/CreateWallet/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/Harbor/ProcessStake/ProcessStake.tsx b/src/screens/Harbor/ProcessStake/ProcessStake.tsx index 9c32ac9ef..7ccb810bb 100644 --- a/src/screens/Harbor/ProcessStake/ProcessStake.tsx +++ b/src/screens/Harbor/ProcessStake/ProcessStake.tsx @@ -18,7 +18,6 @@ import Animated, { import { BottomSheetRef, Header } from '@components/composite'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; import { HarborTitle, RateInfo, StakedBalanceInfo } from './components'; import { styles } from './styles'; import { useWalletStore } from '@entities/wallet'; @@ -27,13 +26,11 @@ import { InputWithoutTokenSelect } from '@components/templates'; import { ExplorerAccount, Token } from '@models'; import { AMB_DECIMALS, DEVICE_HEIGHT } from '@constants/variables'; import { CryptoCurrencyCode } from '@appTypes'; -import { TokenUtils } from '@utils/token'; import { PrimaryButton } from '@components/modular'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; -import { NumberUtils } from '@utils/number'; import { DEFAULT_STAKE_PREVIEW } from '@entities/harbor/constants'; import { BottomSheetHarborPreView } from '@features/harbor/components/harbor-preview'; -import { isSmallScreen } from '@utils/deviceSpecification'; +import { isSmallScreen, scale, NumberUtils, TokenUtils } from '@utils'; export const ProcessStake = () => { const { top } = useSafeAreaInsets(); diff --git a/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx b/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx index bc1cc485e..4cfce34c6 100644 --- a/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx +++ b/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { StakeHeaderIcon } from '../StakedHeaderIcon'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const HarborTitle = ({ harborAPR }: { harborAPR: string }) => { const { t } = useTranslation(); diff --git a/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx b/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx index 316864443..847f42661 100644 --- a/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx +++ b/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx @@ -3,8 +3,7 @@ import { Row, Spacer, Text } from '@components/base'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { styles } from './styles'; -import { NumberUtils } from '@utils/number'; -import { scale } from '@utils/scaling'; +import { scale, NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; import { CryptoCurrencyCode } from '@appTypes'; diff --git a/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx b/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx index 82399d4fe..df0e0539e 100644 --- a/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx +++ b/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { contentBox } from '@components/styles'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx index 80baa4960..65c7389d8 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx @@ -1,10 +1,9 @@ import React from 'react'; import { Row, Spacer, Text } from '@components/base'; import { StakedBalanceIcon } from '@components/svg/icons/v2/harbor'; -import { scale } from '@utils/scaling'; import { TokenLogo } from '@components/modular'; import { styles } from './styles'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale } from '@utils'; interface StakedBalanceInfoModel { stakedValue: string; diff --git a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx index bacd6efbb..df69ff80c 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { contentBox } from '@components/styles'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx b/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx index 503943bad..77b486cd1 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { APYHeaderIcon } from '@components/svg/icons/v2/harbor'; import { styles } from './styles'; diff --git a/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/styles.tsx b/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/styles.tsx index a52143743..05d291d5a 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/styles.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Harbor/ProcessStake/styles.tsx b/src/screens/Harbor/ProcessStake/styles.tsx index b50d2bcd3..c52555f17 100644 --- a/src/screens/Harbor/ProcessStake/styles.tsx +++ b/src/screens/Harbor/ProcessStake/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx b/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx index 523316723..b2cce47eb 100644 --- a/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx +++ b/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx @@ -11,8 +11,7 @@ import { useEffectOnce, useKeyboardHeight } from '@hooks'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { useWalletStore } from '@entities/wallet'; import { HarborWithdrawTabs } from '@features/harbor/components/tabs'; -import { scale } from '@utils/scaling'; -import { isSmallScreen } from '@utils/deviceSpecification'; +import { isSmallScreen, scale } from '@utils'; import { DEVICE_HEIGHT } from '@constants/variables'; import { styles } from './styles'; diff --git a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.style.tsx b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.style.tsx index e0150cf9c..cc1fa4311 100644 --- a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.style.tsx +++ b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.style.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ loader: { diff --git a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx index 6ff49e4f3..af5573149 100644 --- a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx +++ b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx @@ -16,8 +16,7 @@ import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { TokenLogo } from '@components/modular'; import { CryptoCurrencyCode } from '@appTypes'; -import { scale } from '@utils/scaling'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, scale } from '@utils'; import { styles } from './WithdrawRequests.style'; import { useEffectOnce } from '@hooks'; import { useFocusEffect } from '@react-navigation/native'; diff --git a/src/screens/ImportWalletMethods/index.tsx b/src/screens/ImportWalletMethods/index.tsx index e5596b757..6fda2e3ba 100644 --- a/src/screens/ImportWalletMethods/index.tsx +++ b/src/screens/ImportWalletMethods/index.tsx @@ -6,7 +6,7 @@ import { styles } from './styles'; import { Header } from '@components/composite'; import { Button, Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { HomeParamsList } from '@appTypes'; import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { Edit, Key } from '@components/svg/icons/v2'; diff --git a/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx b/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx index aa50a2bd1..8b9d2259d 100644 --- a/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx +++ b/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx @@ -21,12 +21,15 @@ import { Spinner, Text } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { HomeNavigationProp } from '@appTypes'; -import { MnemonicUtils } from '@utils/mnemonics'; -import { StringUtils } from '@utils/string'; -import { WalletUtils } from '@utils/wallet'; +import { + WalletUtils, + StringUtils, + MnemonicUtils, + scale, + verticalScale +} from '@utils'; import { Toast, ToastType } from '@components/modular'; import { usePasscodeStore } from '@features/passcode'; import { RenderWords } from '@screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord'; diff --git a/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx b/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx index 5eac4faff..2124b53ca 100644 --- a/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx +++ b/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx @@ -1,7 +1,7 @@ import React, { MutableRefObject, RefObject, useCallback } from 'react'; import { View, FlatList } from 'react-native'; import { styles } from './style'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { InputRef, Text } from '@components/base'; import { InputWithIcon } from '@components/composite'; import { COLORS } from '@constants/colors'; diff --git a/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/style.tsx b/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/style.tsx index a62791e78..5a6539a41 100644 --- a/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/style.tsx +++ b/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/style.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/ImportWalletMethods/screens/ImportWallet/styles.ts b/src/screens/ImportWalletMethods/screens/ImportWallet/styles.ts index 4c2ca292e..17cb92808 100644 --- a/src/screens/ImportWalletMethods/screens/ImportWallet/styles.ts +++ b/src/screens/ImportWalletMethods/screens/ImportWallet/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx b/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx index d77b8bf0d..e0e230a4d 100644 --- a/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx +++ b/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx @@ -19,17 +19,20 @@ import { Spinner, Text } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; -import { WalletUtils } from '@utils/wallet'; import { COLORS } from '@constants/colors'; import { LeadEyeEmptyMiddleIcon, LeadEyeOffIcon } from '@components/svg/icons'; import { PrivateKeyMaskedInput, Toast, ToastType } from '@components/modular'; -import { isIos } from '@utils/isPlatform'; -import { delay } from '@utils/delay'; import { useAllAccounts } from '@hooks/database'; import { usePasscodeStore } from '@features/passcode'; import { HomeNavigationProp } from '@appTypes'; -import { StringUtils } from '@utils/string'; +import { + StringUtils, + isIos, + scale, + verticalScale, + delay, + WalletUtils +} from '@utils'; const KEYBOARD_BEHAVIOR: KeyboardAvoidingViewProps['behavior'] = isIos ? 'padding' diff --git a/src/screens/ImportWalletMethods/screens/PrivateKey/styles.ts b/src/screens/ImportWalletMethods/screens/PrivateKey/styles.ts index 0b906948f..c3b65b6bc 100644 --- a/src/screens/ImportWalletMethods/screens/PrivateKey/styles.ts +++ b/src/screens/ImportWalletMethods/screens/PrivateKey/styles.ts @@ -1,6 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; -import { isAndroid } from '@utils/isPlatform'; +import { scale, verticalScale, isAndroid } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/ImportWalletMethods/styles.ts b/src/screens/ImportWalletMethods/styles.ts index 8cb29109d..bc791086f 100644 --- a/src/screens/ImportWalletMethods/styles.ts +++ b/src/screens/ImportWalletMethods/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/Kosmos/screens/KosmosMarket/index.tsx b/src/screens/Kosmos/screens/KosmosMarket/index.tsx index 302ca8d80..15ae0cb73 100644 --- a/src/screens/Kosmos/screens/KosmosMarket/index.tsx +++ b/src/screens/Kosmos/screens/KosmosMarket/index.tsx @@ -29,7 +29,7 @@ import { MarketChartsWithTimeframes } from '@features/kosmos/components/templates'; import { isIOS } from 'react-native-popover-view/dist/Constants'; -import { isAndroid } from '@utils/isPlatform'; +import { isAndroid, verticalScale } from '@utils'; import { useUpdateScreenData } from '@hooks/useUpdateScreenData'; import { DEVICE_HEIGHT } from '@constants/variables'; import { @@ -39,7 +39,6 @@ import { } from '@entities/kosmos'; import { useChartStore } from '@features/kosmos'; import { Spacer } from '@components/base'; -import { verticalScale } from '@utils/scaling'; type KosmosMarketScreenProps = NativeStackScreenProps< HomeParamsList, diff --git a/src/screens/Kosmos/styles.ts b/src/screens/Kosmos/styles.ts index 138f9dc6a..accd0a022 100644 --- a/src/screens/Kosmos/styles.ts +++ b/src/screens/Kosmos/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/NoWallet/index.tsx b/src/screens/NoWallet/index.tsx index 159a4ac5b..cfdc3c20c 100644 --- a/src/screens/NoWallet/index.tsx +++ b/src/screens/NoWallet/index.tsx @@ -10,7 +10,7 @@ import { BottomAwareSafeAreaView } from '@components/composite'; import { Spacer, Text } from '@components/base'; import { RootNavigationProp } from '@appTypes'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { useAddWalletStore } from '@features/add-wallet'; export const NoWalletScreen = () => { diff --git a/src/screens/NoWallet/styles.ts b/src/screens/NoWallet/styles.ts index aa5dae926..06141da11 100644 --- a/src/screens/NoWallet/styles.ts +++ b/src/screens/NoWallet/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/Notifications/components/Header.tsx b/src/screens/Notifications/components/Header.tsx index 783936962..6e8a33764 100644 --- a/src/screens/Notifications/components/Header.tsx +++ b/src/screens/Notifications/components/Header.tsx @@ -3,7 +3,7 @@ import { StyleSheet } from 'react-native'; import { Button, Row, Spacer } from '@components/base'; import { Header } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { moderateScale } from '@utils/scaling'; +import { moderateScale } from '@utils'; import { useTranslation } from 'react-i18next'; import { SettingsOutlineIcon } from '@components/svg/icons/v2'; diff --git a/src/screens/Notifications/components/notification-box/index.tsx b/src/screens/Notifications/components/notification-box/index.tsx index d8c7f04d5..ed88ecd43 100644 --- a/src/screens/Notifications/components/notification-box/index.tsx +++ b/src/screens/Notifications/components/notification-box/index.tsx @@ -8,8 +8,7 @@ import { Notification, NotificationWithPriceChange } from '@models/Notification'; -import { scale, verticalScale } from '@utils/scaling'; -import { NumberUtils } from '@utils/number'; +import { scale, verticalScale, NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; interface NotificationBoxProps { diff --git a/src/screens/Notifications/components/notification-box/styles.ts b/src/screens/Notifications/components/notification-box/styles.ts index 71535ffec..6f0b614c6 100644 --- a/src/screens/Notifications/components/notification-box/styles.ts +++ b/src/screens/Notifications/components/notification-box/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Notifications/index.tsx b/src/screens/Notifications/index.tsx index 048660d2c..3fe8b94f6 100644 --- a/src/screens/Notifications/index.tsx +++ b/src/screens/Notifications/index.tsx @@ -15,11 +15,10 @@ import { NotificationSettingsView } from '@components/templates'; import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; import { Spacer, Text } from '@components/base'; import { Notification } from '@models/Notification'; -import { verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { BellIcon } from '@components/svg/icons'; import { useNotificationsQuery } from '@hooks/query'; -import { DeviceUtils } from '@utils/device'; +import { DeviceUtils, verticalScale } from '@utils'; import { NotificationBox, NotificationsHeader } from './components'; import { styles } from './styles'; diff --git a/src/screens/Notifications/styles.ts b/src/screens/Notifications/styles.ts index 8e263b87b..603c499f0 100644 --- a/src/screens/Notifications/styles.ts +++ b/src/screens/Notifications/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/PasscodeEntry/index.tsx b/src/screens/PasscodeEntry/index.tsx index 77d328570..330b652df 100644 --- a/src/screens/PasscodeEntry/index.tsx +++ b/src/screens/PasscodeEntry/index.tsx @@ -7,12 +7,10 @@ import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; import { Passcode } from '@components/modular'; import { Spacer, Text } from '@components/base'; import { useAppState, usePreventGoingBack } from '@hooks'; -import { verticalScale } from '@utils/scaling'; -import { PasscodeUtils } from '@utils/passcode'; import { COLORS } from '@constants/colors'; import { CommonStackParamsList, RootNavigationProp } from '@appTypes'; import { Cache, CacheKey } from '@lib/cache'; -import { DeviceUtils } from '@utils/device'; +import { DeviceUtils, PasscodeUtils, verticalScale } from '@utils'; import { Header } from '@components/composite'; import { usePasscodeStore } from '@features/passcode'; diff --git a/src/screens/SendFunds/components/address-input/index.tsx b/src/screens/SendFunds/components/address-input/index.tsx index d83bab672..3f93dfcac 100644 --- a/src/screens/SendFunds/components/address-input/index.tsx +++ b/src/screens/SendFunds/components/address-input/index.tsx @@ -12,9 +12,7 @@ import { styles } from './styles'; import { Input, InputRef, Text } from '@components/base'; import { DEVICE_WIDTH } from '@constants/variables'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; - -import { isAndroid } from '@utils/isPlatform'; +import { isAndroid, StringUtils } from '@utils'; interface AddressInputProps { address: string; diff --git a/src/screens/SendFunds/components/address-input/styles.ts b/src/screens/SendFunds/components/address-input/styles.ts index 2792bd5e0..6c3a25787 100644 --- a/src/screens/SendFunds/components/address-input/styles.ts +++ b/src/screens/SendFunds/components/address-input/styles.ts @@ -1,4 +1,4 @@ -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/SendFunds/components/confirm-tx/index.tsx b/src/screens/SendFunds/components/confirm-tx/index.tsx index d8d7cf263..ca64201de 100644 --- a/src/screens/SendFunds/components/confirm-tx/index.tsx +++ b/src/screens/SendFunds/components/confirm-tx/index.tsx @@ -7,16 +7,18 @@ import { styles } from './styles'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { PrimaryButton, SecondaryButton, TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; import { AddressRowWithAction } from '@components/templates/ExplorerAccount/components'; -import { NumberUtils } from '@utils/number'; -import { cssShadowToNative } from '@utils/css-shadow-to-native'; +import { + cssShadowToNative, + verticalScale, + NumberUtils, + _delayNavigation +} from '@utils'; import { BottomSheetErrorView, BottomSheetSuccessView } from '@components/base/BottomSheetStatusView'; import { useSendFundsStore } from '@features/send-funds'; -import { _delayNavigation } from '@utils'; import { HomeNavigationProp } from '@appTypes'; interface ConfirmTransactionProps { diff --git a/src/screens/SendFunds/components/confirm-tx/styles.ts b/src/screens/SendFunds/components/confirm-tx/styles.ts index c2e72020a..88eb3bf75 100644 --- a/src/screens/SendFunds/components/confirm-tx/styles.ts +++ b/src/screens/SendFunds/components/confirm-tx/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; diff --git a/src/screens/SendFunds/components/estimated-fee/index.tsx b/src/screens/SendFunds/components/estimated-fee/index.tsx index 336499cfe..43d64ce24 100644 --- a/src/screens/SendFunds/components/estimated-fee/index.tsx +++ b/src/screens/SendFunds/components/estimated-fee/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { LogoGradientCircular } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; diff --git a/src/screens/SendFunds/components/show-usd-currency/index.tsx b/src/screens/SendFunds/components/show-usd-currency/index.tsx index 0236afc6f..77b08232e 100644 --- a/src/screens/SendFunds/components/show-usd-currency/index.tsx +++ b/src/screens/SendFunds/components/show-usd-currency/index.tsx @@ -3,8 +3,7 @@ import { StyleSheet, View } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; import { SwapIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; -import { NumberUtils } from '@utils/number'; +import { scale, verticalScale, NumberUtils } from '@utils'; interface ShowInUSDProps { usdAmount: number; diff --git a/src/screens/SendFunds/components/use-max-button/index.tsx b/src/screens/SendFunds/components/use-max-button/index.tsx index 8545c7c83..6be202113 100644 --- a/src/screens/SendFunds/components/use-max-button/index.tsx +++ b/src/screens/SendFunds/components/use-max-button/index.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { StyleSheet, View } from 'react-native'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const UseMax = () => { const { t } = useTranslation(); diff --git a/src/screens/SendFunds/index.tsx b/src/screens/SendFunds/index.tsx index 93aee80f3..1a568d74e 100644 --- a/src/screens/SendFunds/index.tsx +++ b/src/screens/SendFunds/index.tsx @@ -16,14 +16,17 @@ import { KeyboardDismissingView, Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; import { useEstimatedTransferFee, useTokensAndTransactions } from '@hooks'; -import { verticalScale } from '@utils/scaling'; import { AirDAOEventType, CryptoCurrencyCode, HomeParamsList } from '@appTypes'; import { ethereumAddressRegex } from '@constants/regex'; import { AddressInput, ConfirmTransaction } from './components'; import { AirDAOEventDispatcher } from '@lib'; import { Token } from '@models'; -import { TransactionUtils } from '@utils/transaction'; -import { NumberUtils } from '@utils/number'; +import { + NumberUtils, + TransactionUtils, + verticalScale, + _delayNavigation +} from '@utils'; import { styles } from './styles'; import { @@ -40,7 +43,6 @@ import { AmountSelectionKeyboardExtend } from '@features/send-funds/components/m import { FundsHeader } from '@features/send-funds/components/templates'; import { useWalletStore } from '@entities/wallet'; import { useSendFundsStore } from '@features/send-funds'; -import { _delayNavigation } from '@utils'; type Props = NativeStackScreenProps; diff --git a/src/screens/SendFunds/styles.ts b/src/screens/SendFunds/styles.ts index 3f1a652f1..a21c82f9f 100644 --- a/src/screens/SendFunds/styles.ts +++ b/src/screens/SendFunds/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx index f4d6f160e..8ac9248e1 100644 --- a/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx @@ -5,7 +5,7 @@ import { useNavigation } from '@react-navigation/native'; import { Button, Row, Spacer, Text } from '@components/base'; import { SettingsTabNavigationProp } from '@appTypes'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import Config from '@constants/config'; import { SETTINGS_MENU_ITEMS, SOCIAL_GROUPS } from './Settings.constants'; import { SettingsMenuItem } from './Settings.types'; diff --git a/src/screens/Settings/screens/About/index.tsx b/src/screens/Settings/screens/About/index.tsx index b5e51867c..407f97725 100644 --- a/src/screens/Settings/screens/About/index.tsx +++ b/src/screens/Settings/screens/About/index.tsx @@ -4,10 +4,9 @@ import { useTranslation } from 'react-i18next'; import { Header } from '@components/composite'; import { AboutMenutItem } from './About.MenuItem'; import { Button, Spacer, Text } from '@components/base'; -import { PlatformSpecificUtils } from '@utils/platform'; import { styles } from './styles'; import { Linking, View } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale, PlatformSpecificUtils } from '@utils'; import * as Updates from 'expo-updates'; import Constants from 'expo-constants'; diff --git a/src/screens/Settings/screens/About/styles.ts b/src/screens/Settings/screens/About/styles.ts index 4ec488a7c..c61a5f56c 100644 --- a/src/screens/Settings/screens/About/styles.ts +++ b/src/screens/Settings/screens/About/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx b/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx index 9dd969e25..01f4e163e 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx +++ b/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx @@ -10,7 +10,7 @@ import { useTranslation } from 'react-i18next'; import { styles } from './styles'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import AirDAOKeysStorage from '@lib/crypto/AirDAOKeysStorage'; interface AccessKeysMnemonicProps { diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/styles.ts b/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/styles.ts index fa38677d4..9cc0d1041 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/styles.ts +++ b/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx b/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx index b5f0e1b5d..692e21f8e 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx +++ b/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx @@ -5,7 +5,7 @@ import { styles } from './styles'; import { Cache, CacheKey } from '@lib/cache'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { CopyToClipboardButton } from '@components/composite'; interface AccessKeysPrivateProps { diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts b/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts index 013986b84..d168f0c99 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts +++ b/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx b/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx index 913838c7f..69872a05b 100644 --- a/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { AppPreference } from '../AppPrefrences.types'; import { Row, Spacer, Text } from '@components/base'; import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const AppPreferencesMenuItem = (props: AppPreference) => { diff --git a/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx b/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx index 1964232e1..61b6f41a1 100644 --- a/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx @@ -5,7 +5,7 @@ import { Row, Text } from '@components/base'; import { RadioButton } from '@components/base/RadioButton'; import { COLORS } from '@constants/colors'; import { Currency, Language } from '@appTypes'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; type Props = { item: Language | Currency; diff --git a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx index 50afaa68e..82a66ac08 100644 --- a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx @@ -6,7 +6,7 @@ import { useForwardedRef } from '@hooks/useForwardedRef'; import { SettingsModalItem } from '@screens/Settings/screens/AppPreferences/components/SettingsModalItem'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { useTranslation } from 'react-i18next'; import { Currency } from '@appTypes'; import { styles } from '../style'; diff --git a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx index 2636f71cc..f79d21d20 100644 --- a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx @@ -7,10 +7,9 @@ import { Spacer, Text } from '@components/base'; import { useForwardedRef } from '@hooks/useForwardedRef'; import { SettingsModalItem } from '@screens/Settings/screens/AppPreferences/components/SettingsModalItem'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; import useLocalization from '@contexts/Localizations'; import { Language } from '@appTypes'; -import { LocalizationUtils } from '@utils/localization'; +import { LocalizationUtils, scale } from '@utils'; import { styles } from '../style'; type Props = { diff --git a/src/screens/Settings/screens/AppPreferences/components/modals/style.ts b/src/screens/Settings/screens/AppPreferences/components/modals/style.ts index a40b92b36..aaf908304 100644 --- a/src/screens/Settings/screens/AppPreferences/components/modals/style.ts +++ b/src/screens/Settings/screens/AppPreferences/components/modals/style.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/Settings/screens/AppPreferences/index.tsx b/src/screens/Settings/screens/AppPreferences/index.tsx index 76ffb18f5..26b5f05e2 100644 --- a/src/screens/Settings/screens/AppPreferences/index.tsx +++ b/src/screens/Settings/screens/AppPreferences/index.tsx @@ -8,14 +8,11 @@ import { BottomSheetSelectLanguage } from './components'; import { Currency, Language } from '@appTypes'; -import { verticalScale } from '@utils/scaling'; import { styles } from './styles'; import useLocalization from '@contexts/Localizations'; -import { LocalizationUtils } from '@utils/localization'; +import { LocalizationUtils, verticalScale } from '@utils'; import { View } from 'react-native'; -// hide currency list - export const AppPreferencesScreen = () => { const { t } = useTranslation(); const { currentLanguage } = useLocalization(); diff --git a/src/screens/Settings/screens/AppPreferences/styles.ts b/src/screens/Settings/screens/AppPreferences/styles.ts index 5c48ab763..009ce9264 100644 --- a/src/screens/Settings/screens/AppPreferences/styles.ts +++ b/src/screens/Settings/screens/AppPreferences/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Settings/screens/ChangePasscode/index.tsx b/src/screens/Settings/screens/ChangePasscode/index.tsx index 666d887d5..397709dea 100644 --- a/src/screens/Settings/screens/ChangePasscode/index.tsx +++ b/src/screens/Settings/screens/ChangePasscode/index.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Button, Spacer, Text } from '@components/base'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useNavigation } from '@react-navigation/native'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { Alert, View } from 'react-native'; import { SettingsTabNavigationProp } from '@appTypes'; import { Passcode, Toast, ToastPosition, ToastType } from '@components/modular'; diff --git a/src/screens/Settings/screens/ChangePasscode/styles.tsx b/src/screens/Settings/screens/ChangePasscode/styles.tsx index af26625e2..46bedc705 100644 --- a/src/screens/Settings/screens/ChangePasscode/styles.tsx +++ b/src/screens/Settings/screens/ChangePasscode/styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Settings/screens/Explore/components/WalletItem.tsx b/src/screens/Settings/screens/Explore/components/WalletItem.tsx index 0b34d3a6d..1624fab85 100644 --- a/src/screens/Settings/screens/Explore/components/WalletItem.tsx +++ b/src/screens/Settings/screens/Explore/components/WalletItem.tsx @@ -3,9 +3,7 @@ import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { ExplorerAccount } from '@models/Explorer'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale, StringUtils, NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; import { useWatchlist } from '@hooks'; import { AddressIndicator } from '@components/templates'; diff --git a/src/screens/Settings/screens/Explore/index.tsx b/src/screens/Settings/screens/Explore/index.tsx index a73c70fe2..f2b0ad53b 100644 --- a/src/screens/Settings/screens/Explore/index.tsx +++ b/src/screens/Settings/screens/Explore/index.tsx @@ -39,7 +39,7 @@ import { } from '@components/base'; import { SearchAddress, SearchAddressRef } from '@components/templates'; import { useExplorerAccounts, useExplorerInfo } from '@hooks/query'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { ExplorerAccount } from '@models/Explorer'; import { SearchTabNavigationProp, diff --git a/src/screens/Settings/screens/Explore/styles.ts b/src/screens/Settings/screens/Explore/styles.ts index 9a171915b..e2bfb4edb 100644 --- a/src/screens/Settings/screens/Explore/styles.ts +++ b/src/screens/Settings/screens/Explore/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx b/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx index 4df2805ca..4857b3600 100644 --- a/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx +++ b/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx @@ -8,7 +8,7 @@ import { AllWallets } from './components'; import { Button } from '@components/base'; import { AddIcon } from '@components/svg/icons'; import { BottomSheetWalletCreateOrImport } from '@components/templates'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const ManageWalletsScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx b/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx index 131911caf..9e670a80d 100644 --- a/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx +++ b/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx @@ -4,7 +4,7 @@ import { useFocusEffect, useNavigation } from '@react-navigation/native'; import { WalletDBModel } from '@database'; import { useAllAccounts, useAllWallets } from '@hooks/database'; import { Button } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { SettingsTabNavigationProp } from '@appTypes'; import { WalletItem } from './Wallet'; diff --git a/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx b/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx index 802efc732..758e89b0e 100644 --- a/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx +++ b/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx @@ -3,9 +3,8 @@ import { Image, StyleSheet } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; import { COLORS, CreditCardBg } from '@constants/colors'; import { WalletDBModel } from '@database'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; import { WalletIcon } from '@components/svg/icons/v2'; -import { StringUtils } from '@utils/string'; +import { StringUtils, moderateScale, scale, verticalScale } from '@utils'; interface WalletItemProps { wallet: WalletDBModel; diff --git a/src/screens/Settings/screens/SecuritySettings/index.tsx b/src/screens/Settings/screens/SecuritySettings/index.tsx index 7fb150a8e..7ddbe803f 100644 --- a/src/screens/Settings/screens/SecuritySettings/index.tsx +++ b/src/screens/Settings/screens/SecuritySettings/index.tsx @@ -7,7 +7,7 @@ import { useNavigation } from '@react-navigation/native'; import { Header } from '@components/composite'; import { Button, Row, Spacer, Switch, Text } from '@components/base'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import { SettingsTabNavigationProp } from '@appTypes'; import { useSupportedBiometrics } from '@hooks'; diff --git a/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx b/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx index e1879f057..f30eb7c08 100644 --- a/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx +++ b/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx @@ -10,7 +10,7 @@ import { Header } from '@components/composite'; import { Button, Input, Spacer, Text } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { QRCodeWithLogo } from '@components/modular'; import { SettingsTabParamsList } from '@appTypes'; import { useExplorerAccountFromHash, useSettingsWalletActions } from '@hooks'; diff --git a/src/screens/Settings/screens/SingleWallet/styles.ts b/src/screens/Settings/screens/SingleWallet/styles.ts index 4c796fa0c..a97805db9 100644 --- a/src/screens/Settings/screens/SingleWallet/styles.ts +++ b/src/screens/Settings/screens/SingleWallet/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ diff --git a/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx b/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx index 68403f135..a8c75456d 100644 --- a/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx @@ -3,10 +3,9 @@ import { BottomSheetRef } from '@components/composite'; import { Button, Spacer, Text } from '@components/base'; import { useForwardedRef } from '@hooks'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; import { AccountList } from '@models'; import { BottomSheetFloat } from '@components/modular'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale, StringUtils } from '@utils'; import { styles } from './styles'; type Props = { diff --git a/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/styles.ts b/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/styles.ts index 52f3a0824..2e7da70b7 100644 --- a/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/styles.ts +++ b/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ icon: { diff --git a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/styles.ts b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/styles.ts index 23ca66b47..f178a3638 100644 --- a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/styles.ts +++ b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { moderateScale, scale } from '@utils/scaling'; +import { moderateScale, scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx index 71ecf6c9e..f6d2549d2 100644 --- a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { FlatList, View } from 'react-native'; import { AccountList } from '@models/AccountList'; import { LocalizedRenderEmpty } from '@components/templates'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { GroupItem } from '../ListsOfAddressGroup/components/GroupItem'; import { styles } from './styles'; diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx index ba2d317e8..be19b85ac 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx @@ -2,7 +2,7 @@ import { View } from 'react-native'; import React from 'react'; import { styles } from './styles'; import { Spinner } from '@components/base'; -import { sortListByKey } from '@utils/sort'; +import { sortListByKey } from '@utils'; import { ListsGroups } from '@screens/Settings/screens/Watchlist/components/ListsOfAddressGroup'; import { useAddressesStore, useFetchAddresses } from '@entities/addresses'; import { useListsSelector } from '@entities/lists'; diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/styles.ts b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/styles.ts index d67dc1110..ea781e73b 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/styles.ts +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx index 106b1d5a9..890926388 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx @@ -5,7 +5,7 @@ import { useAddressesStore, useFetchAddresses } from '@entities/addresses'; import { useWatchlist } from '@hooks'; import { AddressList } from '@components/templates'; import { Spinner } from '@components/base'; -import { sortListByKey } from '@utils/sort'; +import { sortListByKey } from '@utils'; export const WatchList = () => { const { watchlist } = useWatchlist(); diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/styles.ts b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/styles.ts index bba131114..b362a95c1 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/styles.ts +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx index 8bb8e7fb2..17143f366 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx @@ -18,7 +18,7 @@ import { styles } from './styles'; import { useListActions } from '@features/lists'; import { Button, Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { PortfolioScreenTabItem } from './components/PortfolioScreenTabItem'; import { PortfolioScreenTabIndicator } from './components/PortfolioScreenTabIndicator'; import { Measure } from './components/types'; diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/styles.ts b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/styles.ts index 9a79a0123..86080f287 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/styles.ts +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/styles.ts b/src/screens/Settings/styles.ts index 6b81f8d68..aad1a05ea 100644 --- a/src/screens/Settings/styles.ts +++ b/src/screens/Settings/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; diff --git a/src/screens/SetupPasscode/SetupPasscode.styles.tsx b/src/screens/SetupPasscode/SetupPasscode.styles.tsx index db78349a7..0550f0bb1 100644 --- a/src/screens/SetupPasscode/SetupPasscode.styles.tsx +++ b/src/screens/SetupPasscode/SetupPasscode.styles.tsx @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx b/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx index 0447285ae..a11fafb1d 100644 --- a/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx +++ b/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx @@ -7,9 +7,8 @@ import { Button, Spacer, Text } from '@components/base'; import { Passcode } from '@components/modular'; import { COLORS } from '@constants/colors'; import { HomeParamsList, SettingsTabNavigationProp } from '@appTypes'; -import { scale, verticalScale } from '@utils/scaling'; import { usePasscodeStore } from '@features/passcode'; -import { PasscodeUtils } from '@utils/passcode'; +import { scale, verticalScale, PasscodeUtils } from '@utils'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { styles } from '../SetupPasscode.styles'; diff --git a/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx b/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx index 06f449cee..85d654a3d 100644 --- a/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx +++ b/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx @@ -8,7 +8,7 @@ import { PrimaryButton } from '@components/modular'; import { Spacer, Text } from '@components/base'; import { SuccessIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { HomeNavigationProp } from '@appTypes'; import { usePasscodeStore } from '@features/passcode'; import { usePasscodeActions } from '@features/passcode/lib/hooks'; diff --git a/src/screens/SingleCollection/index.tsx b/src/screens/SingleCollection/index.tsx index 297e831c6..2b014d543 100644 --- a/src/screens/SingleCollection/index.tsx +++ b/src/screens/SingleCollection/index.tsx @@ -12,13 +12,11 @@ import { } from '@components/templates'; import { AddIcon, EditIcon } from '@components/svg/icons'; import { BottomSheetRef, Header } from '@components/composite'; -import { NumberUtils } from '@utils/number'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { CommonStackNavigationProp, CommonStackParamsList } from '@appTypes'; import { useUSDPrice } from '@hooks'; import { BottomSheetAddNewAddressToGroup } from './modals/BottomSheetAddNewAddressToGroup'; -import { sortListByKey } from '@utils/sort'; +import { sortListByKey, NumberUtils, scale, verticalScale } from '@utils'; import { TokenLogo } from '@components/modular'; import { useListsSelector } from '@entities/lists'; import { useListActions } from '@features/lists'; diff --git a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx index 00ac8866d..5c1f351d6 100644 --- a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx +++ b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx @@ -32,7 +32,7 @@ import { useForwardedRef } from '@hooks/useForwardedRef'; import { CloseIcon, ScannerQRIcon, SearchIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { useExplorerAccounts, useSearchAccount, useWatchlist } from '@hooks'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale } from '@utils'; import { BarcodeScanner } from '@components/templates'; import { AccountList, ExplorerAccount } from '@models'; import { SearchSort } from '@screens/Settings/screens/Explore/Search.types'; diff --git a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/styles.ts b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/styles.ts index bfc666ac2..422b0bdc9 100644 --- a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/styles.ts +++ b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ bottomSheetInput: { diff --git a/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx b/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx index c6df0450a..7856edbd0 100644 --- a/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx +++ b/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx @@ -7,7 +7,7 @@ import { BottomSheetRef } from '@components/composite/BottomSheet/BottomSheet.ty import { useForwardedRef } from '@hooks/useForwardedRef'; import { styles } from '@screens/SingleCollection/modals/BottomSheetRenameAddress/styles'; import { BottomSheetFloat, PrimaryButton } from '@components/modular'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; type Props = { diff --git a/src/screens/StakingPool/components/Pending/index.tsx b/src/screens/StakingPool/components/Pending/index.tsx index 5a7e4f890..2fc9cae8b 100644 --- a/src/screens/StakingPool/components/Pending/index.tsx +++ b/src/screens/StakingPool/components/Pending/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import Animated from 'react-native-reanimated'; import { Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; export const StakePending = () => { diff --git a/src/screens/StakingPool/components/Stake/Stake.Preview.tsx b/src/screens/StakingPool/components/Stake/Stake.Preview.tsx index 2418d1bf7..9590d5517 100644 --- a/src/screens/StakingPool/components/Stake/Stake.Preview.tsx +++ b/src/screens/StakingPool/components/Stake/Stake.Preview.tsx @@ -2,9 +2,7 @@ import { Row, Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; import { useUSDPrice } from '@hooks'; -import { NumberUtils } from '@utils/number'; -import { scale, verticalScale } from '@utils/scaling'; -import { StringUtils } from '@utils/string'; +import { StringUtils, NumberUtils, scale, verticalScale } from '@utils'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { StyleSheet, View } from 'react-native'; diff --git a/src/screens/StakingPool/components/Stake/Stake.tsx b/src/screens/StakingPool/components/Stake/Stake.tsx index 55d5bf9ee..ebda80f54 100644 --- a/src/screens/StakingPool/components/Stake/Stake.tsx +++ b/src/screens/StakingPool/components/Stake/Stake.tsx @@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'; import { NavigationProp, useNavigation } from '@react-navigation/native'; import { InputRef, Row, Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; -import { scale, verticalScale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; import { BottomSheet, @@ -13,8 +12,7 @@ import { } from '@components/composite'; import { useBalanceOfAddress, useUSDPrice } from '@hooks'; import { AccountDBModel } from '@database'; -import { NumberUtils } from '@utils/number'; -import { StringUtils } from '@utils/string'; +import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { StakePreview } from './Stake.Preview'; import { staking } from '@api/staking/staking-service'; import { ReturnedPoolDetails } from '@api/staking/types'; diff --git a/src/screens/StakingPool/components/StakingInfo.tsx b/src/screens/StakingPool/components/StakingInfo.tsx index ea838a9d0..4aab75c4c 100644 --- a/src/screens/StakingPool/components/StakingInfo.tsx +++ b/src/screens/StakingPool/components/StakingInfo.tsx @@ -2,8 +2,7 @@ import { CryptoCurrencyCode } from '@appTypes'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { useCurrencyRate } from '@hooks'; -import { NumberUtils } from '@utils/number'; -import { moderateScale, scale, verticalScale } from '@utils/scaling'; +import { moderateScale, scale, verticalScale, NumberUtils } from '@utils'; import React, { PropsWithChildren, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { StyleSheet, View } from 'react-native'; diff --git a/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx b/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx index 30ed60cd9..423bf1468 100644 --- a/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx +++ b/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx @@ -4,9 +4,7 @@ import { Row, Spacer, Text } from '@components/base'; import { styles } from './styles'; import { COLORS } from '@constants/colors'; import { useTranslation } from 'react-i18next'; -import { scale, verticalScale } from '@utils/scaling'; -import { StringUtils } from '@utils/string'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { useUSDPrice } from '@hooks'; import { PrimaryButton } from '@components/modular'; diff --git a/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts b/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts index 746322f13..5b5cf8a61 100644 --- a/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts +++ b/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/StakingPool/components/Withdraw/Withdraw.tsx b/src/screens/StakingPool/components/Withdraw/Withdraw.tsx index 7b9145f00..159fde789 100644 --- a/src/screens/StakingPool/components/Withdraw/Withdraw.tsx +++ b/src/screens/StakingPool/components/Withdraw/Withdraw.tsx @@ -10,10 +10,8 @@ import { } from '@components/composite'; import { styles } from './styles'; import { COLORS } from '@constants/colors'; -import { StringUtils } from '@utils/string'; -import { verticalScale } from '@utils/scaling'; import { PercentageBox } from '@components/composite/PercentageBox'; -import { NumberUtils } from '@utils/number'; +import { NumberUtils, StringUtils, verticalScale } from '@utils'; import { PrimaryButton } from '@components/modular'; import { AccountDBModel } from '@database'; import { WithdrawTokenPreview } from './BottomSheet/Withdraw.Preview'; diff --git a/src/screens/StakingPool/components/Withdraw/styles.ts b/src/screens/StakingPool/components/Withdraw/styles.ts index c831877c2..1ff966354 100644 --- a/src/screens/StakingPool/components/Withdraw/styles.ts +++ b/src/screens/StakingPool/components/Withdraw/styles.ts @@ -1,5 +1,5 @@ import { COLORS } from '@constants/colors'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/StakingPool/index.tsx b/src/screens/StakingPool/index.tsx index 712e48b9a..c94072c36 100644 --- a/src/screens/StakingPool/index.tsx +++ b/src/screens/StakingPool/index.tsx @@ -9,14 +9,13 @@ import { Row, Spacer, Spinner, Text } from '@components/base'; import { Header } from '@components/composite'; import { AnimatedTabs, TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils/scaling'; import { shadow } from '@constants/shadow'; import { CryptoCurrencyCode, HomeParamsList } from '@appTypes'; import { StakingInfo } from './components'; import { WalletPicker } from '@components/templates'; import { useAllAccounts } from '@hooks/database'; import { WithdrawToken } from './components/Withdraw'; -import { TokenUtils } from '@utils/token'; +import { TokenUtils, scale, verticalScale } from '@utils'; import { useWalletStore } from '@entities/wallet'; import { useStakingPoolDetails, useStakingPoolsStore } from '@entities/staking'; import { StakeToken } from '@screens/StakingPool/components/Stake/Stake'; diff --git a/src/screens/StakingPool/screens/Stake.Error.tsx b/src/screens/StakingPool/screens/Stake.Error.tsx index 7e6cbd7d8..a4faa169e 100644 --- a/src/screens/StakingPool/screens/Stake.Error.tsx +++ b/src/screens/StakingPool/screens/Stake.Error.tsx @@ -8,7 +8,7 @@ import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; import { HomeParamsList } from '@appTypes'; import { FailedIcon } from '@components/svg/icons'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; export const StakeErrorScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/StakingPool/screens/Stake.Success.tsx b/src/screens/StakingPool/screens/Stake.Success.tsx index dbefca93f..527cd7f3f 100644 --- a/src/screens/StakingPool/screens/Stake.Success.tsx +++ b/src/screens/StakingPool/screens/Stake.Success.tsx @@ -13,7 +13,7 @@ import { } from '@react-navigation/native'; import { HomeParamsList } from '@appTypes'; import { SuccessIcon } from '@components/svg/icons'; -import { verticalScale } from '@utils/scaling'; +import { verticalScale } from '@utils'; import { useTranslation } from 'react-i18next'; import { useBalanceOfAddress, useTokensAndTransactions } from '@hooks'; import { useStakingPoolsStore } from '@entities/staking'; diff --git a/src/screens/StakingPool/screens/styles.ts b/src/screens/StakingPool/screens/styles.ts index 73d62b55c..d4ba940b6 100644 --- a/src/screens/StakingPool/screens/styles.ts +++ b/src/screens/StakingPool/screens/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { flex: 1, diff --git a/src/screens/StakingPool/style.ts b/src/screens/StakingPool/style.ts index 5218eb0d8..519574826 100644 --- a/src/screens/StakingPool/style.ts +++ b/src/screens/StakingPool/style.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; import { DEVICE_WIDTH } from '@constants/variables'; import { COLORS } from '@constants/colors'; diff --git a/src/screens/StakingPools/index.tsx b/src/screens/StakingPools/index.tsx index 38c1b5e47..21051b360 100644 --- a/src/screens/StakingPools/index.tsx +++ b/src/screens/StakingPools/index.tsx @@ -7,7 +7,7 @@ import { useNavigation } from '@react-navigation/native'; import { styles } from './styles'; import { Header } from '@components/composite'; import { Row, Spacer, Spinner, Text } from '@components/base'; -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import { StakingPoolList } from '@components/templates'; import { HomeNavigationProp } from '@appTypes'; diff --git a/src/screens/StakingPools/styles.ts b/src/screens/StakingPools/styles.ts index b1628d394..34e574239 100644 --- a/src/screens/StakingPools/styles.ts +++ b/src/screens/StakingPools/styles.ts @@ -1,5 +1,5 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Swap/screens/settings/settings.tsx b/src/screens/Swap/screens/settings/settings.tsx index 27efdd935..f11044fe5 100644 --- a/src/screens/Swap/screens/settings/settings.tsx +++ b/src/screens/Swap/screens/settings/settings.tsx @@ -11,7 +11,7 @@ import { SettingsExpertModeForm, SettingsMultiHopForm } from '@features/swap/components/composite'; -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; export const SwapSettingsScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Swap/screens/settings/styles.ts b/src/screens/Swap/screens/settings/styles.ts index 7cddcae4a..bcb00ff6f 100644 --- a/src/screens/Swap/screens/settings/styles.ts +++ b/src/screens/Swap/screens/settings/styles.ts @@ -1,4 +1,4 @@ -import { scale, verticalScale } from '@utils/scaling'; +import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Swap/styles.ts b/src/screens/Swap/styles.ts index adfb27b28..87de847a9 100644 --- a/src/screens/Swap/styles.ts +++ b/src/screens/Swap/styles.ts @@ -1,4 +1,4 @@ -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/screens/Wallets/index.tsx b/src/screens/Wallets/index.tsx index ede4e3ea8..47564c23a 100644 --- a/src/screens/Wallets/index.tsx +++ b/src/screens/Wallets/index.tsx @@ -20,10 +20,9 @@ import { } from '@components/templates'; import { Spacer } from '@components/base'; import { useBalanceOfAddress } from '@hooks'; -import { scale, SCREEN_HEIGHT, verticalScale } from '@utils/scaling'; import { useAllAccounts } from '@hooks/database'; import { ExplorerAccount } from '@models'; -import { WalletUtils } from '@utils/wallet'; +import { WalletUtils, scale, SCREEN_HEIGHT, verticalScale } from '@utils'; import { WalletCardHeight } from '@components/modular/WalletCard/styles'; import { HomeHeader } from '@features/wallet-assets/components/templates'; import { useWalletStore } from '@entities/wallet'; diff --git a/src/screens/Wallets/styles.ts b/src/screens/Wallets/styles.ts index 9268e786d..569c28d96 100644 --- a/src/screens/Wallets/styles.ts +++ b/src/screens/Wallets/styles.ts @@ -1,4 +1,4 @@ -import { scale } from '@utils/scaling'; +import { scale } from '@utils'; import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ diff --git a/src/utils/__tests__/getTokenNameFromDatabase.test.ts b/src/utils/__tests__/get-token-name-from-db.test.ts similarity index 87% rename from src/utils/__tests__/getTokenNameFromDatabase.test.ts rename to src/utils/__tests__/get-token-name-from-db.test.ts index 748306e42..b97c1bca0 100644 --- a/src/utils/__tests__/getTokenNameFromDatabase.test.ts +++ b/src/utils/__tests__/get-token-name-from-db.test.ts @@ -1,5 +1,5 @@ import { ethers } from 'ethers'; -import { getTokenNameFromDatabase } from '@utils/getTokenNameFromDatabase'; +import { getTokenNameFromDatabase } from '@utils'; const NATIVE_TOKEN_NAME = 'AirDAO'; diff --git a/src/utils/numbers.test.tsx b/src/utils/__tests__/numbers.test.tsx similarity index 100% rename from src/utils/numbers.test.tsx rename to src/utils/__tests__/numbers.test.tsx diff --git a/src/utils/scaling.test.tsx b/src/utils/__tests__/scaling.test.tsx similarity index 100% rename from src/utils/scaling.test.tsx rename to src/utils/__tests__/scaling.test.tsx diff --git a/src/utils/share.test.tsx b/src/utils/__tests__/share.test.tsx similarity index 100% rename from src/utils/share.test.tsx rename to src/utils/__tests__/share.test.tsx diff --git a/src/utils/string.test.tsx b/src/utils/__tests__/string.test.tsx similarity index 100% rename from src/utils/string.test.tsx rename to src/utils/__tests__/string.test.tsx diff --git a/src/utils/getTokenNameFromDatabase.ts b/src/utils/get-token-name-from-db.ts similarity index 100% rename from src/utils/getTokenNameFromDatabase.ts rename to src/utils/get-token-name-from-db.ts diff --git a/src/utils/index.ts b/src/utils/index.ts index fa6fbeef7..9e5551b5d 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,4 +1,37 @@ export * from './validators'; export * from './safe-types'; -export { _delayNavigation } from './navigate'; -export * from './tokens'; +export * from './navigate'; +export * from './get-token-name-from-db'; +export * from './account'; +export * from './cashback'; +export * from './clipboard'; +export * from './combineComponents'; +export * from './createContextSelector'; +export * from './crypto'; +export * from './css-shadow-to-native'; +export * from './currency'; +export * from './delay'; +export * from './isPlatform'; +export * from './keepWSlive'; +export * from './keys'; +export * from './localization'; +export * from './mnemonics'; +export * from './navigation'; +export * from './number'; +export * from './object'; +export * from './passcode'; +export * from './platform'; +export * from './safe-types'; +export * from './scaling'; +export * from './share'; +export * from './sort'; +export * from './token'; +export * from './transaction'; +export * from './wallet'; +export * from './string'; +export * from './device'; +export * from './array'; +export * from './address'; +export * from './bridge'; +export * from './environment'; +export * from './deviceSpecification'; diff --git a/src/utils/keys.ts b/src/utils/keys.ts index 36e87c2c2..b14c1929d 100644 --- a/src/utils/keys.ts +++ b/src/utils/keys.ts @@ -20,7 +20,7 @@ const createHmacPDFK2Sizes: CreateHmacPDFK2Sizes = { ripemd160: 20 }; -class KeysUtills { +class KeysUtils { static _pbkdf2( password: string, salt: Buffer, @@ -116,4 +116,4 @@ class KeysUtills { } } -export default KeysUtills; +export { KeysUtils }; diff --git a/src/utils/token.ts b/src/utils/token.ts index 56a66ae75..31cba7392 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -1,4 +1,5 @@ import { CryptoCurrencyCode } from '@appTypes'; +import { SwapStringUtils } from '@features/swap/utils'; import Config from '@constants/config'; export interface TokenInfo { @@ -7,6 +8,26 @@ export interface TokenInfo { symbol: CryptoCurrencyCode | string; } +interface TokenExtendProps { + tokenNameFromDatabase: string | 'unknown'; + symbol: string; +} + +export function wrapTokenIcon(token: T) { + if (token.symbol === CryptoCurrencyCode.AMB) { + return 'AirDAO'; + } + + const { tokenNameFromDatabase } = token; + + const isTokenNameFromDBExist = + tokenNameFromDatabase && tokenNameFromDatabase !== 'unknown'; + + return SwapStringUtils.extendedLogoVariants( + token[isTokenNameFromDBExist ? 'tokenNameFromDatabase' : 'symbol'] ?? '' + ); +} + const truncatePoolTokenName = (token: string) => { return token.split(' ')[0]; }; diff --git a/src/utils/tokens.ts b/src/utils/tokens.ts index 7f8a92edb..e69de29bb 100644 --- a/src/utils/tokens.ts +++ b/src/utils/tokens.ts @@ -1,22 +0,0 @@ -import { CryptoCurrencyCode } from '@appTypes'; -import { SwapStringUtils } from '@features/swap/utils'; - -interface TokenExtendProps { - tokenNameFromDatabase: string | 'unknown'; - symbol: string; -} - -export function wrapTokenIcon(token: T) { - if (token.symbol === CryptoCurrencyCode.AMB) { - return 'AirDAO'; - } - - const { tokenNameFromDatabase } = token; - - const isTokenNameFromDBExist = - tokenNameFromDatabase && tokenNameFromDatabase !== 'unknown'; - - return SwapStringUtils.extendedLogoVariants( - token[isTokenNameFromDBExist ? 'tokenNameFromDatabase' : 'symbol'] ?? '' - ); -} From c6ad6af76bb593038c02cba84cadf65199b55683 Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:54:41 +0200 Subject: [PATCH 4/6] chore: implement automation of sorting import --- .eslintrc.js | 51 +- package.json | 3 +- src/api/api.ts | 10 +- src/api/bridge-service.ts | 2 +- src/api/explorer-service.ts | 6 +- src/api/harbor/harbor-service.ts | 6 +- src/api/staking/staking-service.ts | 2 +- src/api/watcher-service.ts | 6 +- src/appTypes/navigation/common.ts | 4 +- src/appTypes/navigation/harbor.ts | 4 +- src/appTypes/navigation/index.ts | 1 - src/appTypes/navigation/lists.ts | 4 +- src/appTypes/navigation/products.ts | 2 +- src/appTypes/navigation/root.ts | 4 +- src/appTypes/navigation/search.ts | 4 +- src/appTypes/navigation/settings.ts | 6 +- src/appTypes/navigation/tabs.ts | 2 +- src/appTypes/navigation/wallets.ts | 8 +- .../animations/Rotation/Rotation.test.tsx | 2 +- .../BottomSheetStatusView/error/index.tsx | 8 +- .../BottomSheetStatusView/success/index.tsx | 8 +- .../base/Button/Button.Bordered.tsx | 2 +- .../base/Button/ButtonBase.test.tsx | 4 +- .../details-item-typography/index.tsx | 2 +- src/components/base/FloatButton/index.tsx | 4 +- src/components/base/Input/Input.number.tsx | 4 +- src/components/base/Input/Input.text.tsx | 4 +- src/components/base/RadioButton/index.tsx | 2 +- src/components/base/Separator.tsx | 2 +- src/components/base/Spinner/index.tsx | 4 +- src/components/base/Switch/index.tsx | 2 +- src/components/base/Text/index.tsx | 2 +- src/components/base/index.ts | 2 +- .../composite/BottomSheet/index.tsx | 12 +- .../composite/Button/CopyToClipboard.tsx | 14 +- src/components/composite/CenteredSpinner.tsx | 2 +- .../composite/CheckBox/CheckBox.circular.tsx | 4 +- .../composite/CheckBox/CheckBox.square.tsx | 4 +- src/components/composite/CheckBox/index.tsx | 4 +- src/components/composite/DatePicker/index.tsx | 2 +- .../composite/Header/Header.styles.ts | 2 +- src/components/composite/Header/index.tsx | 8 +- .../composite/InputWithIcon/index.tsx | 8 +- .../composite/InputWithIcon/styles.ts | 2 +- .../composite/PasscodeKeyboard/index.tsx | 6 +- src/components/composite/PercentChange.tsx | 2 +- .../composite/PercentageBox/index.tsx | 2 +- src/components/composite/PopUpInfo/index.tsx | 4 +- .../composite/SegmentedPicker/index.tsx | 4 +- src/components/composite/Slider/index.tsx | 4 +- .../composite/TextOrSpinner/index.tsx | 2 +- src/components/modular/AnimatedTabs/index.tsx | 4 +- .../modular/AnimatedTabsV2/index.tsx | 4 +- src/components/modular/BalanceRow/index.tsx | 10 +- .../modular/BottomSheetWithHeader/index.tsx | 4 +- src/components/modular/Button/Gradient.tsx | 2 +- src/components/modular/Passcode/index.tsx | 2 +- .../modular/PrivateKeyMaskedInput/index.tsx | 4 +- .../modular/QRCodeWithLogo/styles.ts | 2 +- src/components/modular/SingleAsset/index.tsx | 4 +- src/components/modular/SingleAsset/styles.ts | 2 +- .../modular/SingleAssetNFT/index.tsx | 4 +- src/components/modular/StakingPool/index.tsx | 8 +- src/components/modular/Toast/Toast.body.tsx | 4 +- .../modular/Toast/Toast.constants.tsx | 4 +- src/components/modular/Toast/Toast.styles.ts | 2 +- .../modular/Toast/Toast.wrapper.tsx | 4 +- src/components/modular/TokenLogo/index.tsx | 2 +- .../modular/TokenSelector/index.tsx | 6 +- .../modular/TransactionItem/index.tsx | 6 +- src/components/modular/WalletCard/index.tsx | 6 +- src/components/modular/WalletCard/styles.ts | 2 +- src/components/svg/icons/AddressTracking.tsx | 2 +- src/components/svg/icons/Check.tsx | 2 +- src/components/svg/icons/CheckIconCircle.tsx | 2 +- src/components/svg/icons/CheckmarkCircle.tsx | 2 +- src/components/svg/icons/ChevronDown.tsx | 2 +- src/components/svg/icons/CirculationIcon.tsx | 4 +- src/components/svg/icons/DownArrow.tsx | 2 +- src/components/svg/icons/Kosmos.tsx | 2 +- src/components/svg/icons/Language.tsx | 2 +- src/components/svg/icons/List.tsx | 2 +- src/components/svg/icons/LogoBig.tsx | 2 +- .../svg/icons/LogoGradientCircular.tsx | 2 +- src/components/svg/icons/MediumIcon.tsx | 5 +- src/components/svg/icons/Messages.tsx | 2 +- src/components/svg/icons/Mnemoic.tsx | 2 +- src/components/svg/icons/Move.tsx | 2 +- src/components/svg/icons/NFTIcon.tsx | 5 +- src/components/svg/icons/NoMatch.tsx | 2 +- src/components/svg/icons/PlusIcon.tsx | 2 +- src/components/svg/icons/QuestionMark.tsx | 2 +- src/components/svg/icons/ReceiveQRCode.tsx | 2 +- src/components/svg/icons/RightArrow.tsx | 2 +- .../svg/icons/RightArrowInCircle.tsx | 2 +- src/components/svg/icons/Rocket.tsx | 2 +- src/components/svg/icons/ScannerQR.tsx | 2 +- src/components/svg/icons/Search.tsx | 2 +- src/components/svg/icons/Send.tsx | 2 +- src/components/svg/icons/SendReceive.tsx | 2 +- src/components/svg/icons/SettingsFilled.tsx | 2 +- src/components/svg/icons/Share.tsx | 2 +- src/components/svg/icons/Statistics.tsx | 2 +- src/components/svg/icons/StayInformed.tsx | 2 +- src/components/svg/icons/Success.tsx | 2 +- src/components/svg/icons/Swap.tsx | 2 +- src/components/svg/icons/TokenBusd.tsx | 2 +- src/components/svg/icons/TokenSTAMB.tsx | 2 +- src/components/svg/icons/WalletConnect.tsx | 2 +- src/components/svg/icons/WalletXs.tsx | 2 +- src/components/svg/icons/Warning.tsx | 2 +- src/components/svg/icons/Watchlist.tsx | 2 +- src/components/svg/icons/XTwitterIcon.tsx | 3 +- .../svg/icons/v2/ArrowBottomFill.tsx | 4 +- src/components/svg/icons/v2/Barcode.tsx | 2 +- src/components/svg/icons/v2/Chart.tsx | 2 +- .../svg/icons/v2/CheckboxCircleFill.tsx | 2 +- src/components/svg/icons/v2/Clipboard.tsx | 4 +- src/components/svg/icons/v2/ClipboardFill.tsx | 4 +- src/components/svg/icons/v2/CloseCircle.tsx | 2 +- .../svg/icons/v2/ConnectionChains.tsx | 2 +- src/components/svg/icons/v2/Edit.tsx | 2 +- src/components/svg/icons/v2/Failed.tsx | 2 +- src/components/svg/icons/v2/Globe.tsx | 2 +- src/components/svg/icons/v2/Key.tsx | 2 +- src/components/svg/icons/v2/Plus.tsx | 2 +- src/components/svg/icons/v2/QR.tsx | 2 +- src/components/svg/icons/v2/Wallet.tsx | 4 +- .../icons/v2/actions/BridgeAccountAction.tsx | 2 +- .../icons/v2/actions/KosmosAccountAction.tsx | 2 +- .../icons/v2/actions/SendAccountAction.tsx | 2 +- .../icons/v2/actions/StakeAccountAction.tsx | 2 +- .../icons/v2/actions/SwapAccountAction.tsx | 2 +- .../products-active.tsx | 2 +- .../products-inactive.tsx | 2 +- .../products-inner-icon.tsx | 2 +- .../settings-active.tsx | 2 +- .../settings-inactive.tsx | 2 +- .../bottom-tabs-navigation/wallets-active.tsx | 2 +- .../wallets-inactive.tsx | 2 +- .../v2/harbor-bottom-tabs/BorrowIcon.tsx | 2 +- .../v2/harbor-bottom-tabs/StakeAMBIcon.tsx | 2 +- .../v2/harbor-bottom-tabs/StakeHBRIcon.tsx | 2 +- .../svg/icons/v2/harbor/APYHeaderIcon.tsx | 2 +- .../svg/icons/v2/settings/AboutIcon.tsx | 2 +- .../svg/icons/v2/settings/CompassIcon.tsx | 2 +- .../svg/icons/v2/settings/CopyIconV2.tsx | 2 +- .../svg/icons/v2/settings/DownloadIcon.tsx | 2 +- .../svg/icons/v2/settings/KeyIcon.tsx | 2 +- .../icons/v2/settings/NotificationIcon.tsx | 2 +- .../svg/icons/v2/settings/Preferences.tsx | 2 +- .../svg/icons/v2/settings/SecurityIcon.tsx | 2 +- .../svg/icons/v2/settings/WalletIcon.tsx | 2 +- .../svg/icons/v2/settings/WatchListIcon.tsx | 2 +- .../icons/v2/transactions/ContractCall.tsx | 2 +- .../svg/icons/v2/transactions/Failed.tsx | 2 +- .../v2/transactions/TransferReceived.tsx | 2 +- .../icons/v2/transactions/TransferSent.tsx | 2 +- .../AMBPriceHistory/AMBPriceHistory.test.tsx | 4 +- .../templates/AMBPriceHistory/index.tsx | 10 +- .../components/ActionButton.tsx | 2 +- .../AccountActions/components/Bridge.tsx | 4 +- .../AccountActions/components/Kosmos.tsx | 4 +- .../AccountActions/components/Receive.tsx | 4 +- .../AccountActions/components/Send.tsx | 10 +- .../AccountActions/components/Staking.tsx | 6 +- .../AccountActions/components/Swap.tsx | 6 +- .../templates/AccountActions/index.tsx | 6 +- .../AccountList/AccountList.paginated.tsx | 2 +- .../templates/AccountList/AccountList.tsx | 6 +- .../templates/AccountList/AccountListItem.tsx | 2 +- .../AddWalletToList/AddWalletToList.test.tsx | 6 +- .../templates/AddWalletToList/index.tsx | 10 +- .../templates/AddressIndicator/index.tsx | 6 +- .../AddressList/components/SwipeAction.tsx | 2 +- .../components/SwipeableWalletItem.tsx | 8 +- .../templates/AddressList/index.tsx | 6 +- .../templates/AddressList/styles.ts | 2 +- .../BarcodeScanner/BarcodeScanner.test.tsx | 4 +- .../templates/BarcodeScanner/index.tsx | 6 +- .../BezierChart/BezierChart.test.tsx | 2 +- .../templates/BezierChart/SelectionDot.tsx | 6 +- .../templates/BezierChart/index.tsx | 2 +- .../BottomSheetAddWalletToList/index.tsx | 10 +- ...SheetCreateCollectionOrAddAddress.test.tsx | 4 +- .../index.tsx | 4 +- .../BottomSheetCreateRenameGroup.test.tsx | 4 +- .../BottomSheetCreateRenameGroup/index.tsx | 15 +- .../BottomSheetEditCollection/index.tsx | 8 +- .../BottomSheetEditWallet.test.tsx | 6 +- .../templates/BottomSheetEditWallet/index.tsx | 12 +- .../index.tsx | 10 +- .../index.tsx | 4 +- .../SharePortfolio.test.tsx | 8 +- .../BottomSheetSharePortfolio/index.tsx | 14 +- .../BottomSheetViewAccessKey.tsx | 10 +- .../BottomSheetWalletCreateOrImport/index.tsx | 12 +- .../styles.tsx | 2 +- .../templates/BridgeSelectorItem/index.tsx | 4 +- .../templates/BridgeSelectorItem/styles.tsx | 2 +- .../templates/DropDownPanel/index.tsx | 4 +- .../templates/DropDownPanel/styles.tsx | 2 +- .../ExplorerAccount.Transactions.tsx | 8 +- .../__tests__/ExploreAccount.test.tsx | 4 +- .../address-row-with-action/index.tsx | 4 +- .../ExplorerAccount.TransactionItem.tsx | 8 +- .../templates/ExplorerAccount/index.tsx | 10 +- .../BottomSheetTokensList/index.tsx | 2 +- .../templates/InputWithTokenSelect/index.tsx | 6 +- .../InputWithoutTokenSelect/index.tsx | 6 +- .../InputWithoutTokenSelect/styles.tsx | 2 +- .../templates/LocalizedRenderEmpty/index.tsx | 6 +- .../NotificationSettings.tsx | 6 +- .../templates/NotificationSettings/index.tsx | 6 +- .../PortfolioPerformance.test.tsx | 4 +- .../templates/PortfolioPerformance/index.tsx | 4 +- .../templates/PortfolioPerformance/styles.ts | 2 +- .../templates/ReceiveFunds/index.tsx | 6 +- .../templates/ReceiveFunds/styles.ts | 2 +- .../templates/RenderEmpty/index.tsx | 6 +- .../SearchAddress/SearchAddress.NoMatch.tsx | 4 +- .../templates/SearchAddress/index.tsx | 26 +- .../templates/SearchAddress/styles.ts | 2 +- .../templates/StakingPoolList/index.tsx | 2 +- .../templates/TokenPicker/index.tsx | 2 +- .../TransactionDetails.test.tsx | 2 +- .../templates/TransactionDetails/index.tsx | 10 +- .../templates/WalletDepositFunds/index.tsx | 18 +- .../templates/WalletDepositFunds/styles.ts | 2 +- .../templates/WalletItem/WalletItem.test.tsx | 6 +- src/components/templates/WalletItem/index.tsx | 4 +- .../templates/WalletNoNFTsView/index.tsx | 12 +- .../WalletPicker/WalletPicker.item.tsx | 8 +- .../templates/WalletPicker/index.tsx | 6 +- .../templates/WalletPicker/styles.ts | 2 +- .../NftAssets/index.tsx | 8 +- .../WalletAssets/index.tsx | 12 +- .../WalletTransactionsAndAssets/index.tsx | 14 +- src/constants/config.ts | 2 +- src/constants/shadow.ts | 2 +- src/constants/variables.ts | 2 +- src/contexts/Localizations/index.tsx | 4 +- src/database/Database.ts | 6 +- src/database/main.ts | 4 +- src/database/models/account.ts | 2 +- src/database/models/public-address-list.ts | 2 +- src/database/models/public-address.ts | 2 +- .../models/transaction-scanners-tmp.ts | 2 +- src/database/models/transactions-raw.ts | 2 +- src/database/models/transactions.ts | 2 +- src/database/models/wallet-pub.ts | 2 +- src/database/models/wallet.ts | 2 +- src/database/schemas/account.ts | 2 +- src/database/schemas/index.ts | 10 +- src/database/schemas/public-address-list.ts | 2 +- src/database/schemas/public-address.ts | 2 +- src/database/schemas/transaction-raw.ts | 2 +- .../schemas/transaction-scanners-tmp.ts | 2 +- src/database/schemas/transactions.ts | 2 +- src/database/schemas/wallet-pub.ts | 2 +- src/database/schemas/wallet.ts | 2 +- src/database/services/account.ts | 2 +- src/database/services/public-address-list.ts | 2 +- src/database/services/public-address.ts | 4 +- src/database/services/wallet.ts | 2 +- .../lib/hooks/use-fetch-addresses.ts | 4 +- src/entities/addresses/utils/_db.mapper.ts | 2 +- .../lib/hooks/use-currencies-query.ts | 2 +- .../lib/hooks/use-currency-selector.ts | 2 +- src/entities/harbor/constants/index.ts | 4 +- src/entities/harbor/model/harbor-store.ts | 4 +- src/entities/harbor/utils/getHarborToken.ts | 2 +- src/entities/harbor/utils/parceData.ts | 2 +- src/entities/kosmos/api/markets.api.ts | 2 +- src/entities/kosmos/lib/hooks/use-token.ts | 2 +- .../kosmos/lib/hooks/use-transactions.ts | 4 +- .../lists/lib/hooks/use-fetch-lists.ts | 6 +- .../lists/lib/hooks/use-lists-selector.ts | 4 +- .../wallet/lib/use-wallet-private-key.tsx | 2 +- .../wallet/utils/tokens-or-nft-mapper.ts | 2 +- .../lib/hooks/use-addresses-actions.ts | 4 +- .../lib/hooks/use-list-notifications.ts | 6 +- src/features/bridge/constants/index.ts | 4 +- .../bridge/context/Bridge.Context.tsx | 42 +- .../hooks/bridge/services/parseBridgeData.ts | 4 +- .../bridge/hooks/usePendingTransactions.ts | 2 +- .../index.tsx | 14 +- .../BottomSheetBridgePreview.tsx | 8 +- .../GeneralPreviewTemplate.tsx | 16 +- .../components/Loader/Loader.tsx | 2 +- .../PreviewDataTemplate.tsx | 12 +- .../components/PreviewDataItem.tsx | 2 +- .../helpers/amountChecker.ts | 2 +- .../BottomSheetBridgeTransactionHistory.tsx | 14 +- .../styles.ts | 2 +- ...omSheetBridgeTransactionPendingHistory.tsx | 10 +- .../BridgeTransactionPendingTemplate.tsx | 8 +- .../RowStageSection/RowStageSection.tsx | 4 +- .../TransactionLoader/TransactionLoader.tsx | 2 +- .../templates/BridgeForm/BridgeForm.tsx | 40 +- .../TokenSelectData/TokenSelectData.tsx | 10 +- .../BridgeHistory.Transactions.tsx | 14 +- .../BridgeNetwork.Selectors.tsx | 2 +- .../BridgeNetwork.Picker.tsx | 12 +- .../BridgeNetworkSelectors/styles.ts | 2 +- .../BridgeNetworksSelected.tsx | 6 +- .../BridgeNetworksSelected/styles.ts | 2 +- .../bridge/templates/BridgeTemplate.tsx | 6 +- .../components/Status/Status.tsx | 4 +- .../templates/BridgeTransaction/index.tsx | 20 +- src/features/bridge/utils/parseBridges.ts | 2 +- src/features/explorer/utils/tx-status.tsx | 2 +- .../preview-modules/error-template/index.tsx | 2 +- .../preview-modules/error-template/styles.ts | 2 +- .../preview-modules/form-template/index.tsx | 10 +- .../success-template/copy-hash/index.tsx | 6 +- .../success-template/index.tsx | 18 +- .../success-template/styes.tsx | 2 +- .../success-template/success-title/index.tsx | 6 +- .../base/stake-info-container/index.tsx | 14 +- .../base/stake-info-container/styles.ts | 2 +- .../components/base/tier-item/index.tsx | 2 +- .../base/tiers-info-container/index.tsx | 6 +- .../components/base/tiers-selector/index.tsx | 10 +- .../components/base/tiers-selector/styles.tsx | 2 +- .../components/base/token-reward/index.tsx | 2 +- .../components/base/withdraw-info/index.tsx | 4 +- .../components/harbor-preview/index.tsx | 24 +- .../tabs/harbor-stake-tabs/index.tsx | 4 +- .../components/tabs/stake-amb-tab/index.tsx | 4 +- .../tabs/withdraw-reward-only-tab/index.tsx | 8 +- .../tabs/withdraw-stake-reward-tab/index.tsx | 16 +- .../harbor/hooks/calculateClaimAmount.ts | 2 +- .../harbor/hooks/parseDataHelpers/index.ts | 2 +- .../hooks/parseDataHelpers/parseStakeData.ts | 2 +- .../parseDataHelpers/parseWithdrawReward.ts | 2 +- .../parseWithdrawStakePreview.ts | 2 +- .../hooks/processHelpers/processFunction.ts | 2 +- .../hooks/processHelpers/resultHandler.ts | 2 +- .../base/chart-interval-item/index.tsx | 2 +- .../components/base/filters-item/index.tsx | 4 +- .../base/list-cell-headings/index.tsx | 2 +- .../base/market-list-item/index.tsx | 6 +- .../base/order-card-details/index.tsx | 8 +- .../components/base/screen-loader/index.tsx | 2 +- .../base/transaction-history-item/index.tsx | 6 +- .../base/transaction-history-item/styles.ts | 2 +- .../buy-bond-input-with-error/index.tsx | 8 +- .../composite/chart-time-intervals/index.tsx | 4 +- .../composite/chart-tooltip/index.tsx | 8 +- .../composite/chart-tooltip/styles.ts | 2 +- .../claimable-order-card-details/index.tsx | 14 +- .../composite/filters-section/index.tsx | 4 +- .../composite/market-table-details/index.tsx | 10 +- .../composite/markets-list/index.tsx | 8 +- .../composite/markets-list/styles.ts | 2 +- .../composite/total-orders-amount/index.tsx | 4 +- .../components/modular/balance/index.tsx | 2 +- .../modular/buy-bond-button/index.tsx | 18 +- .../modular/filters-selector/index.tsx | 4 +- .../modular/filters-selector/styles.ts | 2 +- .../components/modular/market-chart/index.tsx | 12 +- .../components/modular/market-chart/styles.ts | 2 +- .../review-bond-purchase-button/index.tsx | 6 +- .../modular/user-orders-list/index.tsx | 10 +- .../modular/user-orders-list/styles.ts | 2 +- .../templates/bottom-sheet-filters/index.tsx | 12 +- .../templates/bottom-sheet-filters/styles.ts | 2 +- .../bottom-sheet-preview-purchase/index.tsx | 18 +- .../bottom-sheet-review-order/index.tsx | 20 +- .../exact-market-token-tabs/index.tsx | 4 +- .../tabs/buy-bond/index.tsx | 18 +- .../tabs/transactions/index.tsx | 10 +- .../market-chart-with-timeframes/index.tsx | 10 +- .../templates/market-tabs/index.tsx | 4 +- src/features/kosmos/lib/contracts/ERC20.ts | 2 +- src/features/kosmos/lib/contracts/claim.ts | 6 +- src/features/kosmos/lib/contracts/purchase.ts | 2 +- src/features/kosmos/lib/hooks/use-balance.ts | 2 +- .../kosmos/lib/hooks/use-bond-contracts.ts | 2 +- .../kosmos/lib/hooks/use-claim-bonds.ts | 4 +- .../kosmos/lib/hooks/use-market-details.ts | 4 +- .../hooks/use-transaction-error-handler.ts | 2 +- src/features/kosmos/model/purchase.store.ts | 2 +- src/features/kosmos/utils/filter.ts | 2 +- .../lists/lib/hooks/use-list-actions.ts | 4 +- .../lib/hooks/use-passcode-actions.ts | 6 +- .../base/product-list-item/index.tsx | 10 +- .../templates/products-list/index.tsx | 10 +- src/features/products/entities/_products.tsx | 4 +- .../base/tokens-list-item/index.tsx | 8 +- .../composite/tokens-list/index.tsx | 6 +- .../composite/tokens-list/styles.ts | 2 +- .../index.tsx | 6 +- .../modular/barcode-scanner/index.tsx | 4 +- .../components/templates/header/index.tsx | 2 +- .../components/templates/header/styles.ts | 2 +- .../send-funds/lib/hooks/use-barcode.ts | 4 +- .../send-funds/model/send-funds.store.ts | 2 +- .../bottom-sheet-review-token-item/index.tsx | 8 +- .../base/settings-input-with-label/index.tsx | 4 +- .../base/settings-input-with-label/styles.ts | 2 +- .../approval-required/index.tsx | 4 +- .../swap-buttons-list/error-impact/index.tsx | 4 +- .../base/swap-buttons-list/swap/index.tsx | 4 +- .../components/composite/balance/index.tsx | 14 +- .../composite/preview-information/index.tsx | 4 +- .../settings-deadline-form/index.tsx | 2 +- .../settings-expert-mode-form/index.tsx | 2 +- .../settings-multi-hop-form/index.tsx | 2 +- .../index.tsx | 6 +- .../composite/swap-reverse-tokens/index.tsx | 12 +- .../composite/swap-reverse-tokens/styles.ts | 2 +- .../composite/token-selector/index.tsx | 10 +- .../modular/bottom-sheet-token-item/index.tsx | 4 +- .../modular/input-with-token-select/index.tsx | 8 +- .../modular/review-swap-button/index.tsx | 4 +- .../modular/submit-swap-actions/index.tsx | 10 +- .../modular/submit-swap-actions/styles.ts | 2 +- .../modular/token-info-plate/index.tsx | 4 +- .../components/error/index.tsx | 6 +- .../components/error/styles.ts | 2 +- .../components/render.tsx | 4 +- .../components/success/index.tsx | 6 +- .../bottom-sheet-preview-swap/index.tsx | 16 +- .../bottom-sheet-preview-swap/styles.ts | 2 +- .../bottom-sheet-tokens-list/index.tsx | 10 +- .../bottom-sheet-tokens-list/styles.ts | 2 +- .../components/templates/swap-form/index.tsx | 10 +- src/features/swap/context/initials.ts | 2 +- src/features/swap/context/swap.context.tsx | 16 +- src/features/swap/lib/contracts/allowance.ts | 2 +- src/features/swap/lib/contracts/swap.ts | 10 +- .../swap/lib/hooks/use-all-liquidity-pools.ts | 6 +- .../swap/lib/hooks/use-swap-actions.ts | 29 +- .../swap/lib/hooks/use-swap-all-balances.ts | 4 +- .../swap/lib/hooks/use-swap-balance.ts | 2 +- .../lib/hooks/use-swap-better-currency.ts | 4 +- .../swap/lib/hooks/use-swap-better-rate.ts | 2 +- .../swap/lib/hooks/use-swap-fields-handler.ts | 2 +- .../swap/lib/hooks/use-swap-interface.ts | 8 +- .../lib/hooks/use-swap-multiply-balance.ts | 2 +- .../swap/lib/hooks/use-swap-price-impact.ts | 10 +- src/features/swap/types/balance.ts | 2 +- .../__tests__/wrap-native-address.spec.ts | 2 +- src/features/swap/utils/balances.ts | 2 +- src/features/swap/utils/index.ts | 1 - src/features/swap/utils/multi-route.ts | 2 +- .../swap/utils/wrap-native-address.ts | 7 +- .../base/account-action-item/index.tsx | 2 +- .../base/account-action-item/styles.ts | 2 +- .../assets-account-actions-list/index.tsx | 18 +- .../assets-account-actions-list/styles.ts | 2 +- .../components/templates/header/index.tsx | 18 +- .../components/templates/header/styles.ts | 2 +- .../wallet-assets/lib/hooks/use-barcode.ts | 10 +- .../lib/hooks/use-new-notifications-count.ts | 4 +- .../wallet-assets/utils/balance-reducer.ts | 2 +- .../base/wallet-session-item/index.tsx | 6 +- .../composite/wallet-approval-view/index.tsx | 24 +- .../wallet-connection-failed-view/index.tsx | 6 +- .../index.tsx | 6 +- .../composite/wallet-sessions-label/index.tsx | 2 +- .../composite/wallet-sessions-list/index.tsx | 2 +- .../templates/wallet-connect-modal/index.tsx | 6 +- .../templates/wallet-connect-modal/styles.ts | 2 +- .../wallet-session-bottom-sheet/index.tsx | 10 +- .../wallet-session-bottom-sheet/styles.ts | 2 +- .../context/wallet-connect.context.ts | 4 +- .../hooks/use-wallet-kit-events-manager.ts | 10 +- src/features/wallet-connect/lib/wc.core.ts | 2 +- .../utils/__tests__/helpers.test.ts | 2 +- src/hooks/cache/useNotificationSettings.ts | 4 +- src/hooks/cache/useWatchlist.ts | 9 +- src/hooks/database/useWalletByHash.ts | 2 +- src/hooks/query/useAMBPrice.ts | 4 +- src/hooks/query/useAMBPriceHistorical.ts | 2 +- src/hooks/query/useAmbrosusStakingPools.ts | 2 +- src/hooks/query/useBalanceOfAddress.ts | 2 +- src/hooks/query/useBridgeHistory.tsx | 4 +- src/hooks/query/useCurrencyRate.ts | 4 +- src/hooks/query/useERC20Balance.ts | 2 +- src/hooks/query/useEstimatedTransferFee.ts | 2 +- src/hooks/query/useExplorerAccountFromHash.ts | 2 +- src/hooks/query/useExplorerAccounts.ts | 6 +- src/hooks/query/useExplorerInfo.ts | 4 +- src/hooks/query/useNFTInfo.ts | 4 +- src/hooks/query/useNotifications.ts | 2 +- src/hooks/query/useSearchAccount.ts | 4 +- src/hooks/query/useTokensAndTransactions.ts | 12 +- src/hooks/query/useTransactionDetails.ts | 2 +- src/hooks/query/useTransactionsOfAddress.ts | 6 +- src/hooks/query/useTransactionsOfToken.ts | 4 +- src/hooks/useAppFocused.ts | 4 +- src/hooks/useAppInit.ts | 6 +- src/hooks/useBarcodeScanner.ts | 2 +- src/hooks/useListsAndAddressesFetcher.ts | 2 +- src/hooks/usePasscodeEntryRevealer.ts | 4 +- src/hooks/usePreventGoingBack.ts | 2 +- src/hooks/useSettingsWalletActions.ts | 4 +- src/hooks/useSupportedBiometrics.ts | 2 +- src/hooks/useUpdateScreenData.ts | 2 +- src/lib/UID/index.ts | 2 +- .../bridgeFunctions/calculateGazFee.ts | 6 +- .../getAllBridgeTokenBalance.ts | 2 +- .../bridgeFunctions/getBridgeFeeData.ts | 2 +- .../bridgeFunctions/getBridgePars.ts | 4 +- .../bridgeFunctions/getTokenBridgeBalance.ts | 2 +- .../bridgeFunctions/parseBridgeTransaction.ts | 2 +- src/lib/bridgeSDK/models/types.ts | 2 +- src/lib/bridgeSDK/sdk/config.ts | 2 +- src/lib/bridgeSDK/sdk/index.ts | 6 +- src/lib/bridgeSDK/sdk/sdk.ts | 6 +- src/lib/bridgeSDK/sdk/withdraws.ts | 2 +- src/lib/crypto/AirDAOKeysForRef.ts | 6 +- src/lib/crypto/AirDAOKeysStorage.ts | 3 +- src/lib/crypto/TransferDispatcher.ts | 2 +- src/lib/event-dispatcher.ts | 2 +- .../sendFirebaseEvent.ts | 2 +- src/lib/index.ts | 2 +- src/lib/notification.ts | 2 +- src/lib/permission.ts | 2 +- src/lib/tests/cache.test.tsx | 2 +- src/models/Bridge.ts | 4 +- src/models/Explorer.ts | 2 +- src/models/StakingPool.ts | 2 +- src/models/Token.ts | 4 +- src/models/Transaction.ts | 2 +- src/navigation/NavigationContainer.tsx | 6 +- src/navigation/components/TabBar/index.tsx | 10 +- src/navigation/constants.tsx | 2 +- src/navigation/stacks/AppInit.tsx | 10 +- src/navigation/stacks/CommonStack.tsx | 10 +- src/navigation/stacks/RootStack.tsx | 8 +- src/navigation/stacks/Tabs/HomeStack.tsx | 28 +- src/navigation/stacks/Tabs/ProductsStack.tsx | 16 +- src/navigation/stacks/Tabs/SettingsStack.tsx | 26 +- src/navigation/stacks/TabsNavigator.tsx | 6 +- src/screens/AMBMarket/components/About.tsx | 6 +- .../AMBMarket/components/DetailedInfo.tsx | 8 +- .../AMBMarket/components/PriceInfo.tsx | 4 +- src/screens/AMBMarket/index.tsx | 14 +- src/screens/AMBMarket/styles.ts | 2 +- src/screens/Address/index.tsx | 16 +- src/screens/Address/styles.ts | 2 +- src/screens/Asset/index.tsx | 14 +- src/screens/BarcodeScanner/index.tsx | 14 +- src/screens/Bridge/Bridge.tsx | 10 +- .../BridgeTransferError.tsx | 14 +- src/screens/BridgeHistory/BridgeHistory.tsx | 2 +- .../screens/CreateWalletStep0/index.tsx | 10 +- .../screens/CreateWalletStep1/Step1.styles.ts | 2 +- .../screens/CreateWalletStep1/index.tsx | 8 +- .../CreateWalletStep2/MnemonicRandom.tsx | 4 +- .../CreateWalletStep2/MnemonicSelected.tsx | 4 +- .../CreateWalletStep2/Step2.styles.tsx | 2 +- .../screens/CreateWalletStep2/index.tsx | 14 +- src/screens/CreateWallet/styles.ts | 2 +- .../Harbor/ProcessStake/ProcessStake.tsx | 24 +- .../components/HarborTitle/index.tsx | 2 +- .../components/RateInfo/RateInfo.tsx | 8 +- .../components/RateInfo/styles.tsx | 2 +- .../StakedBalanceInfo/StakedBalanceInfo.tsx | 4 +- .../components/StakedBalanceInfo/styles.tsx | 2 +- .../StakedHeaderIcon/StakeHeaderIcon.tsx | 2 +- .../StakeHarborScreen/StakeHarborScreen.tsx | 12 +- .../WithdrawHarborScreen.tsx | 12 +- .../WithdrawRequests/WithdrawRequests.tsx | 16 +- src/screens/ImportWalletMethods/index.tsx | 14 +- .../screens/ImportWallet/ImportWallet.tsx | 18 +- .../component/RenderWord/index.tsx | 4 +- .../PrivateKey/ImportWallet.PrivateKey.tsx | 14 +- .../ImportWalletMethods/screens/index.ts | 2 +- src/screens/ImportWalletMethods/styles.ts | 2 +- src/screens/Kosmos/index.tsx | 6 +- .../Kosmos/screens/KosmosMarket/index.tsx | 30 +- src/screens/NFTScreen/index.tsx | 12 +- src/screens/NoWallet/index.tsx | 10 +- src/screens/NoWallet/styles.ts | 2 +- .../Notifications/components/Header.tsx | 4 +- .../__tests__/NotificationBox.test.tsx | 4 +- .../components/notification-box/index.tsx | 4 +- .../components/notification-box/styles.ts | 2 +- src/screens/Notifications/index.tsx | 10 +- src/screens/Notifications/styles.ts | 2 +- src/screens/PasscodeEntry/index.tsx | 16 +- src/screens/Products/index.tsx | 2 +- .../components/address-input/index.tsx | 4 +- .../components/address-input/styles.ts | 2 +- .../SendFunds/components/confirm-tx/index.tsx | 20 +- .../SendFunds/components/confirm-tx/styles.ts | 2 +- .../components/estimated-fee/index.tsx | 2 +- .../components/use-max-button/index.tsx | 2 +- src/screens/SendFunds/index.tsx | 43 +- src/screens/Settings/Settings.constants.tsx | 6 +- src/screens/Settings/Settings.tsx | 6 +- src/screens/Settings/screens/About/index.tsx | 12 +- src/screens/Settings/screens/About/styles.ts | 2 +- .../Settings/screens/AccessKeys/index.tsx | 12 +- .../tabs/Mnemonic/AccessKeys.Mnemonic.tsx | 6 +- .../tabs/Private/AccessKeys.Private.tsx | 6 +- .../screens/AccessKeys/tabs/Private/styles.ts | 2 +- .../components/PrefrencesMenuItem.tsx | 6 +- .../components/SettingsModalItem.tsx | 2 +- .../modals/BottomSheetBaseCurrency/index.tsx | 12 +- .../BottomSheetSelectLanguage/index.tsx | 10 +- .../AppPreferences/components/modals/style.ts | 2 +- .../Settings/screens/AppPreferences/index.tsx | 12 +- .../Settings/screens/AppPreferences/styles.ts | 2 +- .../Settings/screens/ChangePasscode/index.tsx | 16 +- .../screens/Explore/components/WalletItem.tsx | 8 +- .../Settings/screens/Explore/index.tsx | 29 +- .../Settings/screens/Explore/styles.ts | 2 +- .../ManageWallets/ManageWallets.styles.ts | 2 +- .../screens/ManageWallets/ManageWallets.tsx | 10 +- .../ManageWallets/components/AllWallets.tsx | 4 +- .../ManageWallets/components/Wallet.tsx | 2 +- .../screens/NotificationSettings/index.tsx | 2 +- .../screens/SecuritySettings/index.tsx | 12 +- .../screens/SingleWallet/SingleWallet.tsx | 14 +- .../Settings/screens/SingleWallet/styles.ts | 2 +- .../BottomSheetConfirmRemoveGroup/index.tsx | 6 +- .../components/GroupItem/index.tsx | 16 +- .../components/ListsOfAddressGroup/index.tsx | 4 +- .../components/Collections/index.tsx | 8 +- .../PortfolioScreenTabItem/index.tsx | 2 +- .../components/Watchlists/index.tsx | 6 +- .../components/PortfolioScreenTabs/index.tsx | 16 +- .../Settings/screens/Watchlist/index.tsx | 10 +- src/screens/Settings/styles.ts | 2 +- src/screens/SetupPasscode/SetupPasscode.tsx | 8 +- .../SetupPasscode/screens/ConfirmPasscode.tsx | 6 +- .../screens/SuccessSetupSecurity.tsx | 10 +- src/screens/SingleCollection/index.tsx | 20 +- .../AddressItemWithCheckbox/index.tsx | 6 +- .../BottomSheetAddNewAddressToGroup/index.tsx | 22 +- .../modals/BottomSheetRenameAddress/index.tsx | 8 +- .../StakingPool/components/Pending/index.tsx | 2 +- .../components/Stake/Stake.Preview.tsx | 6 +- .../StakingPool/components/Stake/Stake.tsx | 23 +- .../StakingPool/components/StakingInfo.tsx | 8 +- .../Withdraw/BottomSheet/Withdraw.Preview.tsx | 8 +- .../components/Withdraw/BottomSheet/styles.ts | 2 +- .../components/Withdraw/Withdraw.tsx | 18 +- .../StakingPool/components/Withdraw/styles.ts | 2 +- src/screens/StakingPool/index.tsx | 22 +- .../StakingPool/screens/Stake.Error.tsx | 6 +- .../StakingPool/screens/Stake.Success.tsx | 16 +- src/screens/StakingPool/style.ts | 4 +- src/screens/StakingPools/index.tsx | 20 +- src/screens/Swap/index.tsx | 16 +- .../Swap/screens/settings/settings.tsx | 4 +- src/screens/Swap/screens/settings/styles.ts | 2 +- src/screens/Swap/styles.ts | 2 +- src/screens/Wallets/index.tsx | 16 +- src/screens/Wallets/styles.ts | 2 +- src/utils/__tests__/share.test.tsx | 4 +- src/utils/bridge.ts | 2 +- src/utils/cashback.ts | 6 +- src/utils/createContextSelector.tsx | 2 +- src/utils/device.ts | 2 +- src/utils/index.ts | 1 - src/utils/keys.ts | 7 +- src/utils/mnemonics.ts | 3 +- src/utils/share.ts | 4 +- src/utils/token.ts | 2 +- src/utils/wallet.ts | 21 +- tsconfig.json | 33 +- yarn.lock | 936 +++++++++++++++++- 669 files changed, 2790 insertions(+), 1904 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1ed406843..fb0ffdabf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,7 +8,9 @@ module.exports = { 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier', - 'plugin:prettier/recommended' + 'plugin:prettier/recommended', + 'plugin:import/recommended', + 'plugin:import/typescript' ], parserOptions: { ecmaVersion: 2018, @@ -17,7 +19,7 @@ module.exports = { jsx: true } }, - plugins: ['react-hooks', 'eslint-plugin-prettier'], + plugins: ['react-hooks', 'eslint-plugin-prettier', 'import'], rules: { 'react/prop-types': 'off', 'react/display-name': 'off', @@ -25,6 +27,40 @@ module.exports = { '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'error', + 'import/no-named-as-default': 'off', + 'import/no-named-as-default-member': 'off', + 'import/no-unresolved': 'error', + 'import/order': [ + 'error', + { + groups: [ + 'external', // External libraries like 'react', 'react-native' + 'builtin', // Built-in Node.js modules like 'fs' + 'internal', // Internal imports (e.g., aliases like '@components') + ['sibling', 'parent'], // Relative imports + 'index', // Index imports like './' + 'object', // Imports of objects + 'type' // Type imports (TypeScript) + ], + pathGroups: [ + { + pattern: 'react', + group: 'external', + position: 'before' + }, + { + pattern: 'react-native', + group: 'external', + position: 'before' + } + ], + pathGroupsExcludedImportTypes: ['react', 'react-native'], + alphabetize: { + order: 'asc', + caseInsensitive: true + } + } + ], 'prettier/prettier': [ 'error', { @@ -39,5 +75,16 @@ module.exports = { 'prefer-arrow-callback': 'error', 'no-console': ['error', { allow: ['warn', 'error', 'info'] }], 'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 1 }] + }, + settings: { + 'import/core-modules': ['react', 'react-native'], + 'import/resolver': { + typescript: { + alwaysTryTypes: true // TypeScript paths are respected + }, + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'] + } + } } }; diff --git a/package.json b/package.json index 3372bcc92..45e9c05a2 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "create-hash": "^1.2.0", "crypto-js": "^4.2.0", "elliptic": "^6.5.4", + "eslint-import-resolver-typescript": "^3.7.0", "ethereumjs-util": "^7.1.5", "ethers": "^5.7.2", "ethjs-provider-http": "^0.1.6", @@ -163,7 +164,7 @@ "eslint": "^8.36.0", "eslint-config-prettier": "^8.8.0", "eslint-config-standard-with-typescript": "^34.0.1", - "eslint-plugin-import": "^2.27.5", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^15.6.1", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.1.1", diff --git a/src/api/api.ts b/src/api/api.ts index ca14f96b5..f7166df6a 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,12 +1,12 @@ import axios from 'axios'; -import { AMBTokenDTO, StakingPoolDTO } from '@models/dtos'; +import { bridgeService } from '@api/bridge-service'; import { PriceSnapshot } from '@appTypes'; +import Config from '@constants/config'; import { AMBToken } from '@models'; -import { watcherService } from './watcher-service'; -import { explorerService } from './explorer-service'; +import { AMBTokenDTO, StakingPoolDTO } from '@models/dtos'; import { cryptoService } from './crypto-service'; -import Config from '@constants/config'; -import { bridgeService } from '@api/bridge-service'; +import { explorerService } from './explorer-service'; +import { watcherService } from './watcher-service'; const getAMBTokenData = async (): Promise => { try { diff --git a/src/api/bridge-service.ts b/src/api/bridge-service.ts index aa515a69d..a914eb742 100644 --- a/src/api/bridge-service.ts +++ b/src/api/bridge-service.ts @@ -1,7 +1,7 @@ import axios from 'axios'; +import Config from '@constants/config'; import { Config as BridgeConfig } from '@lib/bridgeSDK/models/types'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import Config from '@constants/config'; const BRIDGE_TRANSACTIONS_HISTORY_URL = Config.BRIDGE_HISTORY_URL; diff --git a/src/api/explorer-service.ts b/src/api/explorer-service.ts index adf7489af..7be7a405e 100644 --- a/src/api/explorer-service.ts +++ b/src/api/explorer-service.ts @@ -1,5 +1,8 @@ /* eslint-disable camelcase */ import axios from 'axios'; +import { TransactionType } from '@appTypes'; +import { PaginatedResponseBody } from '@appTypes/Pagination'; +import Config from '@constants/config'; import { ExplorerAccountDTO, ExplorerInfoDTO, @@ -7,9 +10,6 @@ import { TokenDTO, TransactionDTO } from '@models'; -import { TransactionType } from '@appTypes'; -import { PaginatedResponseBody } from '@appTypes/Pagination'; -import Config from '@constants/config'; import { SearchSort } from '@screens/Settings/screens/Explore/Search.types'; // deprecated // const exploreApiUrl = Config.EXPLORER_API_URL; diff --git a/src/api/harbor/harbor-service.ts b/src/api/harbor/harbor-service.ts index e7493e1b6..38d22b9c6 100644 --- a/src/api/harbor/harbor-service.ts +++ b/src/api/harbor/harbor-service.ts @@ -1,11 +1,11 @@ +import { RawRecord } from '@nozbe/watermelondb'; import { BigNumber, ethers } from 'ethers'; import { parseEther } from 'ethers/lib/utils'; -import { RawRecord } from '@nozbe/watermelondb'; -import Config from '@constants/config'; import { HARBOR_ABI } from '@api/harbor/abi/harbor'; -import { Cache, CacheKey } from '@lib/cache'; import { UNSTAKE_LOG_ABI } from '@api/harbor/abi/harbor-unstake-log-abi'; +import Config from '@constants/config'; import { ILogs } from '@entities/harbor/model/types'; +import { Cache, CacheKey } from '@lib/cache'; function calculateAPR(interestNumber: number, interestPeriodNumber: number) { const r = interestNumber / 1000000000; diff --git a/src/api/staking/staking-service.ts b/src/api/staking/staking-service.ts index 1965faad1..3f5727427 100644 --- a/src/api/staking/staking-service.ts +++ b/src/api/staking/staking-service.ts @@ -1,11 +1,11 @@ import { BigNumber, ethers, utils } from 'ethers'; -import Config from '@constants/config'; import { poolAbi, poolsAbi } from '@api/staking/abi'; import { PoolDetailsArgs, ReturnedPoolDetails, StakeArgs } from '@api/staking/types'; +import Config from '@constants/config'; import { Cache, CacheKey } from '@lib/cache'; import { CustomAppEvents, diff --git a/src/api/watcher-service.ts b/src/api/watcher-service.ts index 37feb9e03..23ebe99e4 100644 --- a/src/api/watcher-service.ts +++ b/src/api/watcher-service.ts @@ -1,11 +1,11 @@ /* eslint-disable camelcase */ import axios from 'axios'; +import { NotificationSettings } from '@appTypes'; +import Config from '@constants/config'; +import { DefaultNotificationSettings } from '@constants/variables'; import { NotificationService, UID } from '@lib'; import { Cache, CacheKey } from '@lib/cache'; import { WatcherInfoDTO } from '@models'; -import Config from '@constants/config'; -import { NotificationSettings } from '@appTypes'; -import { DefaultNotificationSettings } from '@constants/variables'; const updatePushTokenAPI = `${Config.WALLET_API_URL}/api/v1`; const watcherAPI = `${Config.WALLET_API_URL}/api/v1/watcher`; diff --git a/src/appTypes/navigation/common.ts b/src/appTypes/navigation/common.ts index 81055fda3..d19cafc85 100644 --- a/src/appTypes/navigation/common.ts +++ b/src/appTypes/navigation/common.ts @@ -1,10 +1,10 @@ -import { CompositeNavigationProp } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; +import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { TabsParamsList } from './tabs'; import { ListsOfAddressType } from '@appTypes/ListsOfAddressGroup'; import { AccountList } from '@models'; import { PasscodeParams } from './passcode-params'; +import { TabsParamsList } from './tabs'; export type CommonStackParamsList = { Address: { address: ListsOfAddressType['addressId'] }; diff --git a/src/appTypes/navigation/harbor.ts b/src/appTypes/navigation/harbor.ts index 0072e04e9..aef5ee4f8 100644 --- a/src/appTypes/navigation/harbor.ts +++ b/src/appTypes/navigation/harbor.ts @@ -1,7 +1,7 @@ -import { CompositeNavigationProp } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; -import { TabsParamsList } from '@appTypes'; +import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { TabsParamsList } from '@appTypes'; export type HarborTabParamsList = { StakeHarborScreen: undefined; diff --git a/src/appTypes/navigation/index.ts b/src/appTypes/navigation/index.ts index 897217ab9..352ea8c02 100644 --- a/src/appTypes/navigation/index.ts +++ b/src/appTypes/navigation/index.ts @@ -2,7 +2,6 @@ export * from './common'; export * from './search'; export * from './lists'; export * from './root'; -export * from './search'; export * from './settings'; export * from './tabs'; export * from './wallets'; diff --git a/src/appTypes/navigation/lists.ts b/src/appTypes/navigation/lists.ts index f89f9cb15..6de3ad22a 100644 --- a/src/appTypes/navigation/lists.ts +++ b/src/appTypes/navigation/lists.ts @@ -1,7 +1,7 @@ -import { CompositeNavigationProp } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; -import { SettingsTabParamsList } from '@appTypes'; +import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { SettingsTabParamsList } from '@appTypes'; import { CommonStackParamsList } from './common'; export type PortfolioParamsPortfolio = { diff --git a/src/appTypes/navigation/products.ts b/src/appTypes/navigation/products.ts index 8f010ad56..5c1698024 100644 --- a/src/appTypes/navigation/products.ts +++ b/src/appTypes/navigation/products.ts @@ -1,9 +1,9 @@ import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { StakingPool } from '@models'; import { CommonStackParamsList, TabsParamsList } from '@appTypes'; import { MarketType } from '@features/kosmos/types'; +import { StakingPool } from '@models'; export type ProductsParams = { ProductsScreen: undefined; diff --git a/src/appTypes/navigation/root.ts b/src/appTypes/navigation/root.ts index 5fc418990..eb64771cf 100644 --- a/src/appTypes/navigation/root.ts +++ b/src/appTypes/navigation/root.ts @@ -1,11 +1,11 @@ +import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; import { CompositeNavigationProp, NavigatorScreenParams } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { TabsParamsList } from './tabs'; -import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; import { PasscodeParams } from '@appTypes/navigation/passcode-params'; +import { TabsParamsList } from './tabs'; export type RootStackParamsList = { AppInit: undefined; diff --git a/src/appTypes/navigation/search.ts b/src/appTypes/navigation/search.ts index 0ee16e52c..b307c7ba7 100644 --- a/src/appTypes/navigation/search.ts +++ b/src/appTypes/navigation/search.ts @@ -1,8 +1,8 @@ -import { CompositeNavigationProp } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; +import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { TabsParamsList } from './tabs'; import { CommonStackParamsList } from './common'; +import { TabsParamsList } from './tabs'; export type SearchTabParamsList = { Explore: Partial<{ address: string }>; diff --git a/src/appTypes/navigation/settings.ts b/src/appTypes/navigation/settings.ts index 829f62b9e..a5c3db520 100644 --- a/src/appTypes/navigation/settings.ts +++ b/src/appTypes/navigation/settings.ts @@ -1,10 +1,10 @@ -import { CompositeNavigationProp } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; +import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { WalletDBModel } from '@database'; -import { TabsParamsList } from './tabs'; -import { PasscodeParams } from './passcode-params'; import { AccountList } from '@models'; +import { PasscodeParams } from './passcode-params'; +import { TabsParamsList } from './tabs'; export type SettingsTabParamsList = { About: undefined; diff --git a/src/appTypes/navigation/tabs.ts b/src/appTypes/navigation/tabs.ts index 7ea62de33..b81ba8caa 100644 --- a/src/appTypes/navigation/tabs.ts +++ b/src/appTypes/navigation/tabs.ts @@ -1,5 +1,5 @@ -import { NavigatorScreenParams } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; +import { NavigatorScreenParams } from '@react-navigation/native'; import { HomeParamsList, SettingsTabParamsList } from '@appTypes'; export type TabsParamsList = { diff --git a/src/appTypes/navigation/wallets.ts b/src/appTypes/navigation/wallets.ts index 5169ac7af..555c94446 100644 --- a/src/appTypes/navigation/wallets.ts +++ b/src/appTypes/navigation/wallets.ts @@ -1,10 +1,10 @@ -import { CompositeNavigationProp } from '@react-navigation/native'; import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; +import { CompositeNavigationProp } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; -import { TabsParamsList } from './tabs'; -import { CommonStackParamsList } from './common'; -import { StakingPool, Token } from '@models'; import { MarketType } from '@features/kosmos/types'; +import { StakingPool, Token } from '@models'; +import { CommonStackParamsList } from './common'; +import { TabsParamsList } from './tabs'; export type HomeParamsList = { HomeScreen: undefined; diff --git a/src/components/animations/Rotation/Rotation.test.tsx b/src/components/animations/Rotation/Rotation.test.tsx index ec5b22c50..67dcb64b1 100644 --- a/src/components/animations/Rotation/Rotation.test.tsx +++ b/src/components/animations/Rotation/Rotation.test.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { render } from '@testing-library/react-native'; +import { RotationAnimation } from '@components/animations'; import { ChevronDownIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { RotationAnimation } from '@components/animations'; jest.mock('react-native-reanimated', () => { const Reanimated = jest.requireActual('react-native-reanimated/mock'); diff --git a/src/components/base/BottomSheetStatusView/error/index.tsx b/src/components/base/BottomSheetStatusView/error/index.tsx index 190d0e096..c38d645b4 100644 --- a/src/components/base/BottomSheetStatusView/error/index.tsx +++ b/src/components/base/BottomSheetStatusView/error/index.tsx @@ -1,14 +1,14 @@ import React, { PropsWithChildren, useCallback, useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { t } from 'i18next'; -import { styles } from '../styles'; -import { ErrorIcon } from '@components/svg/icons/v2'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Spacer } from '@components/base/Spacer'; -import { PrimaryButton } from '@components/modular'; import { Text } from '@components/base/Text'; +import { PrimaryButton } from '@components/modular'; +import { ErrorIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { verticalScale, cssShadowToNative } from '@utils'; +import { styles } from '../styles'; interface BottomSheetSuccessViewProps extends PropsWithChildren { title?: string; diff --git a/src/components/base/BottomSheetStatusView/success/index.tsx b/src/components/base/BottomSheetStatusView/success/index.tsx index ecf543f3f..2bb89962e 100644 --- a/src/components/base/BottomSheetStatusView/success/index.tsx +++ b/src/components/base/BottomSheetStatusView/success/index.tsx @@ -1,14 +1,14 @@ import React, { PropsWithChildren, useCallback, useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { t } from 'i18next'; -import { styles } from '../styles'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Spacer } from '@components/base/Spacer'; -import { PrimaryButton } from '@components/modular'; import { Text } from '@components/base/Text'; +import { PrimaryButton } from '@components/modular'; +import { SuccessIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { cssShadowToNative, verticalScale } from '@utils'; -import { SuccessIcon } from '@components/svg/icons/v2'; +import { styles } from '../styles'; interface BottomSheetSuccessViewProps extends PropsWithChildren { title?: string; diff --git a/src/components/base/Button/Button.Bordered.tsx b/src/components/base/Button/Button.Bordered.tsx index fbf8dcd82..7118b3f40 100644 --- a/src/components/base/Button/Button.Bordered.tsx +++ b/src/components/base/Button/Button.Bordered.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { ViewStyle } from 'react-native'; +import { COLORS } from '@constants/colors'; import { BaseButton } from './Button.Base'; import { BorderedButtonProps } from './Button.types'; -import { COLORS } from '@constants/colors'; export function BorderedButton(props: BorderedButtonProps): JSX.Element { const { diff --git a/src/components/base/Button/ButtonBase.test.tsx b/src/components/base/Button/ButtonBase.test.tsx index af2974f0d..249e29c05 100644 --- a/src/components/base/Button/ButtonBase.test.tsx +++ b/src/components/base/Button/ButtonBase.test.tsx @@ -1,7 +1,7 @@ -import { fireEvent, render } from '@testing-library/react-native'; import React from 'react'; -import { BaseButton } from '../../base/Button/Button.Base'; import { Text } from 'react-native'; +import { fireEvent, render } from '@testing-library/react-native'; +import { BaseButton } from '../../base/Button/Button.Base'; import clearAllMocks = jest.clearAllMocks; describe('BaseButton', () => { diff --git a/src/components/base/ExplorerTransactions/details-item-typography/index.tsx b/src/components/base/ExplorerTransactions/details-item-typography/index.tsx index 00d249bcf..03658f6f2 100644 --- a/src/components/base/ExplorerTransactions/details-item-typography/index.tsx +++ b/src/components/base/ExplorerTransactions/details-item-typography/index.tsx @@ -1,8 +1,8 @@ import React, { PropsWithChildren, useMemo } from 'react'; import { StyleProp, TextStyle } from 'react-native'; import { Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { TextProps } from '@components/base/Text/Text.types'; +import { COLORS } from '@constants/colors'; interface DetailsItemTypographyProps extends PropsWithChildren { readonly type?: 'key' | 'value'; diff --git a/src/components/base/FloatButton/index.tsx b/src/components/base/FloatButton/index.tsx index e57217e33..1d0ac435a 100644 --- a/src/components/base/FloatButton/index.tsx +++ b/src/components/base/FloatButton/index.tsx @@ -1,10 +1,10 @@ import React, { memo } from 'react'; import { Pressable, StyleSheet, TextStyle } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { COLORS } from '@constants/colors'; import { Spacer, Text } from '@components/base'; -import { moderateScale, scale, verticalScale, NavigationUtils } from '@utils'; +import { COLORS } from '@constants/colors'; import { useCurrentRoute } from '@contexts'; +import { moderateScale, scale, verticalScale, NavigationUtils } from '@utils'; type Props = { title?: string; diff --git a/src/components/base/Input/Input.number.tsx b/src/components/base/Input/Input.number.tsx index ca703c071..6890619a8 100644 --- a/src/components/base/Input/Input.number.tsx +++ b/src/components/base/Input/Input.number.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { InputProps, InputRef } from './Input.types'; -import { TextInput } from './Input.text'; import { COLORS } from '@constants/colors'; import { StringUtils } from '@utils'; +import { TextInput } from './Input.text'; +import { InputProps, InputRef } from './Input.types'; export const NumberInput = React.forwardRef( (props, ref) => { diff --git a/src/components/base/Input/Input.text.tsx b/src/components/base/Input/Input.text.tsx index 136f2135f..980959dec 100644 --- a/src/components/base/Input/Input.text.tsx +++ b/src/components/base/Input/Input.text.tsx @@ -1,8 +1,8 @@ import React, { useImperativeHandle, useRef, useState } from 'react'; import { TextInput as RNTextInput, StyleSheet } from 'react-native'; -import { InputProps, InputRef } from './Input.types'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; +import { InputProps, InputRef } from './Input.types'; export const TextInput = React.forwardRef( (props, ref) => { diff --git a/src/components/base/RadioButton/index.tsx b/src/components/base/RadioButton/index.tsx index c6eaec180..5d3292cf3 100644 --- a/src/components/base/RadioButton/index.tsx +++ b/src/components/base/RadioButton/index.tsx @@ -1,5 +1,5 @@ -import { TouchableOpacity, View, StyleSheet } from 'react-native'; import React from 'react'; +import { TouchableOpacity, View, StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; type Props = { diff --git a/src/components/base/Separator.tsx b/src/components/base/Separator.tsx index eaeb931e3..3315535d2 100644 --- a/src/components/base/Separator.tsx +++ b/src/components/base/Separator.tsx @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; import React from 'react'; import { View } from 'react-native'; +import { COLORS } from '@constants/colors'; interface SeparatorProps { height?: number | string; diff --git a/src/components/base/Spinner/index.tsx b/src/components/base/Spinner/index.tsx index b1c1cc0c8..02b5b512b 100644 --- a/src/components/base/Spinner/index.tsx +++ b/src/components/base/Spinner/index.tsx @@ -1,6 +1,5 @@ import React, { useEffect } from 'react'; import { View, ViewStyle } from 'react-native'; -import Svg, { Circle } from 'react-native-svg'; import Animated, { Easing, useAnimatedStyle, @@ -8,8 +7,9 @@ import Animated, { withRepeat, withTiming } from 'react-native-reanimated'; -import { styles } from './styles'; +import Svg, { Circle } from 'react-native-svg'; import { moderateScale } from '@utils'; +import { styles } from './styles'; export interface SpinnerProps { containerStyle?: ViewStyle; diff --git a/src/components/base/Switch/index.tsx b/src/components/base/Switch/index.tsx index 487fbc318..b615055cc 100644 --- a/src/components/base/Switch/index.tsx +++ b/src/components/base/Switch/index.tsx @@ -1,7 +1,7 @@ -import { COLORS } from '@constants/colors'; import React from 'react'; import { ColorValue, StyleProp, ViewProps, ViewStyle } from 'react-native'; import { Switch as RNGHSwitch } from 'react-native-gesture-handler'; +import { COLORS } from '@constants/colors'; interface SwitchProps { testID?: ViewProps['testID']; diff --git a/src/components/base/Text/index.tsx b/src/components/base/Text/index.tsx index d27b32cbd..25c5136f1 100644 --- a/src/components/base/Text/index.tsx +++ b/src/components/base/Text/index.tsx @@ -5,13 +5,13 @@ import { TextStyle as RNTextStyle, TextStyle } from 'react-native'; +import { COLORS } from '@constants/colors'; import { DEFAULT_FONT_SIZE, fontSizeMapping, fontWeightMapping } from './Text.constants'; import { FontSizeKey, TextProps } from './Text.types'; -import { COLORS } from '@constants/colors'; export function Text(props: TextProps): JSX.Element { const { diff --git a/src/components/base/index.ts b/src/components/base/index.ts index 0473e8cbf..55d35dcac 100644 --- a/src/components/base/index.ts +++ b/src/components/base/index.ts @@ -1,7 +1,7 @@ export * from './AnimatedText'; export * from './Badge'; export { Button, ButtonType } from './Button'; -export * from './Input'; +export { Input, InputProps, InputRef } from './Input'; export * from './Text'; export * from './Row'; export * from './KeyboardDismissingView'; diff --git a/src/components/composite/BottomSheet/index.tsx b/src/components/composite/BottomSheet/index.tsx index d160eeb1a..db013cd7a 100644 --- a/src/components/composite/BottomSheet/index.tsx +++ b/src/components/composite/BottomSheet/index.tsx @@ -13,17 +13,17 @@ import { View } from 'react-native'; import Modal from 'react-native-modal'; -import { styles } from './BottomSheet.styles'; -import { BottomSheetProps, BottomSheetRef } from './BottomSheet.types'; -import { BottomSheetBorderRadius } from './BottomSheet.constants'; +import { AirDAOEventType } from '@appTypes'; import { Row, Separator, Text } from '@components/base'; +import { CloseCircleIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { useFullscreenModalHeight } from '@hooks/useFullscreenModalHeight'; import { useKeyboardHeight } from '@hooks/useKeyboardHeight'; -import { COLORS } from '@constants/colors'; import { AirDAOEventDispatcher } from '@lib'; -import { AirDAOEventType } from '@appTypes'; +import { BottomSheetBorderRadius } from './BottomSheet.constants'; +import { styles } from './BottomSheet.styles'; +import { BottomSheetProps, BottomSheetRef } from './BottomSheet.types'; import { Toast } from '../../modular/Toast'; -import { CloseCircleIcon } from '@components/svg/icons/v2'; const DEFAULT_BACKDROP_OPACITY = 1; diff --git a/src/components/composite/Button/CopyToClipboard.tsx b/src/components/composite/Button/CopyToClipboard.tsx index 0ae41592f..f805ea629 100644 --- a/src/components/composite/Button/CopyToClipboard.tsx +++ b/src/components/composite/Button/CopyToClipboard.tsx @@ -1,24 +1,24 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; +import { StyleProp, View, ViewStyle } from 'react-native'; import * as Clipboard from 'expo-clipboard'; import { useTranslation } from 'react-i18next'; -import { TextProps } from '@components/base/Text/Text.types'; import { Button, Row, Spacer, Text } from '@components/base'; -import { IconProps } from '@components/svg/icons'; -import { scale } from '@utils'; +import { BaseButtonProps } from '@components/base/Button'; +import { TextProps } from '@components/base/Text/Text.types'; import { Toast, ToastOptions, ToastPosition, ToastType } from '@components/modular/Toast'; -import { BaseButtonProps } from '@components/base/Button'; -import { StyleProp, View, ViewStyle } from 'react-native'; -import { COLORS } from '@constants/colors'; -import { CopyIconV2 } from '@components/svg/icons/v2/settings'; +import { IconProps } from '@components/svg/icons'; import { CheckboxCircleFill, ClipboardFillIcon } from '@components/svg/icons/v2'; +import { CopyIconV2 } from '@components/svg/icons/v2/settings'; +import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export interface CopyToClipboardButtonProps extends Omit { diff --git a/src/components/composite/CenteredSpinner.tsx b/src/components/composite/CenteredSpinner.tsx index 9b90e46db..7c1f18a4a 100644 --- a/src/components/composite/CenteredSpinner.tsx +++ b/src/components/composite/CenteredSpinner.tsx @@ -1,6 +1,6 @@ -import { Spinner, SpinnerProps } from '@components/base'; import React from 'react'; import { View } from 'react-native'; +import { Spinner, SpinnerProps } from '@components/base'; export const CenteredSpinner = (props: SpinnerProps) => { const containerStyle = props.containerStyle || {}; diff --git a/src/components/composite/CheckBox/CheckBox.circular.tsx b/src/components/composite/CheckBox/CheckBox.circular.tsx index bda38cabe..0ca719e40 100644 --- a/src/components/composite/CheckBox/CheckBox.circular.tsx +++ b/src/components/composite/CheckBox/CheckBox.circular.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { View } from 'react-native'; -import { CircularCheckBoxProps } from './CheckBox.types'; import { Button } from '@components/base'; -import { moderateScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale } from '@utils'; +import { CircularCheckBoxProps } from './CheckBox.types'; export const CheckBoxCircular = (props: CircularCheckBoxProps): JSX.Element => { const { diff --git a/src/components/composite/CheckBox/CheckBox.square.tsx b/src/components/composite/CheckBox/CheckBox.square.tsx index fabe2ee12..f38e24c0b 100644 --- a/src/components/composite/CheckBox/CheckBox.square.tsx +++ b/src/components/composite/CheckBox/CheckBox.square.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { SquareCheckBoxProps } from './CheckBox.types'; import { Button } from '@components/base'; import { CheckIcon } from '@components/svg/icons'; -import { moderateScale, scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale } from '@utils'; +import { SquareCheckBoxProps } from './CheckBox.types'; export const CheckBoxSquare = (props: SquareCheckBoxProps): JSX.Element => { const { fillColor, value, onValueChange, testID, ...iconProps } = props; diff --git a/src/components/composite/CheckBox/index.tsx b/src/components/composite/CheckBox/index.tsx index f0a31e82a..6773c8f1c 100644 --- a/src/components/composite/CheckBox/index.tsx +++ b/src/components/composite/CheckBox/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { CheckBoxFactoryProps } from './CheckBox.types'; -import { CheckBoxSquare } from './CheckBox.square'; import { CheckBoxCircular } from './CheckBox.circular'; +import { CheckBoxSquare } from './CheckBox.square'; +import { CheckBoxFactoryProps } from './CheckBox.types'; export const CheckBox = (props: CheckBoxFactoryProps): JSX.Element => { const { type, ...checkBoxProps } = props; diff --git a/src/components/composite/DatePicker/index.tsx b/src/components/composite/DatePicker/index.tsx index 6d2c33b88..89d656ece 100644 --- a/src/components/composite/DatePicker/index.tsx +++ b/src/components/composite/DatePicker/index.tsx @@ -1,8 +1,8 @@ import React, { useCallback } from 'react'; import CalendarPicker from 'react-native-calendar-picker'; -import { DatePickerProps } from './DatePicker.types'; import { Row, Spacer } from '@components/base'; import { scale } from '@utils'; +import { DatePickerProps } from './DatePicker.types'; export const DatePicker = (props: DatePickerProps): JSX.Element => { const { selectedStartDate, selectedEndDate, period } = props; diff --git a/src/components/composite/Header/Header.styles.ts b/src/components/composite/Header/Header.styles.ts index 96d658f07..e7653853d 100644 --- a/src/components/composite/Header/Header.styles.ts +++ b/src/components/composite/Header/Header.styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; const leftPadding = '5%'; const rightPadding = '5%'; diff --git a/src/components/composite/Header/index.tsx b/src/components/composite/Header/index.tsx index 43b5eda02..f94ab8d02 100644 --- a/src/components/composite/Header/index.tsx +++ b/src/components/composite/Header/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { View } from 'react-native'; -import { BackIcon, CloseIcon } from '@components/svg/icons'; -import { Button, Row, Text } from '@components/base'; -import { HeaderProps } from './Header.types'; -import { styles } from './Header.styles'; import { useNavigation } from '@react-navigation/native'; +import { Button, Row, Text } from '@components/base'; +import { BackIcon, CloseIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; +import { styles } from './Header.styles'; +import { HeaderProps } from './Header.types'; export function Header(props: HeaderProps): JSX.Element { const { diff --git a/src/components/composite/InputWithIcon/index.tsx b/src/components/composite/InputWithIcon/index.tsx index 4159a90a9..8a6fb9c7c 100644 --- a/src/components/composite/InputWithIcon/index.tsx +++ b/src/components/composite/InputWithIcon/index.tsx @@ -1,14 +1,14 @@ import React, { forwardRef, useState } from 'react'; -import { InputProps } from '@components/base/Input'; -import { Input, InputRef, Spacer } from '@components/base'; -import { scale } from '@utils'; -import { styles } from './styles'; import { NativeSyntheticEvent, TextInputFocusEventData, View, ViewProps } from 'react-native'; +import { Input, InputRef, Spacer } from '@components/base'; +import { InputProps } from '@components/base/Input'; +import { scale } from '@utils'; +import { styles } from './styles'; interface InputWithIconProps extends InputProps { iconLeft?: React.ReactNode; diff --git a/src/components/composite/InputWithIcon/styles.ts b/src/components/composite/InputWithIcon/styles.ts index 5be5dc2d0..a33a1850d 100644 --- a/src/components/composite/InputWithIcon/styles.ts +++ b/src/components/composite/InputWithIcon/styles.ts @@ -1,6 +1,6 @@ import { Platform, StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/composite/PasscodeKeyboard/index.tsx b/src/components/composite/PasscodeKeyboard/index.tsx index 6ed3dd47f..160226f59 100644 --- a/src/components/composite/PasscodeKeyboard/index.tsx +++ b/src/components/composite/PasscodeKeyboard/index.tsx @@ -8,11 +8,11 @@ import { ViewStyle } from 'react-native'; import { Row } from '@components/base'; -import { DEVICE_HEIGHT } from '@constants/variables'; -import { scale, DeviceUtils } from '@utils'; -import { COLORS } from '@constants/colors'; import { BackIcon } from '@components/svg/icons'; import { FingerPrintIcon, FaceIDIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; +import { DEVICE_HEIGHT } from '@constants/variables'; +import { scale, DeviceUtils } from '@utils'; const DEFAULT_BUTTONS = [ ['1', '2', '3'], diff --git a/src/components/composite/PercentChange.tsx b/src/components/composite/PercentChange.tsx index 850f29876..2ae880b32 100644 --- a/src/components/composite/PercentChange.tsx +++ b/src/components/composite/PercentChange.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { Row, Text } from '@components/base'; import { TextProps } from '@components/base/Text/Text.types'; -import { NumberUtils } from '@utils'; import { COLORS } from '@constants/colors'; +import { NumberUtils } from '@utils'; interface PercentChangeProps extends Pick { diff --git a/src/components/composite/PercentageBox/index.tsx b/src/components/composite/PercentageBox/index.tsx index 68be22960..72c677376 100644 --- a/src/components/composite/PercentageBox/index.tsx +++ b/src/components/composite/PercentageBox/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { styles } from './styles'; import { Button, Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { styles } from './styles'; interface PercentageBoxProps { percentage: number; diff --git a/src/components/composite/PopUpInfo/index.tsx b/src/components/composite/PopUpInfo/index.tsx index 1098c6ce5..62174f3b3 100644 --- a/src/components/composite/PopUpInfo/index.tsx +++ b/src/components/composite/PopUpInfo/index.tsx @@ -2,10 +2,10 @@ import React from 'react'; import { View } from 'react-native'; import Popover, { PopoverPlacement } from 'react-native-popover-view'; import { Button, Spacer, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; import { PopUpInfoProps } from './PopUpInfo.types'; import { styles } from './styles'; -import { scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; export const PopUpInfo = (props: PopUpInfoProps): JSX.Element => { const { diff --git a/src/components/composite/SegmentedPicker/index.tsx b/src/components/composite/SegmentedPicker/index.tsx index 5a1f1252d..8f5a70890 100644 --- a/src/components/composite/SegmentedPicker/index.tsx +++ b/src/components/composite/SegmentedPicker/index.tsx @@ -1,7 +1,7 @@ -import { Button, Row, Text } from '@components/base'; import React from 'react'; -import { COLORS } from '@constants/colors'; import { TextStyle, ViewStyle } from 'react-native'; +import { Button, Row, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; import { styles as staticStyles } from './styles'; export interface Segment { diff --git a/src/components/composite/Slider/index.tsx b/src/components/composite/Slider/index.tsx index 50271e172..dddfcd7a4 100644 --- a/src/components/composite/Slider/index.tsx +++ b/src/components/composite/Slider/index.tsx @@ -9,14 +9,14 @@ import Animated, { useDerivedValue, runOnJS } from 'react-native-reanimated'; -import { SliderProps } from './Slider.types'; +import { COLORS } from '@constants/colors'; import { SliderEmptyColor, SliderFillColor, SliderKnobColor, SliderKnobSize } from './Slider.constants'; -import { COLORS } from '@constants/colors'; +import { SliderProps } from './Slider.types'; Animated.addWhitelistedNativeProps({ text: true }); const AnimatedTextInput = Animated.createAnimatedComponent(TextInput); diff --git a/src/components/composite/TextOrSpinner/index.tsx b/src/components/composite/TextOrSpinner/index.tsx index de9146b9d..63be88178 100644 --- a/src/components/composite/TextOrSpinner/index.tsx +++ b/src/components/composite/TextOrSpinner/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Row, Spacer, Spinner, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { FontFamily } from '@components/base/Text/Text.types'; +import { COLORS } from '@constants/colors'; import { scale } from '@utils'; interface TextOrSpinnerProps { diff --git a/src/components/modular/AnimatedTabs/index.tsx b/src/components/modular/AnimatedTabs/index.tsx index 08373e073..de3569759 100644 --- a/src/components/modular/AnimatedTabs/index.tsx +++ b/src/components/modular/AnimatedTabs/index.tsx @@ -12,11 +12,11 @@ import Animated, { useSharedValue, withTiming } from 'react-native-reanimated'; -import { styles } from './styles'; import { Button, Row, Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; import { DEVICE_WIDTH } from '@constants/variables'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; type AnimatedTab = { view: JSX.Element; diff --git a/src/components/modular/AnimatedTabsV2/index.tsx b/src/components/modular/AnimatedTabsV2/index.tsx index d922dce90..d054f5a31 100644 --- a/src/components/modular/AnimatedTabsV2/index.tsx +++ b/src/components/modular/AnimatedTabsV2/index.tsx @@ -12,10 +12,10 @@ import Animated, { useSharedValue, withTiming } from 'react-native-reanimated'; -import { styles } from './styles'; import { Button, Row, Text } from '@components/base'; -import { scale } from '@utils'; import { DEVICE_WIDTH } from '@constants/variables'; +import { scale } from '@utils'; +import { styles } from './styles'; type AnimatedTab = { icon?: JSX.Element; diff --git a/src/components/modular/BalanceRow/index.tsx b/src/components/modular/BalanceRow/index.tsx index 6342459ed..a2567c5db 100644 --- a/src/components/modular/BalanceRow/index.tsx +++ b/src/components/modular/BalanceRow/index.tsx @@ -1,16 +1,16 @@ import React, { useCallback, useEffect, useMemo } from 'react'; import { BigNumber, ethers } from 'ethers'; import { t } from 'i18next'; -import { Token } from '@models'; import { CryptoCurrencyCode } from '@appTypes'; -import { useERC20Balance, useUSDPrice } from '@hooks'; -import { Button, Row, Spacer, Text } from '@components/base'; import { ShimmerLoader } from '@components/animations'; +import { Button, Row, Spacer, Text } from '@components/base'; import { WalletOutlineIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; -import { NumberUtils, scale } from '@utils'; -import { useAMBEntity } from '@features/send-funds/lib/hooks'; import { useWalletStore } from '@entities/wallet'; +import { useAMBEntity } from '@features/send-funds/lib/hooks'; +import { useERC20Balance, useUSDPrice } from '@hooks'; +import { Token } from '@models'; +import { NumberUtils, scale } from '@utils'; interface BalanceRowProps { readonly token: Token; diff --git a/src/components/modular/BottomSheetWithHeader/index.tsx b/src/components/modular/BottomSheetWithHeader/index.tsx index c2f99d3c1..9bbba379e 100644 --- a/src/components/modular/BottomSheetWithHeader/index.tsx +++ b/src/components/modular/BottomSheetWithHeader/index.tsx @@ -1,4 +1,5 @@ import React, { forwardRef } from 'react'; +import { Button, Text } from '@components/base'; import { BottomSheet, BottomSheetProps, @@ -6,9 +7,8 @@ import { Header } from '@components/composite'; import { CloseIcon } from '@components/svg/icons'; -import { Button, Text } from '@components/base'; -import { useForwardedRef } from '@hooks/useForwardedRef'; import { COLORS } from '@constants/colors'; +import { useForwardedRef } from '@hooks/useForwardedRef'; import { styles } from './styles'; interface BottomSheetWithHeaderProps extends BottomSheetProps { diff --git a/src/components/modular/Button/Gradient.tsx b/src/components/modular/Button/Gradient.tsx index 8471dd0d9..58670e37d 100644 --- a/src/components/modular/Button/Gradient.tsx +++ b/src/components/modular/Button/Gradient.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { StyleSheet } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import { Button } from '@components/base'; -import { moderateScale, scale, verticalScale } from '@utils'; import { ButtonProps } from '@components/base/Button'; +import { moderateScale, scale, verticalScale } from '@utils'; export interface GradientButtonProps extends React.PropsWithChildren { onPress: () => void; diff --git a/src/components/modular/Passcode/index.tsx b/src/components/modular/Passcode/index.tsx index c60890038..81213c60d 100644 --- a/src/components/modular/Passcode/index.tsx +++ b/src/components/modular/Passcode/index.tsx @@ -2,9 +2,9 @@ import React, { forwardRef, useCallback, useEffect, useState } from 'react'; import { TextInput, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { dropRight, split } from 'lodash'; +import { Button, Spacer } from '@components/base'; import { PasscodeKeyboard } from '@components/composite/PasscodeKeyboard'; import { styles } from '@components/modular/Passcode/styles'; -import { Button, Spacer } from '@components/base'; import { useForwardedRef } from '@hooks'; import { DeviceUtils, scale, StringUtils } from '@utils'; diff --git a/src/components/modular/PrivateKeyMaskedInput/index.tsx b/src/components/modular/PrivateKeyMaskedInput/index.tsx index 4d23a8e08..05cc276d3 100644 --- a/src/components/modular/PrivateKeyMaskedInput/index.tsx +++ b/src/components/modular/PrivateKeyMaskedInput/index.tsx @@ -13,10 +13,10 @@ import { TextStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { Clipboard, moderateScale, scale, verticalScale } from '@utils'; -import { TextInput } from '@components/base/Input/Input.text'; import { InputRef, TextInputProps } from '@components/base'; +import { TextInput } from '@components/base/Input/Input.text'; import { COLORS } from '@constants/colors'; +import { Clipboard, moderateScale, scale, verticalScale } from '@utils'; type SelectionKeys = 'start' | 'end'; type SelectionObject = Record; diff --git a/src/components/modular/QRCodeWithLogo/styles.ts b/src/components/modular/QRCodeWithLogo/styles.ts index 811e5f774..14c3c11e4 100644 --- a/src/components/modular/QRCodeWithLogo/styles.ts +++ b/src/components/modular/QRCodeWithLogo/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/modular/SingleAsset/index.tsx b/src/components/modular/SingleAsset/index.tsx index 66e43af82..b154511d3 100644 --- a/src/components/modular/SingleAsset/index.tsx +++ b/src/components/modular/SingleAsset/index.tsx @@ -1,13 +1,13 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; import { ethers } from 'ethers'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { useUSDPrice } from '@hooks'; import { Token } from '@models'; -import { TokenLogo, TokenLogoProps } from '../TokenLogo'; import { NumberUtils, StringUtils, StringValidators, scale } from '@utils'; +import { TokenLogo, TokenLogoProps } from '../TokenLogo'; +import { styles } from './styles'; interface SingleAssetProps { token: Token; diff --git a/src/components/modular/SingleAsset/styles.ts b/src/components/modular/SingleAsset/styles.ts index fdbc4c8f4..2fb46d4f5 100644 --- a/src/components/modular/SingleAsset/styles.ts +++ b/src/components/modular/SingleAsset/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/modular/SingleAssetNFT/index.tsx b/src/components/modular/SingleAssetNFT/index.tsx index 4aef49177..2e99d6205 100644 --- a/src/components/modular/SingleAssetNFT/index.tsx +++ b/src/components/modular/SingleAssetNFT/index.tsx @@ -1,11 +1,11 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { TokenLogo, TokenLogoProps } from '../TokenLogo'; import { COLORS } from '@constants/colors'; import { Token } from '@models'; import { NumberUtils, scale } from '@utils'; +import { TokenLogo, TokenLogoProps } from '../TokenLogo'; +import { styles } from './styles'; interface SingleAssetProps { token: Token; diff --git a/src/components/modular/StakingPool/index.tsx b/src/components/modular/StakingPool/index.tsx index 11a31cd23..72424752e 100644 --- a/src/components/modular/StakingPool/index.tsx +++ b/src/components/modular/StakingPool/index.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { ethers } from 'ethers'; -import { StakingPool } from '@models'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { useStakingPoolDetails } from '@entities/staking'; -import { TokenLogo } from '../TokenLogo'; import { COLORS } from '@constants/colors'; +import { useStakingPoolDetails } from '@entities/staking'; +import { StakingPool } from '@models'; import { scale, verticalScale, TokenUtils, NumberUtils } from '@utils'; +import { TokenLogo } from '../TokenLogo'; interface StakingPoolItemProps { stakingPool: StakingPool; diff --git a/src/components/modular/Toast/Toast.body.tsx b/src/components/modular/Toast/Toast.body.tsx index d269d67ca..c7878bc82 100644 --- a/src/components/modular/Toast/Toast.body.tsx +++ b/src/components/modular/Toast/Toast.body.tsx @@ -2,11 +2,11 @@ import React from 'react'; import { View } from 'react-native'; import { Button, Row, Spacer, Text } from '@components/base'; import { CloseIcon } from '@components/svg/icons'; -import { ToastAction, ToastOptions } from './Toast.types'; import { COLORS } from '@constants/colors'; +import { verticalScale } from '@utils'; import { ToastBg, ToastBorderColor, ToastStatusIcon } from './Toast.constants'; import { styles } from './Toast.styles'; -import { verticalScale } from '@utils'; +import { ToastAction, ToastOptions } from './Toast.types'; export const AlertBanner = ( props: Pick & { diff --git a/src/components/modular/Toast/Toast.constants.tsx b/src/components/modular/Toast/Toast.constants.tsx index 1130f5db7..67eb643b2 100644 --- a/src/components/modular/Toast/Toast.constants.tsx +++ b/src/components/modular/Toast/Toast.constants.tsx @@ -1,9 +1,9 @@ import React, { ReactElement } from 'react'; +import { Spinner } from '@components/base'; import { InfoIcon, QuestionMarkIcon, WarningIcon } from '@components/svg/icons'; +import { CheckboxCircleFill } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; -import { Spinner } from '@components/base'; import { ToastType } from './Toast.types'; -import { CheckboxCircleFill } from '@components/svg/icons/v2'; export const ToastBg: { [key in ToastType]: string } = { [ToastType.Highlight]: COLORS.warning100, diff --git a/src/components/modular/Toast/Toast.styles.ts b/src/components/modular/Toast/Toast.styles.ts index 47c470750..b96df1acc 100644 --- a/src/components/modular/Toast/Toast.styles.ts +++ b/src/components/modular/Toast/Toast.styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ containerStyle: { diff --git a/src/components/modular/Toast/Toast.wrapper.tsx b/src/components/modular/Toast/Toast.wrapper.tsx index 79c535fc3..36f49fb3c 100644 --- a/src/components/modular/Toast/Toast.wrapper.tsx +++ b/src/components/modular/Toast/Toast.wrapper.tsx @@ -18,9 +18,9 @@ import Animated, { } from 'react-native-reanimated'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { scale, verticalScale } from '@utils'; -import { ToastOptions, ToastPosition, ToastType } from './Toast.types'; -import { TOAST_DEFAULT_DURATION } from './Toast.constants'; import { AlertBanner } from './Toast.body'; +import { TOAST_DEFAULT_DURATION } from './Toast.constants'; +import { ToastOptions, ToastPosition, ToastType } from './Toast.types'; export const ToastWrapper = forwardRef((_, ref) => { const { top: topInset, bottom: bottomInset } = useSafeAreaInsets(); diff --git a/src/components/modular/TokenLogo/index.tsx b/src/components/modular/TokenLogo/index.tsx index c125b61d0..9a4a4001e 100644 --- a/src/components/modular/TokenLogo/index.tsx +++ b/src/components/modular/TokenLogo/index.tsx @@ -1,4 +1,5 @@ import React, { useMemo } from 'react'; +import { CryptoCurrencyCode } from '@appTypes'; import { AirBondIcon, AirdaoBlueIcon, @@ -19,7 +20,6 @@ import { UnknownTokenIcon, UsdcIcon } from '@components/svg/icons'; -import { CryptoCurrencyCode } from '@appTypes'; import NFTIcon from '@components/svg/icons/NFTIcon'; import { getTokenNameFromDatabase } from '@utils'; diff --git a/src/components/modular/TokenSelector/index.tsx b/src/components/modular/TokenSelector/index.tsx index 7149bc4d2..8041bc1ef 100644 --- a/src/components/modular/TokenSelector/index.tsx +++ b/src/components/modular/TokenSelector/index.tsx @@ -1,12 +1,12 @@ import React, { useCallback, useMemo } from 'react'; import { TextStyle, TouchableOpacity, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { TokenLogo } from '../TokenLogo'; -import { COLORS } from '@constants/colors'; import { ArrowBottomFillIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { TToken, wrapTokenIcon, scale } from '@utils'; +import { TokenLogo } from '../TokenLogo'; +import { styles } from './styles'; interface TokenSelectorProps { readonly token: TToken; diff --git a/src/components/modular/TransactionItem/index.tsx b/src/components/modular/TransactionItem/index.tsx index 03d6794f7..e29bb1f99 100644 --- a/src/components/modular/TransactionItem/index.tsx +++ b/src/components/modular/TransactionItem/index.tsx @@ -1,12 +1,12 @@ import React, { useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; import { View } from 'react-native'; -import { Transaction, TransactionTokenInfo } from '@models'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { _txStatusLabel, _txStatusThumbnail } from '@features/explorer/utils'; +import { Transaction, TransactionTokenInfo } from '@models'; import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { styles } from './styles'; -import { _txStatusLabel, _txStatusThumbnail } from '@features/explorer/utils'; interface TransactionItemProps { transaction: Transaction; diff --git a/src/components/modular/WalletCard/index.tsx b/src/components/modular/WalletCard/index.tsx index 4ff71cc53..ff5abdb0c 100644 --- a/src/components/modular/WalletCard/index.tsx +++ b/src/components/modular/WalletCard/index.tsx @@ -1,13 +1,13 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; import { Row, Spacer, Spinner, Text } from '@components/base'; +import { TextProps } from '@components/base/Text/Text.types'; import { CopyToClipboardButton } from '@components/composite'; +import { LogoGradient } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { StringUtils, NumberUtils, scale, verticalScale } from '@utils'; -import { LogoGradient } from '@components/svg/icons'; +import { styles } from './styles'; import { ToastOptions, ToastPosition } from '../Toast'; -import { TextProps } from '@components/base/Text/Text.types'; export interface WalletCardProps { address: string; diff --git a/src/components/modular/WalletCard/styles.ts b/src/components/modular/WalletCard/styles.ts index 3e6bb31c0..4a8ce3bc3 100644 --- a/src/components/modular/WalletCard/styles.ts +++ b/src/components/modular/WalletCard/styles.ts @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; import { shadow } from '@constants/shadow'; import { moderateScale, scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; export const WalletCardHeight = 139; diff --git a/src/components/svg/icons/AddressTracking.tsx b/src/components/svg/icons/AddressTracking.tsx index bdd645a3d..3b4bb7cfb 100644 --- a/src/components/svg/icons/AddressTracking.tsx +++ b/src/components/svg/icons/AddressTracking.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Circle, G, Mask, Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; export function AddressTrackingIcon(props: Omit) { const { scale = 1 } = props; diff --git a/src/components/svg/icons/Check.tsx b/src/components/svg/icons/Check.tsx index a884637a3..fd26ce2d8 100644 --- a/src/components/svg/icons/Check.tsx +++ b/src/components/svg/icons/Check.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function CheckIcon(props: IconProps) { const { color = COLORS.black, scale = 1 } = props; diff --git a/src/components/svg/icons/CheckIconCircle.tsx b/src/components/svg/icons/CheckIconCircle.tsx index 5d01a044a..88f36b4e1 100644 --- a/src/components/svg/icons/CheckIconCircle.tsx +++ b/src/components/svg/icons/CheckIconCircle.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { View } from 'react-native'; +import { CheckIcon } from '@components/svg/icons/Check'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { CheckIcon } from '@components/svg/icons/Check'; export const CheckIconCircle = () => ( { const { scale = 1, color = '#2DBA8D' } = props; diff --git a/src/components/svg/icons/ChevronDown.tsx b/src/components/svg/icons/ChevronDown.tsx index b2d79bedf..f747b7dc1 100644 --- a/src/components/svg/icons/ChevronDown.tsx +++ b/src/components/svg/icons/ChevronDown.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Path, Svg } from 'react-native-svg'; import { RotateTransform } from 'react-native'; +import { Path, Svg } from 'react-native-svg'; import { IconProps } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; diff --git a/src/components/svg/icons/CirculationIcon.tsx b/src/components/svg/icons/CirculationIcon.tsx index 991402926..77ac8f296 100644 --- a/src/components/svg/icons/CirculationIcon.tsx +++ b/src/components/svg/icons/CirculationIcon.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { IconProps } from '@components/svg/icons/Icon.types'; -const CirculationIcon = (props: IconProps) => ( + +export const CirculationIcon = (props: IconProps) => ( ( /> ); -export default CirculationIcon; diff --git a/src/components/svg/icons/DownArrow.tsx b/src/components/svg/icons/DownArrow.tsx index e8a50e2e1..7c76a209a 100644 --- a/src/components/svg/icons/DownArrow.tsx +++ b/src/components/svg/icons/DownArrow.tsx @@ -1,8 +1,8 @@ import React from 'react'; +import { RotateTransform } from 'react-native'; import { Path, Svg } from 'react-native-svg'; import { IconProps } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { RotateTransform } from 'react-native'; export function DownArrowIcon( props: Omit & { diff --git a/src/components/svg/icons/Kosmos.tsx b/src/components/svg/icons/Kosmos.tsx index 1a8e0139e..940435e15 100644 --- a/src/components/svg/icons/Kosmos.tsx +++ b/src/components/svg/icons/Kosmos.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function KosmosIcon(props: IconProps) { const { scale = 1, color = COLORS.neutral600 } = props; diff --git a/src/components/svg/icons/Language.tsx b/src/components/svg/icons/Language.tsx index 07344529f..91957c667 100644 --- a/src/components/svg/icons/Language.tsx +++ b/src/components/svg/icons/Language.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; export function LanguageIcon(props: IconProps) { diff --git a/src/components/svg/icons/List.tsx b/src/components/svg/icons/List.tsx index ed00499f9..048abf32f 100644 --- a/src/components/svg/icons/List.tsx +++ b/src/components/svg/icons/List.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function ListIcon(props: IconProps) { const { scale = 1, color = COLORS.brand600 } = props; diff --git a/src/components/svg/icons/LogoBig.tsx b/src/components/svg/icons/LogoBig.tsx index c861648fc..c63399f15 100644 --- a/src/components/svg/icons/LogoBig.tsx +++ b/src/components/svg/icons/LogoBig.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function LogoBigSVG(props: IconProps) { const { scale = 1, color = COLORS.gray500 } = props; diff --git a/src/components/svg/icons/LogoGradientCircular.tsx b/src/components/svg/icons/LogoGradientCircular.tsx index 250f7f6ed..121bded40 100644 --- a/src/components/svg/icons/LogoGradientCircular.tsx +++ b/src/components/svg/icons/LogoGradientCircular.tsx @@ -6,8 +6,8 @@ import Svg, { Path, Stop } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function LogoGradientCircular(props: IconProps) { const { scale = 1 } = props; diff --git a/src/components/svg/icons/MediumIcon.tsx b/src/components/svg/icons/MediumIcon.tsx index 70db94703..90208faa7 100644 --- a/src/components/svg/icons/MediumIcon.tsx +++ b/src/components/svg/icons/MediumIcon.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { COLORS } from '@constants/colors'; import { IconProps } from '@components/svg/icons/Icon.types'; +import { COLORS } from '@constants/colors'; import { scale as scaleFunc } from '@utils'; -const MediumIcon = (props: IconProps) => { +export const MediumIcon = (props: IconProps) => { const { scale = 1, color = COLORS.brand500 } = props; return ( @@ -21,4 +21,3 @@ const MediumIcon = (props: IconProps) => { ); }; -export default MediumIcon; diff --git a/src/components/svg/icons/Messages.tsx b/src/components/svg/icons/Messages.tsx index 2ef5c0615..e395f9663 100644 --- a/src/components/svg/icons/Messages.tsx +++ b/src/components/svg/icons/Messages.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function MessagesIcon(props: IconProps) { const { scale = 1, color = COLORS.gray500 } = props; diff --git a/src/components/svg/icons/Mnemoic.tsx b/src/components/svg/icons/Mnemoic.tsx index abd9536c7..496a65fda 100644 --- a/src/components/svg/icons/Mnemoic.tsx +++ b/src/components/svg/icons/Mnemoic.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function MnemonicIcon(props: IconProps) { const { scale = 1, color = COLORS.neutral300 } = props; diff --git a/src/components/svg/icons/Move.tsx b/src/components/svg/icons/Move.tsx index 4308dfa14..44f17faca 100644 --- a/src/components/svg/icons/Move.tsx +++ b/src/components/svg/icons/Move.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; export function MoveIcon(props: IconProps) { const { scale = 1, color = '#212121' } = props; diff --git a/src/components/svg/icons/NFTIcon.tsx b/src/components/svg/icons/NFTIcon.tsx index 221f88b12..b4ba76072 100644 --- a/src/components/svg/icons/NFTIcon.tsx +++ b/src/components/svg/icons/NFTIcon.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import Svg, { Defs, LinearGradient, Path, Rect, Stop } from 'react-native-svg'; import { IconProps } from '@components/svg/icons/Icon.types'; -function NFTIcon(props: IconProps) { +export const NFTIcon = (props: IconProps) => { return ( ); -} -export default NFTIcon; +}; diff --git a/src/components/svg/icons/NoMatch.tsx b/src/components/svg/icons/NoMatch.tsx index 130de30a3..86b02ea9b 100644 --- a/src/components/svg/icons/NoMatch.tsx +++ b/src/components/svg/icons/NoMatch.tsx @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; import React from 'react'; import { Path, Svg } from 'react-native-svg'; +import { COLORS } from '@constants/colors'; import { IconProps } from './Icon.types'; export function NoMatch(props: IconProps) { diff --git a/src/components/svg/icons/PlusIcon.tsx b/src/components/svg/icons/PlusIcon.tsx index bf13b4d1f..cbd54083a 100644 --- a/src/components/svg/icons/PlusIcon.tsx +++ b/src/components/svg/icons/PlusIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function PlusIcon(props: IconProps) { const { scale = 1, color = COLORS.gray500 } = props; diff --git a/src/components/svg/icons/QuestionMark.tsx b/src/components/svg/icons/QuestionMark.tsx index a718899a9..a9b55bffb 100644 --- a/src/components/svg/icons/QuestionMark.tsx +++ b/src/components/svg/icons/QuestionMark.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function QuestionMarkIcon(props: IconProps) { const { scale = 1, color = COLORS.brand600 } = props; diff --git a/src/components/svg/icons/ReceiveQRCode.tsx b/src/components/svg/icons/ReceiveQRCode.tsx index 68f5bccfa..802a3a49d 100644 --- a/src/components/svg/icons/ReceiveQRCode.tsx +++ b/src/components/svg/icons/ReceiveQRCode.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; export function ReceiveQRCodeIcon(props: IconProps) { diff --git a/src/components/svg/icons/RightArrow.tsx b/src/components/svg/icons/RightArrow.tsx index a0880723c..038e8b482 100644 --- a/src/components/svg/icons/RightArrow.tsx +++ b/src/components/svg/icons/RightArrow.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function RightArrowIcon(props: IconProps) { const { scale = 1, color = COLORS.neutral0 } = props; diff --git a/src/components/svg/icons/RightArrowInCircle.tsx b/src/components/svg/icons/RightArrowInCircle.tsx index 6474ec200..4525bd188 100644 --- a/src/components/svg/icons/RightArrowInCircle.tsx +++ b/src/components/svg/icons/RightArrowInCircle.tsx @@ -1,7 +1,7 @@ +import React, { useMemo } from 'react'; import { StyleSheet, View } from 'react-native'; import { RightArrowIcon } from '@components/svg/icons/RightArrow'; import { COLORS } from '@constants/colors'; -import React, { useMemo } from 'react'; export const RightArrowInCircle = ({ scale = 1 }: { scale?: number }) => { const size = 40; diff --git a/src/components/svg/icons/Rocket.tsx b/src/components/svg/icons/Rocket.tsx index e7848156b..6b0e71f9a 100644 --- a/src/components/svg/icons/Rocket.tsx +++ b/src/components/svg/icons/Rocket.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { ClipPath, Defs, G, Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; export function StakeRocketIcon(props: IconProps) { diff --git a/src/components/svg/icons/ScannerQR.tsx b/src/components/svg/icons/ScannerQR.tsx index 334b3e5be..8e0a4c490 100644 --- a/src/components/svg/icons/ScannerQR.tsx +++ b/src/components/svg/icons/ScannerQR.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function ScannerQRIcon(props: IconProps) { const { scale = 1, color = COLORS.neutral700 } = props; diff --git a/src/components/svg/icons/Search.tsx b/src/components/svg/icons/Search.tsx index 9d3c781ad..53ff254d1 100644 --- a/src/components/svg/icons/Search.tsx +++ b/src/components/svg/icons/Search.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; export function SearchIcon(props: IconProps) { diff --git a/src/components/svg/icons/Send.tsx b/src/components/svg/icons/Send.tsx index 26a322925..dcf893f64 100644 --- a/src/components/svg/icons/Send.tsx +++ b/src/components/svg/icons/Send.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { ClipPath, Defs, G, Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; export function SendIcon(props: IconProps) { diff --git a/src/components/svg/icons/SendReceive.tsx b/src/components/svg/icons/SendReceive.tsx index 813f201ed..073a223ca 100644 --- a/src/components/svg/icons/SendReceive.tsx +++ b/src/components/svg/icons/SendReceive.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Circle, ClipPath, Defs, G, Path, Rect, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { DEVICE_WIDTH } from '@constants/variables'; export function SendReceiveIcon(props: Omit) { diff --git a/src/components/svg/icons/SettingsFilled.tsx b/src/components/svg/icons/SettingsFilled.tsx index ac15d5c43..e64d4d2c1 100644 --- a/src/components/svg/icons/SettingsFilled.tsx +++ b/src/components/svg/icons/SettingsFilled.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; export function SettingsFilledIcon(props: IconProps) { diff --git a/src/components/svg/icons/Share.tsx b/src/components/svg/icons/Share.tsx index 88f4ec9da..b858c38d7 100644 --- a/src/components/svg/icons/Share.tsx +++ b/src/components/svg/icons/Share.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function ShareIcon(props: IconProps) { const { scale = 1, color = COLORS.neutral0 } = props; diff --git a/src/components/svg/icons/Statistics.tsx b/src/components/svg/icons/Statistics.tsx index 28dbb9195..16c368bcf 100644 --- a/src/components/svg/icons/Statistics.tsx +++ b/src/components/svg/icons/Statistics.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import Svg, { Path } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; export function StatisticsLogo(props: IconProps) { const { scale = 1, color = '#393B40' } = props; diff --git a/src/components/svg/icons/StayInformed.tsx b/src/components/svg/icons/StayInformed.tsx index 8722e6bfc..4c44128c2 100644 --- a/src/components/svg/icons/StayInformed.tsx +++ b/src/components/svg/icons/StayInformed.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import { Ellipse, Path, Svg } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; export function StayInformedIcon(props: Omit) { const { scale = 1 } = props; diff --git a/src/components/svg/icons/Success.tsx b/src/components/svg/icons/Success.tsx index 5bd3071a2..02a3436dc 100644 --- a/src/components/svg/icons/Success.tsx +++ b/src/components/svg/icons/Success.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function SuccessIcon(props: IconProps) { const { scale = 1, color = COLORS.success300 } = props; diff --git a/src/components/svg/icons/Swap.tsx b/src/components/svg/icons/Swap.tsx index be38dc4b0..516049619 100644 --- a/src/components/svg/icons/Swap.tsx +++ b/src/components/svg/icons/Swap.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { ClipPath, Defs, G, Path, Rect } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function SwapIcon(props: IconProps) { const { scale = 1, color = COLORS.brand600 } = props; diff --git a/src/components/svg/icons/TokenBusd.tsx b/src/components/svg/icons/TokenBusd.tsx index bcad3295c..a90f7cce5 100644 --- a/src/components/svg/icons/TokenBusd.tsx +++ b/src/components/svg/icons/TokenBusd.tsx @@ -1,7 +1,7 @@ import React from 'react'; // import { Image, Defs, Path, Pattern, Svg, Use } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { Image, View } from 'react-native'; +import { IconProps } from './Icon.types'; export function BusdIcon(props: Omit) { const { scale = 1 } = props; diff --git a/src/components/svg/icons/TokenSTAMB.tsx b/src/components/svg/icons/TokenSTAMB.tsx index 080a52904..ecf5324b9 100644 --- a/src/components/svg/icons/TokenSTAMB.tsx +++ b/src/components/svg/icons/TokenSTAMB.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '@components/svg/icons/Icon.types'; import Svg, { Path } from 'react-native-svg'; +import { IconProps } from '@components/svg/icons/Icon.types'; export function TokenSTAMBIcon({ scale = 1 }: IconProps) { const size = 32 * scale; diff --git a/src/components/svg/icons/WalletConnect.tsx b/src/components/svg/icons/WalletConnect.tsx index 6eef352c0..b6cb14941 100644 --- a/src/components/svg/icons/WalletConnect.tsx +++ b/src/components/svg/icons/WalletConnect.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from './Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from './Icon.types'; export function WalletConnectIcon({ scale = 1 }: IconProps) { const width = 75; diff --git a/src/components/svg/icons/WalletXs.tsx b/src/components/svg/icons/WalletXs.tsx index 314bdd3a6..9c0904475 100644 --- a/src/components/svg/icons/WalletXs.tsx +++ b/src/components/svg/icons/WalletXs.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from './Icon.types'; import { G, Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function WalletXsIcon({ scale = 1, diff --git a/src/components/svg/icons/Warning.tsx b/src/components/svg/icons/Warning.tsx index 5980baa91..fd349cc79 100644 --- a/src/components/svg/icons/Warning.tsx +++ b/src/components/svg/icons/Warning.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function WarningIcon(props: IconProps) { const { scale = 1, color = COLORS.warning400 } = props; diff --git a/src/components/svg/icons/Watchlist.tsx b/src/components/svg/icons/Watchlist.tsx index ec9ed9ddf..696c49371 100644 --- a/src/components/svg/icons/Watchlist.tsx +++ b/src/components/svg/icons/Watchlist.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from './Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from './Icon.types'; export function WatchlistIcon(props: IconProps) { const { scale = 1, color = COLORS.warning500 } = props; diff --git a/src/components/svg/icons/XTwitterIcon.tsx b/src/components/svg/icons/XTwitterIcon.tsx index 3b4194c46..92cb38053 100644 --- a/src/components/svg/icons/XTwitterIcon.tsx +++ b/src/components/svg/icons/XTwitterIcon.tsx @@ -4,7 +4,7 @@ import { IconProps } from '@components/svg/icons/Icon.types'; import { COLORS } from '@constants/colors'; import { scale as scaleFunc } from '@utils'; -const XTwitterIcon = (props: IconProps) => { +export const XTwitterIcon = (props: IconProps) => { const { scale = 1, color = COLORS.brand500 } = props; return ( @@ -21,4 +21,3 @@ const XTwitterIcon = (props: IconProps) => { ); }; -export default XTwitterIcon; diff --git a/src/components/svg/icons/v2/ArrowBottomFill.tsx b/src/components/svg/icons/v2/ArrowBottomFill.tsx index 248390b34..a26c0778f 100644 --- a/src/components/svg/icons/v2/ArrowBottomFill.tsx +++ b/src/components/svg/icons/v2/ArrowBottomFill.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; -import { COLORS } from '@constants/colors'; import { Path, Svg } from 'react-native-svg'; +import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function ArrowBottomFillIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/Barcode.tsx b/src/components/svg/icons/v2/Barcode.tsx index 8c6ca2df4..396178205 100644 --- a/src/components/svg/icons/v2/Barcode.tsx +++ b/src/components/svg/icons/v2/Barcode.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function BarcodeScannerIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/Chart.tsx b/src/components/svg/icons/v2/Chart.tsx index ba505ce82..dfaf8c0ca 100644 --- a/src/components/svg/icons/v2/Chart.tsx +++ b/src/components/svg/icons/v2/Chart.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function ChartIcon({ scale = 1, color = COLORS.neutral800 }: IconProps) { const size = 24 * scale; diff --git a/src/components/svg/icons/v2/CheckboxCircleFill.tsx b/src/components/svg/icons/v2/CheckboxCircleFill.tsx index a21930220..c0bc93e8a 100644 --- a/src/components/svg/icons/v2/CheckboxCircleFill.tsx +++ b/src/components/svg/icons/v2/CheckboxCircleFill.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function CheckboxCircleFill({ scale = 1, diff --git a/src/components/svg/icons/v2/Clipboard.tsx b/src/components/svg/icons/v2/Clipboard.tsx index 1ae585999..9ba3778f0 100644 --- a/src/components/svg/icons/v2/Clipboard.tsx +++ b/src/components/svg/icons/v2/Clipboard.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; -import { COLORS } from '@constants/colors'; import { Path, Svg } from 'react-native-svg'; +import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function ClipboardIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/ClipboardFill.tsx b/src/components/svg/icons/v2/ClipboardFill.tsx index e764e018c..9fa0f8329 100644 --- a/src/components/svg/icons/v2/ClipboardFill.tsx +++ b/src/components/svg/icons/v2/ClipboardFill.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; -import { COLORS } from '@constants/colors'; import { Path, Svg } from 'react-native-svg'; +import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function ClipboardFillIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/CloseCircle.tsx b/src/components/svg/icons/v2/CloseCircle.tsx index ba513e944..104561ff7 100644 --- a/src/components/svg/icons/v2/CloseCircle.tsx +++ b/src/components/svg/icons/v2/CloseCircle.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; import { G, Path, Svg } from 'react-native-svg'; +import { IconProps } from '../Icon.types'; export function CloseCircleIcon({ scale = 1 }: IconProps) { const width = 24; diff --git a/src/components/svg/icons/v2/ConnectionChains.tsx b/src/components/svg/icons/v2/ConnectionChains.tsx index 2c20ff913..618292bb5 100644 --- a/src/components/svg/icons/v2/ConnectionChains.tsx +++ b/src/components/svg/icons/v2/ConnectionChains.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; import { G, Path, Svg } from 'react-native-svg'; +import { IconProps } from '../Icon.types'; export function ConnectionChainsIcon({ scale = 1 }: IconProps) { const width = 16; diff --git a/src/components/svg/icons/v2/Edit.tsx b/src/components/svg/icons/v2/Edit.tsx index 4aa7d1fa3..229168421 100644 --- a/src/components/svg/icons/v2/Edit.tsx +++ b/src/components/svg/icons/v2/Edit.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; import { Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function Edit({ scale = 1, color = COLORS.neutral200 }: IconProps) { const width = 16; diff --git a/src/components/svg/icons/v2/Failed.tsx b/src/components/svg/icons/v2/Failed.tsx index 23fcb9c93..917b691ac 100644 --- a/src/components/svg/icons/v2/Failed.tsx +++ b/src/components/svg/icons/v2/Failed.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; import { Path, Svg } from 'react-native-svg'; +import { IconProps } from '../Icon.types'; export function FailedIcon({ scale = 1 }: IconProps) { const width = 65; diff --git a/src/components/svg/icons/v2/Globe.tsx b/src/components/svg/icons/v2/Globe.tsx index 120649f5a..2c257cb05 100644 --- a/src/components/svg/icons/v2/Globe.tsx +++ b/src/components/svg/icons/v2/Globe.tsx @@ -1,7 +1,7 @@ import React from 'react'; +import { Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; import { IconProps } from '../Icon.types'; -import { Path, Svg } from 'react-native-svg'; export function GlobeIcon({ scale = 1, color = COLORS.brand600 }: IconProps) { const size = 21; diff --git a/src/components/svg/icons/v2/Key.tsx b/src/components/svg/icons/v2/Key.tsx index ff44bfb54..9b7e00f53 100644 --- a/src/components/svg/icons/v2/Key.tsx +++ b/src/components/svg/icons/v2/Key.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; import { Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function Key({ scale = 1, color = COLORS.neutral200 }: IconProps) { const width = 16; diff --git a/src/components/svg/icons/v2/Plus.tsx b/src/components/svg/icons/v2/Plus.tsx index 505dca9a7..a22922da0 100644 --- a/src/components/svg/icons/v2/Plus.tsx +++ b/src/components/svg/icons/v2/Plus.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function PlusIcon({ scale = 1, color = COLORS.neutral900 }: IconProps) { const size = 20; diff --git a/src/components/svg/icons/v2/QR.tsx b/src/components/svg/icons/v2/QR.tsx index 52ad1b2fb..f1b4d7cbb 100644 --- a/src/components/svg/icons/v2/QR.tsx +++ b/src/components/svg/icons/v2/QR.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; import { Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function QRCodeIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/Wallet.tsx b/src/components/svg/icons/v2/Wallet.tsx index 2d5111fdf..5d36c4868 100644 --- a/src/components/svg/icons/v2/Wallet.tsx +++ b/src/components/svg/icons/v2/Wallet.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../Icon.types'; -import { COLORS } from '@constants/colors'; import { Path, Svg } from 'react-native-svg'; +import { COLORS } from '@constants/colors'; +import { IconProps } from '../Icon.types'; export function WalletIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/actions/BridgeAccountAction.tsx b/src/components/svg/icons/v2/actions/BridgeAccountAction.tsx index 165520848..b8d328bfe 100644 --- a/src/components/svg/icons/v2/actions/BridgeAccountAction.tsx +++ b/src/components/svg/icons/v2/actions/BridgeAccountAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function BridgeAccountActionIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/actions/KosmosAccountAction.tsx b/src/components/svg/icons/v2/actions/KosmosAccountAction.tsx index 7afebb08f..7c7f9cf2e 100644 --- a/src/components/svg/icons/v2/actions/KosmosAccountAction.tsx +++ b/src/components/svg/icons/v2/actions/KosmosAccountAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { G, Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function KosmosAccountActionIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/actions/SendAccountAction.tsx b/src/components/svg/icons/v2/actions/SendAccountAction.tsx index 18bfc587b..aeda8ebdf 100644 --- a/src/components/svg/icons/v2/actions/SendAccountAction.tsx +++ b/src/components/svg/icons/v2/actions/SendAccountAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { G, Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function SendAccountActionIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/actions/StakeAccountAction.tsx b/src/components/svg/icons/v2/actions/StakeAccountAction.tsx index 797fa947f..f05d4e280 100644 --- a/src/components/svg/icons/v2/actions/StakeAccountAction.tsx +++ b/src/components/svg/icons/v2/actions/StakeAccountAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../../Icon.types'; import { Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function StakeAccountActionIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/actions/SwapAccountAction.tsx b/src/components/svg/icons/v2/actions/SwapAccountAction.tsx index 906d5dad8..f6ef4328d 100644 --- a/src/components/svg/icons/v2/actions/SwapAccountAction.tsx +++ b/src/components/svg/icons/v2/actions/SwapAccountAction.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { IconProps } from '../../Icon.types'; import { G, Path, Svg } from 'react-native-svg'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function SwapAccountActionIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx index 6acc6bb26..1b4ff77e8 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/products-active.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; -import { ProductsInnerIcon } from './products-inner-icon'; import { COLORS } from '@constants/colors'; import { cssShadowToNative } from '@utils'; +import { ProductsInnerIcon } from './products-inner-icon'; import { IconProps } from '../../Icon.types'; export function ProductsActiveIcon({ color }: Pick) { diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/products-inactive.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/products-inactive.tsx index dd84b2d7e..dece28ba7 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/products-inactive.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/products-inactive.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; -import { ProductsInnerIcon } from './products-inner-icon'; import { COLORS } from '@constants/colors'; +import { ProductsInnerIcon } from './products-inner-icon'; import { IconProps } from '../../Icon.types'; export function ProductsInactiveIcon({ color }: Pick) { diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/products-inner-icon.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/products-inner-icon.tsx index d99990cc1..e204be0fd 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/products-inner-icon.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/products-inner-icon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function ProductsInnerIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/settings-active.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/settings-active.tsx index 7f3e4a720..8903cefd3 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/settings-active.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/settings-active.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function SettingsActiveIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/settings-inactive.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/settings-inactive.tsx index b9dd76e0d..0b5d3677c 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/settings-inactive.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/settings-inactive.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function SettingsInactiveIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-active.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-active.tsx index 9acb16126..fd9b0ffbb 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-active.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-active.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function WalletsActiveIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-inactive.tsx b/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-inactive.tsx index df1a20251..c079c83c0 100644 --- a/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-inactive.tsx +++ b/src/components/svg/icons/v2/bottom-tabs-navigation/wallets-inactive.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function WalletsInactiveIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/harbor-bottom-tabs/BorrowIcon.tsx b/src/components/svg/icons/v2/harbor-bottom-tabs/BorrowIcon.tsx index 48b8df141..4aad95935 100644 --- a/src/components/svg/icons/v2/harbor-bottom-tabs/BorrowIcon.tsx +++ b/src/components/svg/icons/v2/harbor-bottom-tabs/BorrowIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function BorrowIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/harbor-bottom-tabs/StakeAMBIcon.tsx b/src/components/svg/icons/v2/harbor-bottom-tabs/StakeAMBIcon.tsx index d4c9aad6e..fe7db15ff 100644 --- a/src/components/svg/icons/v2/harbor-bottom-tabs/StakeAMBIcon.tsx +++ b/src/components/svg/icons/v2/harbor-bottom-tabs/StakeAMBIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { ClipPath, Defs, G, Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function StakeAMBIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/harbor-bottom-tabs/StakeHBRIcon.tsx b/src/components/svg/icons/v2/harbor-bottom-tabs/StakeHBRIcon.tsx index 5ac156d19..859799cb9 100644 --- a/src/components/svg/icons/v2/harbor-bottom-tabs/StakeHBRIcon.tsx +++ b/src/components/svg/icons/v2/harbor-bottom-tabs/StakeHBRIcon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function StakeHBRIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/harbor/APYHeaderIcon.tsx b/src/components/svg/icons/v2/harbor/APYHeaderIcon.tsx index 06e7d8293..344f1d6e1 100644 --- a/src/components/svg/icons/v2/harbor/APYHeaderIcon.tsx +++ b/src/components/svg/icons/v2/harbor/APYHeaderIcon.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import Svg, { Path } from 'react-native-svg'; import { View, StyleSheet } from 'react-native'; +import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; export const APYHeaderIcon = ({ scale = 1, color = COLORS.success300 }) => { diff --git a/src/components/svg/icons/v2/settings/AboutIcon.tsx b/src/components/svg/icons/v2/settings/AboutIcon.tsx index 60acaabb5..e9025e54a 100644 --- a/src/components/svg/icons/v2/settings/AboutIcon.tsx +++ b/src/components/svg/icons/v2/settings/AboutIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const AboutIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/CompassIcon.tsx b/src/components/svg/icons/v2/settings/CompassIcon.tsx index 3dedecd98..b9d258843 100644 --- a/src/components/svg/icons/v2/settings/CompassIcon.tsx +++ b/src/components/svg/icons/v2/settings/CompassIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const CompassIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/CopyIconV2.tsx b/src/components/svg/icons/v2/settings/CopyIconV2.tsx index b6a21eab3..5b15677e4 100644 --- a/src/components/svg/icons/v2/settings/CopyIconV2.tsx +++ b/src/components/svg/icons/v2/settings/CopyIconV2.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const CopyIconV2 = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/DownloadIcon.tsx b/src/components/svg/icons/v2/settings/DownloadIcon.tsx index bc793aec2..afe94043d 100644 --- a/src/components/svg/icons/v2/settings/DownloadIcon.tsx +++ b/src/components/svg/icons/v2/settings/DownloadIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const DownloadIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/KeyIcon.tsx b/src/components/svg/icons/v2/settings/KeyIcon.tsx index 11af382a0..323e2c157 100644 --- a/src/components/svg/icons/v2/settings/KeyIcon.tsx +++ b/src/components/svg/icons/v2/settings/KeyIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const KeyIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/NotificationIcon.tsx b/src/components/svg/icons/v2/settings/NotificationIcon.tsx index 3f87522ee..cd4db3ee1 100644 --- a/src/components/svg/icons/v2/settings/NotificationIcon.tsx +++ b/src/components/svg/icons/v2/settings/NotificationIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const NotificationIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/Preferences.tsx b/src/components/svg/icons/v2/settings/Preferences.tsx index 49bc0adf2..c73624b68 100644 --- a/src/components/svg/icons/v2/settings/Preferences.tsx +++ b/src/components/svg/icons/v2/settings/Preferences.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const Preferences = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/SecurityIcon.tsx b/src/components/svg/icons/v2/settings/SecurityIcon.tsx index 426d52492..a6742c347 100644 --- a/src/components/svg/icons/v2/settings/SecurityIcon.tsx +++ b/src/components/svg/icons/v2/settings/SecurityIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const SecurityIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/WalletIcon.tsx b/src/components/svg/icons/v2/settings/WalletIcon.tsx index d1173b2dd..8eb6a0fad 100644 --- a/src/components/svg/icons/v2/settings/WalletIcon.tsx +++ b/src/components/svg/icons/v2/settings/WalletIcon.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; import { COLORS } from '@constants/colors'; -import { scale as scaleFunc } from '@utils'; import { SVGsModels } from '@models/SVGsModels'; +import { scale as scaleFunc } from '@utils'; export const WalletIcon = ({ scale = 1, diff --git a/src/components/svg/icons/v2/settings/WatchListIcon.tsx b/src/components/svg/icons/v2/settings/WatchListIcon.tsx index 911a38200..9c166fab6 100644 --- a/src/components/svg/icons/v2/settings/WatchListIcon.tsx +++ b/src/components/svg/icons/v2/settings/WatchListIcon.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Svg, { Path } from 'react-native-svg'; -import { SVGsModels } from '@models/SVGsModels'; import { COLORS } from '@constants/colors'; +import { SVGsModels } from '@models/SVGsModels'; export const WatchListIcon = (props: SVGsModels) => { const { scale = 1, color = COLORS.neutral500 } = props; diff --git a/src/components/svg/icons/v2/transactions/ContractCall.tsx b/src/components/svg/icons/v2/transactions/ContractCall.tsx index 676271e17..b7e3add94 100644 --- a/src/components/svg/icons/v2/transactions/ContractCall.tsx +++ b/src/components/svg/icons/v2/transactions/ContractCall.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function ContractCallIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/transactions/Failed.tsx b/src/components/svg/icons/v2/transactions/Failed.tsx index bc707ff1d..324be0e9c 100644 --- a/src/components/svg/icons/v2/transactions/Failed.tsx +++ b/src/components/svg/icons/v2/transactions/Failed.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function FailedIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/transactions/TransferReceived.tsx b/src/components/svg/icons/v2/transactions/TransferReceived.tsx index fd444d5e7..3e818ef87 100644 --- a/src/components/svg/icons/v2/transactions/TransferReceived.tsx +++ b/src/components/svg/icons/v2/transactions/TransferReceived.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function TransferReceivedIcon({ scale = 1, diff --git a/src/components/svg/icons/v2/transactions/TransferSent.tsx b/src/components/svg/icons/v2/transactions/TransferSent.tsx index d37acd24a..9d07a80cd 100644 --- a/src/components/svg/icons/v2/transactions/TransferSent.tsx +++ b/src/components/svg/icons/v2/transactions/TransferSent.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Path, Svg } from 'react-native-svg'; -import { IconProps } from '../../Icon.types'; import { COLORS } from '@constants/colors'; +import { IconProps } from '../../Icon.types'; export function TransferSentIcon({ scale = 1, diff --git a/src/components/templates/AMBPriceHistory/AMBPriceHistory.test.tsx b/src/components/templates/AMBPriceHistory/AMBPriceHistory.test.tsx index 13ce91e04..af7569ac7 100644 --- a/src/components/templates/AMBPriceHistory/AMBPriceHistory.test.tsx +++ b/src/components/templates/AMBPriceHistory/AMBPriceHistory.test.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { fireEvent, render, waitFor } from '@testing-library/react-native'; -import { AMBPriceHistory } from '../AMBPriceHistory'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { fireEvent, render, waitFor } from '@testing-library/react-native'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { useAMBPrice, useAMBPriceHistorical } from '@hooks'; +import { AMBPriceHistory } from '../AMBPriceHistory'; import clearAllMocks = jest.clearAllMocks; jest.mock('@hooks', () => ({ diff --git a/src/components/templates/AMBPriceHistory/index.tsx b/src/components/templates/AMBPriceHistory/index.tsx index bb99e62a0..f7394b237 100644 --- a/src/components/templates/AMBPriceHistory/index.tsx +++ b/src/components/templates/AMBPriceHistory/index.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { TextInputProps, View } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { GraphPoint } from 'react-native-graph'; import Animated, { AnimatedProps, useAnimatedProps, @@ -9,17 +10,16 @@ import Animated, { useSharedValue, withTiming } from 'react-native-reanimated'; -import { GraphPoint } from 'react-native-graph'; -import { styles } from './styles'; import { PriceSnapshotInterval } from '@appTypes'; import { AnimatedText, Button, Row, Spacer } from '@components/base'; +import { Badge } from '@components/base/Badge'; +import { PercentChange } from '@components/composite'; import { ChevronDownIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; +import { MONTH_NAMES } from '@constants/variables'; import { useAMBPrice, useAMBPriceHistorical } from '@hooks'; import { scale, verticalScale } from '@utils'; -import { Badge } from '@components/base/Badge'; -import { PercentChange } from '@components/composite'; -import { MONTH_NAMES } from '@constants/variables'; +import { styles } from './styles'; import { BezierChart } from '../BezierChart'; interface AMBPriceHistoryProps { diff --git a/src/components/templates/AccountActions/components/ActionButton.tsx b/src/components/templates/AccountActions/components/ActionButton.tsx index 0af7161da..15a363165 100644 --- a/src/components/templates/AccountActions/components/ActionButton.tsx +++ b/src/components/templates/AccountActions/components/ActionButton.tsx @@ -1,9 +1,9 @@ import React, { useMemo } from 'react'; import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import { Button, Spacer, Text } from '@components/base'; +import { IconProps } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { moderateScale, verticalScale } from '@utils'; -import { IconProps } from '@components/svg/icons'; export interface AccountActionButtonProps { Icon: React.ElementType; diff --git a/src/components/templates/AccountActions/components/Bridge.tsx b/src/components/templates/AccountActions/components/Bridge.tsx index a62549262..0339a1afb 100644 --- a/src/components/templates/AccountActions/components/Bridge.tsx +++ b/src/components/templates/AccountActions/components/Bridge.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { useTranslation } from 'react-i18next'; import { useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import { HomeNavigationProp } from '@appTypes'; +import { BridgeAccountActionIcon } from '@components/svg/icons/v2/actions'; import { AccountActionButton } from '@components/templates/AccountActions/components/ActionButton'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { BridgeAccountActionIcon } from '@components/svg/icons/v2/actions'; interface BridgeProps { readonly disabled: () => boolean; diff --git a/src/components/templates/AccountActions/components/Kosmos.tsx b/src/components/templates/AccountActions/components/Kosmos.tsx index ed2b1af51..6c2e5a050 100644 --- a/src/components/templates/AccountActions/components/Kosmos.tsx +++ b/src/components/templates/AccountActions/components/Kosmos.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { useNavigation } from '@react-navigation/native'; -import { AccountActionButton } from './ActionButton'; import { HomeNavigationProp } from '@appTypes'; +import { KosmosAccountActionIcon } from '@components/svg/icons/v2/actions'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { KosmosAccountActionIcon } from '@components/svg/icons/v2/actions'; +import { AccountActionButton } from './ActionButton'; interface KosmosProps { readonly disabled: () => boolean; diff --git a/src/components/templates/AccountActions/components/Receive.tsx b/src/components/templates/AccountActions/components/Receive.tsx index 0c1a8a1dc..458842c1e 100644 --- a/src/components/templates/AccountActions/components/Receive.tsx +++ b/src/components/templates/AccountActions/components/Receive.tsx @@ -1,10 +1,10 @@ import React, { useRef } from 'react'; import { StyleSheet, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { ReceiveQRCodeIcon } from '@components/svg/icons'; -import Config from '@constants/config'; import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { ReceiveQRCodeIcon } from '@components/svg/icons'; import { ReceiveFunds } from '@components/templates/ReceiveFunds'; +import Config from '@constants/config'; import { scale, verticalScale } from '@utils'; import { AccountActionButton } from './ActionButton'; diff --git a/src/components/templates/AccountActions/components/Send.tsx b/src/components/templates/AccountActions/components/Send.tsx index 028b11194..4ab992b0e 100644 --- a/src/components/templates/AccountActions/components/Send.tsx +++ b/src/components/templates/AccountActions/components/Send.tsx @@ -1,15 +1,15 @@ import React, { useCallback } from 'react'; -import { useTranslation } from 'react-i18next'; -import { AccountActionButton } from './ActionButton'; import { useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import { HomeNavigationProp } from '@appTypes'; -import { ExplorerAccount, Token } from '@models'; +import { SendAccountActionIcon } from '@components/svg/icons/v2/actions'; +import { useSendFundsStore } from '@features/send-funds'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { SendAccountActionIcon } from '@components/svg/icons/v2/actions'; -import { useSendFundsStore } from '@features/send-funds'; +import { ExplorerAccount, Token } from '@models'; +import { AccountActionButton } from './ActionButton'; interface SendProps { account: ExplorerAccount; diff --git a/src/components/templates/AccountActions/components/Staking.tsx b/src/components/templates/AccountActions/components/Staking.tsx index f7fab5c92..7e8920604 100644 --- a/src/components/templates/AccountActions/components/Staking.tsx +++ b/src/components/templates/AccountActions/components/Staking.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { useTranslation } from 'react-i18next'; -import { AccountActionButton } from './ActionButton'; import { useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import { HomeNavigationProp } from '@appTypes'; +import { StakeAccountActionIcon } from '@components/svg/icons/v2/actions'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { StakeAccountActionIcon } from '@components/svg/icons/v2/actions'; +import { AccountActionButton } from './ActionButton'; interface StakingProps { readonly disabled: () => boolean; diff --git a/src/components/templates/AccountActions/components/Swap.tsx b/src/components/templates/AccountActions/components/Swap.tsx index 35a414bf6..12cbd011a 100644 --- a/src/components/templates/AccountActions/components/Swap.tsx +++ b/src/components/templates/AccountActions/components/Swap.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { useTranslation } from 'react-i18next'; import { useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import { HomeNavigationProp } from '@appTypes'; -import { AccountActionButton } from './ActionButton'; +import { SwapAccountActionIcon } from '@components/svg/icons/v2/actions'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { SwapAccountActionIcon } from '@components/svg/icons/v2/actions'; +import { AccountActionButton } from './ActionButton'; interface SwapActionProps { readonly disabled: () => boolean; diff --git a/src/components/templates/AccountActions/index.tsx b/src/components/templates/AccountActions/index.tsx index f4a683c9b..e8102fbfa 100644 --- a/src/components/templates/AccountActions/index.tsx +++ b/src/components/templates/AccountActions/index.tsx @@ -1,10 +1,10 @@ import React, { ComponentType, useCallback } from 'react'; import { Row } from '@components/base'; -import { AccountActionsKey } from './ActionButton.types'; +import Config from '@constants/config'; +import { ExplorerAccount, Token } from '@models'; import { scale } from '@utils'; +import { AccountActionsKey } from './ActionButton.types'; import { Send, Swap, Staking, Bridge, Kosmos } from './components'; -import { ExplorerAccount, Token } from '@models'; -import Config from '@constants/config'; interface AccountActionsProps { account: ExplorerAccount; diff --git a/src/components/templates/AccountList/AccountList.paginated.tsx b/src/components/templates/AccountList/AccountList.paginated.tsx index 1f7ee19cc..ed0ba1c60 100644 --- a/src/components/templates/AccountList/AccountList.paginated.tsx +++ b/src/components/templates/AccountList/AccountList.paginated.tsx @@ -5,8 +5,8 @@ import { NativeSyntheticEvent } from 'react-native'; import { scale } from '@utils'; -import { AccountListProps } from './AccountList.types'; import { AccountList } from './AccountList'; +import { AccountListProps } from './AccountList.types'; interface PaginatedAccountListProps extends AccountListProps { listProps?: AccountListProps['listProps']; diff --git a/src/components/templates/AccountList/AccountList.tsx b/src/components/templates/AccountList/AccountList.tsx index 1da0d310e..3d885d960 100644 --- a/src/components/templates/AccountList/AccountList.tsx +++ b/src/components/templates/AccountList/AccountList.tsx @@ -1,14 +1,14 @@ import React, { forwardRef } from 'react'; -import { AccountListItemProps, AccountListProps } from './AccountList.types'; import { FlatList, ListRenderItemInfo } from 'react-native'; -import { AccountDBModel } from '@database'; +import { Button } from '@components/base'; import { CreditCardAddressColor, CreditCardBalanceColor, CreditCardBg } from '@constants/colors'; +import { AccountDBModel } from '@database'; +import { AccountListItemProps, AccountListProps } from './AccountList.types'; import { AccountListItem } from './AccountListItem'; -import { Button } from '@components/base'; export const AccountList = forwardRef( (props: AccountListProps, ref) => { diff --git a/src/components/templates/AccountList/AccountListItem.tsx b/src/components/templates/AccountList/AccountListItem.tsx index ddb3bb789..5721a759c 100644 --- a/src/components/templates/AccountList/AccountListItem.tsx +++ b/src/components/templates/AccountList/AccountListItem.tsx @@ -1,9 +1,9 @@ import React from 'react'; +import { formatUnits } from 'ethers/lib/utils'; import { WalletCard } from '@components/modular'; import { useAMBPrice, useUSDPrice } from '@hooks'; import { useBalanceOfAddress } from '@hooks/query/useBalanceOfAddress'; import { AccountListItemProps, CardType } from './AccountList.types'; -import { formatUnits } from 'ethers/lib/utils'; export const AccountListItem = (props: AccountListItemProps) => { const { account, type } = props; diff --git a/src/components/templates/AddWalletToList/AddWalletToList.test.tsx b/src/components/templates/AddWalletToList/AddWalletToList.test.tsx index db9714b42..5325156ee 100644 --- a/src/components/templates/AddWalletToList/AddWalletToList.test.tsx +++ b/src/components/templates/AddWalletToList/AddWalletToList.test.tsx @@ -1,9 +1,9 @@ -import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { AddWalletToList } from '@components/templates'; import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render } from '@testing-library/react-native'; +import { SafeAreaProvider } from 'react-native-safe-area-context'; import { ExplorerAccountType } from '@appTypes'; +import { AddWalletToList } from '@components/templates'; import clearAllMocks = jest.clearAllMocks; Object.defineProperty(Array.prototype, 'indexOfItem', { diff --git a/src/components/templates/AddWalletToList/index.tsx b/src/components/templates/AddWalletToList/index.tsx index 438086950..690a18fdc 100644 --- a/src/components/templates/AddWalletToList/index.tsx +++ b/src/components/templates/AddWalletToList/index.tsx @@ -1,20 +1,20 @@ import React, { useMemo, useState } from 'react'; import { FlatList, ListRenderItemInfo, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Button, Row, Spacer, Text } from '@components/base'; import { InputWithIcon } from '@components/composite'; -import { ExplorerAccount } from '@models/Explorer'; -import { AccountList } from '@models/AccountList'; -import { COLORS } from '@constants/colors'; import { SearchIcon } from '@components/svg/icons'; -import { NumberUtils, scale, verticalScale } from '@utils'; +import { COLORS } from '@constants/colors'; import { useListActions } from '@features/lists'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { AccountList } from '@models/AccountList'; +import { ExplorerAccount } from '@models/Explorer'; +import { NumberUtils, scale, verticalScale } from '@utils'; +import { styles } from './styles'; export interface AddWalletToListProps { wallet: ExplorerAccount; diff --git a/src/components/templates/AddressIndicator/index.tsx b/src/components/templates/AddressIndicator/index.tsx index 3db663fc4..91a446adb 100644 --- a/src/components/templates/AddressIndicator/index.tsx +++ b/src/components/templates/AddressIndicator/index.tsx @@ -1,12 +1,12 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; import { Text } from '@components/base'; +import { WatchlistIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; +import { useListsSelector } from '@entities/lists'; import { useWatchlist } from '@hooks'; -import { WatchlistIcon } from '@components/svg/icons'; import { StringUtils } from '@utils'; -import { useListsSelector } from '@entities/lists'; +import { styles } from './styles'; interface AddressIndicatorProps { address: string; diff --git a/src/components/templates/AddressList/components/SwipeAction.tsx b/src/components/templates/AddressList/components/SwipeAction.tsx index bfb7f96f8..a80abe22f 100644 --- a/src/components/templates/AddressList/components/SwipeAction.tsx +++ b/src/components/templates/AddressList/components/SwipeAction.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { Animated, Pressable } from 'react-native'; -import { styles } from '@components/templates/AddressList/styles'; import { Button } from '@components/base'; import { EditIcon, TrashIcon } from '@components/svg/icons'; +import { styles } from '@components/templates/AddressList/styles'; import { COLORS } from '@constants/colors'; interface Props { diff --git a/src/components/templates/AddressList/components/SwipeableWalletItem.tsx b/src/components/templates/AddressList/components/SwipeableWalletItem.tsx index 3cd1ed684..83a772575 100644 --- a/src/components/templates/AddressList/components/SwipeableWalletItem.tsx +++ b/src/components/templates/AddressList/components/SwipeableWalletItem.tsx @@ -1,23 +1,23 @@ import React, { forwardRef, memo, useCallback, useRef, useState } from 'react'; import { Dimensions, Pressable } from 'react-native'; +import { useNavigation } from '@react-navigation/native'; import { Swipeable } from 'react-native-gesture-handler'; import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import { WalletItem } from '@components/templates/WalletItem'; -import { ExplorerAccount } from '@models'; -import { useNavigation } from '@react-navigation/native'; import { AirDAOEventType, HomeNavigationProp } from '@appTypes'; import { BottomSheetRef } from '@components/composite'; import { styles } from '@components/templates/AddressList/styles'; import { BottomSheetEditWallet } from '@components/templates/BottomSheetEditWallet'; -import { BottomSheetRemoveAddressFromWatchlists } from '@components/templates/BottomSheetRemoveAddressFromWatchlists'; import { BottomSheetRemoveAddressFromCollection } from '@components/templates/BottomSheetRemoveAddressFromCollection'; +import { BottomSheetRemoveAddressFromWatchlists } from '@components/templates/BottomSheetRemoveAddressFromWatchlists'; +import { WalletItem } from '@components/templates/WalletItem'; import { COLORS } from '@constants/colors'; import { useSwipeableDismissListener } from '@hooks'; import { AirDAOEventDispatcher } from '@lib'; +import { ExplorerAccount } from '@models'; import { SwipeAction } from './SwipeAction'; export type SwipeableWalletItemProps = { diff --git a/src/components/templates/AddressList/index.tsx b/src/components/templates/AddressList/index.tsx index 18c0b155f..95b5052a9 100644 --- a/src/components/templates/AddressList/index.tsx +++ b/src/components/templates/AddressList/index.tsx @@ -6,15 +6,15 @@ import { View } from 'react-native'; import Animated, { SlideInDown, SlideOutRight } from 'react-native-reanimated'; +import { WatchlistEmptyIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils'; import { ExplorerAccount } from '@models/Explorer'; +import { verticalScale } from '@utils'; +import { LocalizedRenderEmpty } from '../LocalizedRenderEmpty'; import { SwipeableWalletItem, SwipeableWalletItemProps } from './components/SwipeableWalletItem'; -import { WatchlistEmptyIcon } from '@components/svg/icons'; -import { LocalizedRenderEmpty } from '../LocalizedRenderEmpty'; interface EmptyAddressListProps { emptyText: string; diff --git a/src/components/templates/AddressList/styles.ts b/src/components/templates/AddressList/styles.ts index 49b959bfe..adb4f6c2f 100644 --- a/src/components/templates/AddressList/styles.ts +++ b/src/components/templates/AddressList/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/BarcodeScanner/BarcodeScanner.test.tsx b/src/components/templates/BarcodeScanner/BarcodeScanner.test.tsx index 0d826546e..b7aee69f7 100644 --- a/src/components/templates/BarcodeScanner/BarcodeScanner.test.tsx +++ b/src/components/templates/BarcodeScanner/BarcodeScanner.test.tsx @@ -1,9 +1,9 @@ import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { act, fireEvent, render, waitFor } from '@testing-library/react-native'; import { Camera, PermissionResponse } from 'expo-camera'; -import { BarcodeScanner } from '@components/templates'; import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { BarcodeScanner } from '@components/templates'; import clearAllMocks = jest.clearAllMocks; let mockOnScanned: any; diff --git a/src/components/templates/BarcodeScanner/index.tsx b/src/components/templates/BarcodeScanner/index.tsx index 1ac47b1a5..eff32e7cb 100644 --- a/src/components/templates/BarcodeScanner/index.tsx +++ b/src/components/templates/BarcodeScanner/index.tsx @@ -1,14 +1,14 @@ import React, { useCallback } from 'react'; import { SafeAreaView, View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { BarCodeScanningResult, Camera, CameraType } from 'expo-camera'; -import { styles } from './styles'; -import { useBarcodeScanner } from '@hooks'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Button, Row, Text } from '@components/base'; import { Header } from '@components/composite'; import { CloseIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; +import { useBarcodeScanner } from '@hooks'; import { ScanSquare } from './components/ScanSquare'; +import { styles } from './styles'; interface BarCodeScanner { onScanned: (data: any) => unknown; diff --git a/src/components/templates/BezierChart/BezierChart.test.tsx b/src/components/templates/BezierChart/BezierChart.test.tsx index ef6a152c2..09f59aeb2 100644 --- a/src/components/templates/BezierChart/BezierChart.test.tsx +++ b/src/components/templates/BezierChart/BezierChart.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render, fireEvent } from '@testing-library/react-native'; -import { BezierChart } from '@components/templates'; import { GraphPoint } from 'react-native-graph'; +import { BezierChart } from '@components/templates'; import { COLORS } from '@constants/colors'; import clearAllMocks = jest.clearAllMocks; diff --git a/src/components/templates/BezierChart/SelectionDot.tsx b/src/components/templates/BezierChart/SelectionDot.tsx index 6e37086a0..673df8ca8 100644 --- a/src/components/templates/BezierChart/SelectionDot.tsx +++ b/src/components/templates/BezierChart/SelectionDot.tsx @@ -1,9 +1,9 @@ import React, { useCallback } from 'react'; -import { runOnJS, useAnimatedReaction } from 'react-native-reanimated'; import { runSpring, useValue, Circle, Group } from '@shopify/react-native-skia'; -import type { SelectionDotProps } from 'react-native-graph'; -import { moderateScale } from '@utils'; +import { runOnJS, useAnimatedReaction } from 'react-native-reanimated'; import { COLORS } from '@constants/colors'; +import { moderateScale } from '@utils'; +import type { SelectionDotProps } from 'react-native-graph'; export function SelectionDot({ isActive, diff --git a/src/components/templates/BezierChart/index.tsx b/src/components/templates/BezierChart/index.tsx index df78e530d..7270b9570 100644 --- a/src/components/templates/BezierChart/index.tsx +++ b/src/components/templates/BezierChart/index.tsx @@ -1,8 +1,8 @@ import React, { useCallback, useRef } from 'react'; import { StyleSheet, View } from 'react-native'; import { LineGraph, GraphPoint } from 'react-native-graph'; -import { COLORS } from '@constants/colors'; import { Button, Row, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; import { scale } from '@utils'; import { SelectionDot } from './SelectionDot'; diff --git a/src/components/templates/BottomSheetAddWalletToList/index.tsx b/src/components/templates/BottomSheetAddWalletToList/index.tsx index 02db1241c..dd6d57ed6 100644 --- a/src/components/templates/BottomSheetAddWalletToList/index.tsx +++ b/src/components/templates/BottomSheetAddWalletToList/index.tsx @@ -1,14 +1,14 @@ import React, { forwardRef, useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; -import { useListActions } from '@features/lists'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; -import { AddWalletToList, AddWalletToListProps } from '../AddWalletToList'; -import { verticalScale } from '@utils'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; import { BottomSheetCreateRenameGroup } from '@components/templates/BottomSheetCreateRenameGroup'; +import { COLORS } from '@constants/colors'; import { DEVICE_HEIGHT } from '@constants/variables'; +import { useListActions } from '@features/lists'; +import { verticalScale } from '@utils'; +import { AddWalletToList, AddWalletToListProps } from '../AddWalletToList'; interface BottomSheetAddWalletToListProps extends AddWalletToListProps { title: string; diff --git a/src/components/templates/BottomSheetCreateCollectionOrAddAddress/BottomSheetCreateCollectionOrAddAddress.test.tsx b/src/components/templates/BottomSheetCreateCollectionOrAddAddress/BottomSheetCreateCollectionOrAddAddress.test.tsx index d36f2c24f..fa1c5fa71 100644 --- a/src/components/templates/BottomSheetCreateCollectionOrAddAddress/BottomSheetCreateCollectionOrAddAddress.test.tsx +++ b/src/components/templates/BottomSheetCreateCollectionOrAddAddress/BottomSheetCreateCollectionOrAddAddress.test.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { render, waitFor } from '@testing-library/react-native'; -import { BottomSheetCreateCollectionOrAddAddress } from '@components/templates/BottomSheetCreateCollectionOrAddAddress/index'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { render, waitFor } from '@testing-library/react-native'; import { SafeAreaProvider } from 'react-native-safe-area-context'; +import { BottomSheetCreateCollectionOrAddAddress } from '@components/templates/BottomSheetCreateCollectionOrAddAddress/index'; import clearAllMocks = jest.clearAllMocks; const queryClient = new QueryClient(); diff --git a/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx b/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx index 602144a33..aa32e6efe 100644 --- a/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx +++ b/src/components/templates/BottomSheetCreateCollectionOrAddAddress/index.tsx @@ -1,12 +1,12 @@ import React, { ForwardedRef, forwardRef, RefObject } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { BottomSheetRef } from '@components/composite'; import { Button, Spacer, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; import { BottomSheetFloat, PrimaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { useForwardedRef } from '@hooks'; import { scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; type Props = { ref: RefObject; diff --git a/src/components/templates/BottomSheetCreateRenameGroup/BottomSheetCreateRenameGroup.test.tsx b/src/components/templates/BottomSheetCreateRenameGroup/BottomSheetCreateRenameGroup.test.tsx index d6e14bca0..8d74b95c0 100644 --- a/src/components/templates/BottomSheetCreateRenameGroup/BottomSheetCreateRenameGroup.test.tsx +++ b/src/components/templates/BottomSheetCreateRenameGroup/BottomSheetCreateRenameGroup.test.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { act, fireEvent, render, waitFor } from '@testing-library/react-native'; import { SafeAreaProvider } from 'react-native-safe-area-context'; -import React from 'react'; import { BottomSheetCreateRenameGroup } from '@components/templates/BottomSheetCreateRenameGroup/index'; -import { act, fireEvent, render, waitFor } from '@testing-library/react-native'; import clearAllMocks = jest.clearAllMocks; const queryClient = new QueryClient(); diff --git a/src/components/templates/BottomSheetCreateRenameGroup/index.tsx b/src/components/templates/BottomSheetCreateRenameGroup/index.tsx index c23cdaa1c..c6aae3509 100644 --- a/src/components/templates/BottomSheetCreateRenameGroup/index.tsx +++ b/src/components/templates/BottomSheetCreateRenameGroup/index.tsx @@ -7,27 +7,26 @@ import React, { useState } from 'react'; import { Platform, View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { Spacer } from '@components/base/Spacer'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Button, Input, InputRef, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; +import { Spacer } from '@components/base/Spacer'; +import { BottomSheet } from '@components/composite'; import { BottomSheetRef } from '@components/composite/BottomSheet/BottomSheet.types'; -import { useForwardedRef } from '@hooks/useForwardedRef'; -import { styles } from '@components/templates/BottomSheetCreateRenameGroup/styles'; import { PrimaryButton, Toast, ToastPosition, ToastType } from '@components/modular'; -import { StringUtils, verticalScale } from '@utils'; -import { BottomSheet } from '@components/composite'; - +import { styles } from '@components/templates/BottomSheetCreateRenameGroup/styles'; +import { COLORS } from '@constants/colors'; +import { useForwardedRef } from '@hooks/useForwardedRef'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { StringUtils, verticalScale } from '@utils'; type Props = { ref: RefObject; diff --git a/src/components/templates/BottomSheetEditCollection/index.tsx b/src/components/templates/BottomSheetEditCollection/index.tsx index dce9e22b0..2721465da 100644 --- a/src/components/templates/BottomSheetEditCollection/index.tsx +++ b/src/components/templates/BottomSheetEditCollection/index.tsx @@ -1,18 +1,18 @@ import React, { ForwardedRef, forwardRef, useCallback, useRef } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { useListActions } from '@features/lists'; +import { Button, Text } from '@components/base'; import { BottomSheet, BottomSheetProps, BottomSheetRef } from '@components/composite'; -import { Button, Text } from '@components/base'; -import { useForwardedRef } from '@hooks/useForwardedRef'; import { COLORS } from '@constants/colors'; +import { useListActions } from '@features/lists'; +import { useForwardedRef } from '@hooks/useForwardedRef'; import { AccountList } from '@models'; import { StringUtils, verticalScale } from '@utils'; +import { styles } from './styles'; import { BottomSheetCreateRenameGroup } from '../BottomSheetCreateRenameGroup'; interface BottomSheetEditCollectionProps extends BottomSheetProps { diff --git a/src/components/templates/BottomSheetEditWallet/BottomSheetEditWallet.test.tsx b/src/components/templates/BottomSheetEditWallet/BottomSheetEditWallet.test.tsx index 2c8e39ee5..8010b9182 100644 --- a/src/components/templates/BottomSheetEditWallet/BottomSheetEditWallet.test.tsx +++ b/src/components/templates/BottomSheetEditWallet/BottomSheetEditWallet.test.tsx @@ -1,9 +1,9 @@ -import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { BottomSheetEditWallet } from '@components/templates/BottomSheetEditWallet/index'; import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render } from '@testing-library/react-native'; +import { SafeAreaProvider } from 'react-native-safe-area-context'; import { ExplorerAccountType } from '@appTypes'; +import { BottomSheetEditWallet } from '@components/templates/BottomSheetEditWallet/index'; import { ExplorerAccount } from '@models'; import clearAllMocks = jest.clearAllMocks; diff --git a/src/components/templates/BottomSheetEditWallet/index.tsx b/src/components/templates/BottomSheetEditWallet/index.tsx index 65ca61ada..9f1748d56 100644 --- a/src/components/templates/BottomSheetEditWallet/index.tsx +++ b/src/components/templates/BottomSheetEditWallet/index.tsx @@ -1,10 +1,7 @@ import React, { ForwardedRef, forwardRef, useCallback, useRef } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { useListActions } from '@features/lists'; -import { useAddressesActions } from '@features/addresses'; -import { useListsSelector } from '@entities/lists'; +import { Button, Text } from '@components/base'; import { BottomSheetProps, BottomSheetRef } from '@components/composite'; import { BottomSheetFloat, @@ -12,11 +9,14 @@ import { ToastPosition, ToastType } from '@components/modular'; -import { Button, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; +import { useListsSelector } from '@entities/lists'; +import { useAddressesActions } from '@features/addresses'; +import { useListActions } from '@features/lists'; import { useForwardedRef } from '@hooks/useForwardedRef'; import { ExplorerAccount } from '@models/Explorer'; import { BottomSheetRenameAddress } from '@screens/SingleCollection/modals/BottomSheetRenameAddress'; -import { COLORS } from '@constants/colors'; +import { styles } from './styles'; import { BottomSheetAddWalletToList } from '../BottomSheetAddWalletToList'; interface BottomSheetEditWalletProps extends BottomSheetProps { diff --git a/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx b/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx index 1135aeac6..55885095c 100644 --- a/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx +++ b/src/components/templates/BottomSheetRemoveAddressFromCollection/index.tsx @@ -7,16 +7,16 @@ import React, { } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { useListActions } from '@features/lists'; -import { useListsSelector } from '@entities/lists'; import { Button, Spacer, Text } from '@components/base'; import { BottomSheetRef } from '@components/composite'; -import { useForwardedRef } from '@hooks'; +import { BottomSheetFloat } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { useListsSelector } from '@entities/lists'; +import { useListActions } from '@features/lists'; +import { useForwardedRef } from '@hooks'; import { ExplorerAccount } from '@models'; -import { BottomSheetFloat } from '@components/modular'; import { verticalScale } from '@utils'; +import { styles } from './styles'; type Props = { ref: RefObject; diff --git a/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx b/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx index 44f87f4b1..8eb71271a 100644 --- a/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx +++ b/src/components/templates/BottomSheetRemoveAddressFromWatchlists/index.tsx @@ -3,10 +3,10 @@ import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Button, Spacer, Text } from '@components/base'; import { BottomSheetRef } from '@components/composite'; -import { useForwardedRef, useWatchlist } from '@hooks'; +import { BottomSheetFloat } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { useForwardedRef, useWatchlist } from '@hooks'; import { ExplorerAccount } from '@models'; -import { BottomSheetFloat } from '@components/modular'; import { verticalScale } from '@utils'; import { styles } from './styles'; diff --git a/src/components/templates/BottomSheetSharePortfolio/SharePortfolio.test.tsx b/src/components/templates/BottomSheetSharePortfolio/SharePortfolio.test.tsx index b63680e70..c58ba5a5c 100644 --- a/src/components/templates/BottomSheetSharePortfolio/SharePortfolio.test.tsx +++ b/src/components/templates/BottomSheetSharePortfolio/SharePortfolio.test.tsx @@ -1,10 +1,10 @@ -import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { SharePortfolio } from '@components/templates'; import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { act, fireEvent, render, waitFor } from '@testing-library/react-native'; -import clearAllMocks = jest.clearAllMocks; +import { SafeAreaProvider } from 'react-native-safe-area-context'; import { Social } from '@appTypes'; +import { SharePortfolio } from '@components/templates'; +import clearAllMocks = jest.clearAllMocks; jest.mock('@utils/share', () => ({ ShareUtils: { diff --git a/src/components/templates/BottomSheetSharePortfolio/index.tsx b/src/components/templates/BottomSheetSharePortfolio/index.tsx index 97b7f0b51..d82818b57 100644 --- a/src/components/templates/BottomSheetSharePortfolio/index.tsx +++ b/src/components/templates/BottomSheetSharePortfolio/index.tsx @@ -1,19 +1,19 @@ import React, { ForwardedRef, forwardRef, RefObject, useRef } from 'react'; import { View } from 'react-native'; -import ViewShot, { captureRef, CaptureOptions } from 'react-native-view-shot'; import { useTranslation } from 'react-i18next'; -import { BottomSheetFloat } from '@components/modular'; -import { BottomSheetRef } from '@components/composite'; -import { useForwardedRef } from '@hooks/useForwardedRef'; +import ViewShot, { captureRef, CaptureOptions } from 'react-native-view-shot'; +import { Social } from '@appTypes/Sharing'; import { Button, Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; +import { BottomSheetRef } from '@components/composite'; +import { BottomSheetFloat } from '@components/modular'; +import { MessagesIcon, PlusIcon, TwitterIcon } from '@components/svg/icons'; import { PortfolioPerformance, PortfolioPerformanceProps } from '@components/templates/PortfolioPerformance'; -import { MessagesIcon, PlusIcon, TwitterIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; +import { useForwardedRef } from '@hooks/useForwardedRef'; import { ShareUtils, scale, verticalScale } from '@utils'; -import { Social } from '@appTypes/Sharing'; import { styles } from './styles'; interface SharePortfolioProps extends PortfolioPerformanceProps { diff --git a/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx b/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx index e2c0beb21..9a0f70db9 100644 --- a/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx +++ b/src/components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey.tsx @@ -1,20 +1,20 @@ import React, { ForwardedRef, forwardRef, useMemo } from 'react'; import { View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { SettingsTabNavigationProp } from '@appTypes'; +import { Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetProps, BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; -import { Spacer, Text } from '@components/base'; -import { useForwardedRef } from '@hooks'; import { COLORS } from '@constants/colors'; -import { SettingsTabNavigationProp } from '@appTypes'; +import { useForwardedRef } from '@hooks'; import { _delayNavigation, scale } from '@utils'; +import { styles } from './styles'; interface BottomSheetViewAccessKeyProps extends BottomSheetProps { walletHash: string; diff --git a/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx b/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx index 7f2b9bed7..7e4258229 100644 --- a/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx +++ b/src/components/templates/BottomSheetWalletCreateOrImport/index.tsx @@ -2,20 +2,20 @@ import React, { ForwardedRef, forwardRef, useCallback } from 'react'; import { TouchableOpacity, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { HomeNavigationProp } from '@appTypes'; +import { Button, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetProps, BottomSheetRef } from '@components/composite'; -import { Button, Spacer, Text } from '@components/base'; -import { useForwardedRef } from '@hooks'; -import { scale, verticalScale } from '@utils'; -import { HomeNavigationProp } from '@appTypes'; import { AddIcon, CloseIcon } from '@components/svg/icons'; -import { COLORS } from '@constants/colors'; import { DownloadIcon } from '@components/svg/icons/v2/settings'; +import { COLORS } from '@constants/colors'; import { useAddWalletStore } from '@features/add-wallet'; +import { useForwardedRef } from '@hooks'; +import { scale, verticalScale } from '@utils'; +import { styles } from './styles'; export const BottomSheetWalletCreateOrImport = forwardRef< BottomSheetRef, diff --git a/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx b/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx index aa3c4f21c..732300d3c 100644 --- a/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx +++ b/src/components/templates/BottomSheetWalletCreateOrImport/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ buttonWrapper: { diff --git a/src/components/templates/BridgeSelectorItem/index.tsx b/src/components/templates/BridgeSelectorItem/index.tsx index 13be8e2fa..6ae43bb53 100644 --- a/src/components/templates/BridgeSelectorItem/index.tsx +++ b/src/components/templates/BridgeSelectorItem/index.tsx @@ -1,11 +1,11 @@ import React, { ReactNode, useMemo } from 'react'; import { View } from 'react-native'; +import { CryptoCurrencyCode } from '@appTypes'; import { Button, Spacer, Text } from '@components/base'; +import { TokenLogo } from '@components/modular'; import { ParsedBridge, RenderTokenItem } from '@models/Bridge'; import { scale } from '@utils'; -import { TokenLogo } from '@components/modular'; import { styles } from './styles'; -import { CryptoCurrencyCode } from '@appTypes'; interface BridgeSelectorItemModel { name: string; diff --git a/src/components/templates/BridgeSelectorItem/styles.tsx b/src/components/templates/BridgeSelectorItem/styles.tsx index 7b6f8cc21..f53ca8945 100644 --- a/src/components/templates/BridgeSelectorItem/styles.tsx +++ b/src/components/templates/BridgeSelectorItem/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ mainButton: { diff --git a/src/components/templates/DropDownPanel/index.tsx b/src/components/templates/DropDownPanel/index.tsx index 765e32d6e..5d967c938 100644 --- a/src/components/templates/DropDownPanel/index.tsx +++ b/src/components/templates/DropDownPanel/index.tsx @@ -11,9 +11,9 @@ import Animated, { withTiming } from 'react-native-reanimated'; import { Row, Spacer } from '@components/base'; -import { scale } from '@utils'; -import { COLORS } from '@constants/colors'; import { BackIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; import { styles } from './styles'; interface ToolTipProps { diff --git a/src/components/templates/DropDownPanel/styles.tsx b/src/components/templates/DropDownPanel/styles.tsx index 748df1726..8424f3e10 100644 --- a/src/components/templates/DropDownPanel/styles.tsx +++ b/src/components/templates/DropDownPanel/styles.tsx @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { contentBox } from '@components/styles'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx b/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx index 4e874fe66..b179b2cd8 100644 --- a/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx +++ b/src/components/templates/ExplorerAccount/ExplorerAccount.Transactions.tsx @@ -11,13 +11,13 @@ import { } from 'react-native'; import moment from 'moment'; import Animated from 'react-native-reanimated'; -import { Transaction } from '@models'; -import { CenteredSpinner } from '@components/composite'; import { Spacer, Text } from '@components/base'; +import { CenteredSpinner } from '@components/composite'; +import { COLORS } from '@constants/colors'; +import { Transaction } from '@models'; +import { scale, verticalScale } from '@utils'; import { ExplorerAccountTransactionItem } from './components'; import { LocalizedRenderEmpty } from '../LocalizedRenderEmpty'; -import { scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; interface ExplorerAccountViewTransactionsProps { transactions: Transaction[]; diff --git a/src/components/templates/ExplorerAccount/__tests__/ExploreAccount.test.tsx b/src/components/templates/ExplorerAccount/__tests__/ExploreAccount.test.tsx index 7c9b5ad99..6e8fbe5c5 100644 --- a/src/components/templates/ExplorerAccount/__tests__/ExploreAccount.test.tsx +++ b/src/components/templates/ExplorerAccount/__tests__/ExploreAccount.test.tsx @@ -1,10 +1,10 @@ import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render, fireEvent, waitFor } from '@testing-library/react-native'; -import { ExplorerAccountView } from '@components/templates'; import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; // import { MockTransaction } from '../../../__mocks__/models/Transaction.mock'; import { ExplorerAccountType } from '@appTypes'; +import { ExplorerAccountView } from '@components/templates'; import { ExplorerAccount } from '@models'; import clearAllMocks = jest.clearAllMocks; diff --git a/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx b/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx index ffba1ae73..407b51c6c 100644 --- a/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx +++ b/src/components/templates/ExplorerAccount/components/address-row-with-action/index.tsx @@ -1,10 +1,10 @@ import React, { useCallback, useMemo, useState } from 'react'; import { Pressable, StyleProp, View, ViewStyle } from 'react-native'; import * as Clipboard from 'expo-clipboard'; -import { DetailsItemTypography } from '@components/base/ExplorerTransactions'; import { Row } from '@components/base'; -import { ClipboardIcon } from '@components/svg/icons/v2'; +import { DetailsItemTypography } from '@components/base/ExplorerTransactions'; import { Checkmark } from '@components/svg/icons'; +import { ClipboardIcon } from '@components/svg/icons/v2'; import { scale } from '@utils'; interface AddressRowWithActionProps { diff --git a/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx b/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx index 2017f8a56..e6664c3a2 100644 --- a/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx +++ b/src/components/templates/ExplorerAccount/components/transaction-item/ExplorerAccount.TransactionItem.tsx @@ -5,12 +5,12 @@ import moment from 'moment'; import { Button, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { TransactionItem } from '@components/modular'; -import { Transaction, TransactionTokenInfo } from '@models/Transaction'; -import { scale, verticalScale } from '@utils'; -import { AMB_DECIMALS } from '@constants/variables'; -import { COLORS } from '@constants/colors'; import { TransactionDetails } from '@components/templates/TransactionDetails'; +import { COLORS } from '@constants/colors'; +import { AMB_DECIMALS } from '@constants/variables'; import { _txStatusLabel } from '@features/explorer/utils'; +import { Transaction, TransactionTokenInfo } from '@models/Transaction'; +import { scale, verticalScale } from '@utils'; interface ExplorerAccountTransactionItemProps { transaction: Transaction; diff --git a/src/components/templates/ExplorerAccount/index.tsx b/src/components/templates/ExplorerAccount/index.tsx index e45787d25..d0a8ac758 100644 --- a/src/components/templates/ExplorerAccount/index.tsx +++ b/src/components/templates/ExplorerAccount/index.tsx @@ -2,15 +2,15 @@ import React, { useRef } from 'react'; import { ScrollView, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Badge, Button, Row, Spacer, Text } from '@components/base'; -import { ExplorerAccount } from '@models/Explorer'; -import { useAMBPrice } from '@hooks/query'; -import { NumberUtils, scale, verticalScale, StringUtils } from '@utils'; -import { styles } from './styles'; import { BottomSheetRef, CopyToClipboardButton } from '@components/composite'; import { COLORS } from '@constants/colors'; +import { useListsSelector } from '@entities/lists'; import { useWatchlist } from '@hooks'; +import { useAMBPrice } from '@hooks/query'; +import { ExplorerAccount } from '@models/Explorer'; +import { NumberUtils, scale, verticalScale, StringUtils } from '@utils'; +import { styles } from './styles'; import { BottomSheetAddWalletToList } from '../BottomSheetAddWalletToList'; -import { useListsSelector } from '@entities/lists'; interface ExplorerAccountProps { account: ExplorerAccount; diff --git a/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/index.tsx b/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/index.tsx index 20cd41193..2bfc4900c 100644 --- a/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/index.tsx +++ b/src/components/templates/InputWithTokenSelect/components/BottomSheetTokensList/index.tsx @@ -1,8 +1,8 @@ import React, { forwardRef, PropsWithChildren, useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; -import { styles } from './styles'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { useForwardedRef } from '@hooks'; +import { styles } from './styles'; interface BottomSheetTokensListProps extends PropsWithChildren { title: string; diff --git a/src/components/templates/InputWithTokenSelect/index.tsx b/src/components/templates/InputWithTokenSelect/index.tsx index 67d7d718d..ca0d47af2 100644 --- a/src/components/templates/InputWithTokenSelect/index.tsx +++ b/src/components/templates/InputWithTokenSelect/index.tsx @@ -17,15 +17,15 @@ import { View, ViewStyle } from 'react-native'; -import { styles } from './styles'; -import { BottomSheetTokensList } from './components'; import { InputRef, Text, TextInput } from '@components/base'; import { BottomSheetRef } from '@components/composite'; import { BalanceRow, TokenSelector } from '@components/modular'; -import { Token } from '@models'; import { COLORS } from '@constants/colors'; import { useForwardedRef } from '@hooks'; +import { Token } from '@models'; import { isAndroid, StringUtils, NumberUtils } from '@utils'; +import { BottomSheetTokensList } from './components'; +import { styles } from './styles'; interface InputWithTokenSelectProps { readonly title?: string; diff --git a/src/components/templates/InputWithoutTokenSelect/index.tsx b/src/components/templates/InputWithoutTokenSelect/index.tsx index e46ac6ecf..48265f275 100644 --- a/src/components/templates/InputWithoutTokenSelect/index.tsx +++ b/src/components/templates/InputWithoutTokenSelect/index.tsx @@ -17,7 +17,6 @@ import { ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Button, InputRef, @@ -28,11 +27,12 @@ import { } from '@components/base'; import { BottomSheetRef } from '@components/composite'; import { TokenLogo, TokenSelector } from '@components/modular'; -import { Token } from '@models'; +import { DownArrowIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { useForwardedRef } from '@hooks'; +import { Token } from '@models'; import { scale, StringUtils, NumberUtils, isAndroid } from '@utils'; -import { DownArrowIcon } from '@components/svg/icons'; +import { styles } from './styles'; interface InputWithoutTokenSelectProps { readonly title?: string; diff --git a/src/components/templates/InputWithoutTokenSelect/styles.tsx b/src/components/templates/InputWithoutTokenSelect/styles.tsx index c10df6463..c3779be81 100644 --- a/src/components/templates/InputWithoutTokenSelect/styles.tsx +++ b/src/components/templates/InputWithoutTokenSelect/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/components/templates/LocalizedRenderEmpty/index.tsx b/src/components/templates/LocalizedRenderEmpty/index.tsx index 36d4426ba..3c1bed4e1 100644 --- a/src/components/templates/LocalizedRenderEmpty/index.tsx +++ b/src/components/templates/LocalizedRenderEmpty/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { View } from 'react-native'; -import { EmptyAddressListPlaceholderIcon } from '@components/svg/icons'; +import { useTranslation } from 'react-i18next'; import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils'; +import { EmptyAddressListPlaceholderIcon } from '@components/svg/icons'; import { styles } from '@components/templates/LocalizedRenderEmpty/styles'; -import { useTranslation } from 'react-i18next'; import { COLORS } from '@constants/colors'; +import { verticalScale } from '@utils'; type LocalizedRenderEmptyProps = { text: string; diff --git a/src/components/templates/NotificationSettings/NotificationSettings.tsx b/src/components/templates/NotificationSettings/NotificationSettings.tsx index 9472b48e2..e59573188 100644 --- a/src/components/templates/NotificationSettings/NotificationSettings.tsx +++ b/src/components/templates/NotificationSettings/NotificationSettings.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { NotificationSettingsView } from './index'; -import { SafeAreaProvider } from 'react-native-safe-area-context'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { act, fireEvent, render } from '@testing-library/react-native'; -import clearAllMocks = jest.clearAllMocks; +import { SafeAreaProvider } from 'react-native-safe-area-context'; import { COLORS } from '@constants/colors'; +import { NotificationSettingsView } from './index'; +import clearAllMocks = jest.clearAllMocks; jest.mock('react-native-modal', () => { return ({ children }: { children: React.ReactNode }) => <>{children}; diff --git a/src/components/templates/NotificationSettings/index.tsx b/src/components/templates/NotificationSettings/index.tsx index c3780b1c0..a9a51dc07 100644 --- a/src/components/templates/NotificationSettings/index.tsx +++ b/src/components/templates/NotificationSettings/index.tsx @@ -1,12 +1,12 @@ import React, { useEffect, useState } from 'react'; import { ScrollView, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { Segment } from '@components/composite'; +import { NotificationSettings } from '@appTypes/notification'; import { Button, Row, Spacer, Switch, Text } from '@components/base'; +import { Segment } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils'; import { useNotificationSettings } from '@hooks/cache'; -import { NotificationSettings } from '@appTypes/notification'; +import { scale, verticalScale } from '@utils'; import { styles } from './styles'; const Title = ({ children }: { children: React.ReactNode }) => ( diff --git a/src/components/templates/PortfolioPerformance/PortfolioPerformance.test.tsx b/src/components/templates/PortfolioPerformance/PortfolioPerformance.test.tsx index 48f944192..569e440f5 100644 --- a/src/components/templates/PortfolioPerformance/PortfolioPerformance.test.tsx +++ b/src/components/templates/PortfolioPerformance/PortfolioPerformance.test.tsx @@ -1,8 +1,8 @@ import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render } from '@testing-library/react-native'; -import { PortfolioPerformance } from '@components/templates'; import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { PortfolioPerformance } from '@components/templates'; const queryClient = new QueryClient(); diff --git a/src/components/templates/PortfolioPerformance/index.tsx b/src/components/templates/PortfolioPerformance/index.tsx index 2c19577cf..8c53464f3 100644 --- a/src/components/templates/PortfolioPerformance/index.tsx +++ b/src/components/templates/PortfolioPerformance/index.tsx @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import React from 'react'; import { Image, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import moment from 'moment'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; +import { Badge } from '@components/base/Badge'; import { COLORS } from '@constants/colors'; import { scale, verticalScale, NumberUtils } from '@utils'; -import { Badge } from '@components/base/Badge'; import { styles } from './styles'; export interface PortfolioPerformanceProps { diff --git a/src/components/templates/PortfolioPerformance/styles.ts b/src/components/templates/PortfolioPerformance/styles.ts index a1b98e53e..1956e54a8 100644 --- a/src/components/templates/PortfolioPerformance/styles.ts +++ b/src/components/templates/PortfolioPerformance/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/ReceiveFunds/index.tsx b/src/components/templates/ReceiveFunds/index.tsx index 13f704b0d..94b6afc26 100644 --- a/src/components/templates/ReceiveFunds/index.tsx +++ b/src/components/templates/ReceiveFunds/index.tsx @@ -1,12 +1,12 @@ import React, { useReducer } from 'react'; -import { useTranslation } from 'react-i18next'; import { View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { QRCodeWithLogo } from '@components/modular'; +import { CheckboxCircleFill } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { Clipboard, moderateScale, verticalScale } from '@utils'; import { styles } from './styles'; -import { CheckboxCircleFill } from '@components/svg/icons/v2'; interface ReceiveFundsProps { address: string; diff --git a/src/components/templates/ReceiveFunds/styles.ts b/src/components/templates/ReceiveFunds/styles.ts index 89c044143..decd99d2f 100644 --- a/src/components/templates/ReceiveFunds/styles.ts +++ b/src/components/templates/ReceiveFunds/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/components/templates/RenderEmpty/index.tsx b/src/components/templates/RenderEmpty/index.tsx index 21aec5143..a882a2c13 100644 --- a/src/components/templates/RenderEmpty/index.tsx +++ b/src/components/templates/RenderEmpty/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { View } from 'react-native'; -import { EmptyWalletListPlaceholderIcon } from '@components/svg/icons'; +import { useTranslation } from 'react-i18next'; import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils'; +import { EmptyWalletListPlaceholderIcon } from '@components/svg/icons'; import { styles } from '@components/templates/LocalizedRenderEmpty/styles'; -import { useTranslation } from 'react-i18next'; +import { verticalScale } from '@utils'; type LocalizedRenderEmptyProps = { text: string; diff --git a/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx b/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx index 9dc33866a..55740ce30 100644 --- a/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx +++ b/src/components/templates/SearchAddress/SearchAddress.NoMatch.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Spacer, Text } from '@components/base'; +import { NoMatch } from '@components/svg/icons/NoMatch'; import { COLORS } from '@constants/colors'; import { moderateScale, verticalScale } from '@utils'; -import { NoMatch } from '@components/svg/icons/NoMatch'; -import { useTranslation } from 'react-i18next'; export function SearchAddressNoResult(): JSX.Element { const { t } = useTranslation(); diff --git a/src/components/templates/SearchAddress/index.tsx b/src/components/templates/SearchAddress/index.tsx index 78d95da78..6982be02f 100644 --- a/src/components/templates/SearchAddress/index.tsx +++ b/src/components/templates/SearchAddress/index.tsx @@ -6,12 +6,6 @@ import React, { } from 'react'; import { Alert, useWindowDimensions, View, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { AccountTransactions, ExplorerAccountView } from '../ExplorerAccount'; -import { BarcodeScanner } from '../BarcodeScanner'; -import { TransactionDetails } from '../TransactionDetails'; -import { SearchAddressNoResult } from './SearchAddress.NoMatch'; -import { BottomSheetEditWallet } from '../BottomSheetEditWallet'; import { Button, InputRef, @@ -26,24 +20,30 @@ import { CenteredSpinner, InputWithIcon } from '@components/composite'; +import { Toast, ToastPosition, ToastType } from '@components/modular'; import { CloseIcon, ScannerQRIcon, SearchIcon } from '@components/svg/icons'; -import { scale, verticalScale } from '@utils'; +import { COLORS } from '@constants/colors'; +import { ethereumAddressRegex } from '@constants/regex'; +import { CRYPTO_ADDRESS_MAX_LENGTH } from '@constants/variables'; + +import { useAddressesStore } from '@entities/addresses'; import { useExplorerInfo, useSearchAccount, useTransactionDetails, useTransactionsOfAccount } from '@hooks'; -import { ethereumAddressRegex } from '@constants/regex'; -import { Toast, ToastPosition, ToastType } from '@components/modular'; -import { CRYPTO_ADDRESS_MAX_LENGTH } from '@constants/variables'; -import { COLORS } from '@constants/colors'; - import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { useAddressesStore } from '@entities/addresses'; +import { scale, verticalScale } from '@utils'; +import { BottomSheetEditWallet } from '../BottomSheetEditWallet'; +import { SearchAddressNoResult } from './SearchAddress.NoMatch'; +import { BarcodeScanner } from '../BarcodeScanner'; +import { AccountTransactions, ExplorerAccountView } from '../ExplorerAccount'; +import { TransactionDetails } from '../TransactionDetails'; +import { styles } from './styles'; interface SearchAdressProps { scannerDisabled?: boolean; diff --git a/src/components/templates/SearchAddress/styles.ts b/src/components/templates/SearchAddress/styles.ts index fab8b4879..475280e4a 100644 --- a/src/components/templates/SearchAddress/styles.ts +++ b/src/components/templates/SearchAddress/styles.ts @@ -1,6 +1,6 @@ import { Dimensions, StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ input: { diff --git a/src/components/templates/StakingPoolList/index.tsx b/src/components/templates/StakingPoolList/index.tsx index 1175d7d40..56023e124 100644 --- a/src/components/templates/StakingPoolList/index.tsx +++ b/src/components/templates/StakingPoolList/index.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { FlatList, FlatListProps, ListRenderItemInfo } from 'react-native'; +import { Button } from '@components/base'; import { StakingPoolItem } from '@components/modular'; import { StakingPool } from '@models'; -import { Button } from '@components/base'; interface StakingPoolListProps extends Omit< diff --git a/src/components/templates/TokenPicker/index.tsx b/src/components/templates/TokenPicker/index.tsx index af4767d51..e35c69762 100644 --- a/src/components/templates/TokenPicker/index.tsx +++ b/src/components/templates/TokenPicker/index.tsx @@ -5,9 +5,9 @@ import { Button, Row, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { SingleAsset, TokenLogo } from '@components/modular'; import { ChevronDownIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; import { Token } from '@models'; import { scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; interface TokenPickerProps { tokens: Token[]; diff --git a/src/components/templates/TransactionDetails/TransactionDetails.test.tsx b/src/components/templates/TransactionDetails/TransactionDetails.test.tsx index a79e088b2..dad9f8e6a 100644 --- a/src/components/templates/TransactionDetails/TransactionDetails.test.tsx +++ b/src/components/templates/TransactionDetails/TransactionDetails.test.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { render } from '@testing-library/react-native'; +import { ExplorerAccountType, TransactionType } from '@appTypes'; import { TransactionDetails } from '@components/templates'; import { Transaction } from '@models'; -import { ExplorerAccountType, TransactionType } from '@appTypes'; import clearAllMocks = jest.clearAllMocks; jest.mock('@hooks', () => ({ diff --git a/src/components/templates/TransactionDetails/index.tsx b/src/components/templates/TransactionDetails/index.tsx index e7a59910a..9aa3b0b19 100644 --- a/src/components/templates/TransactionDetails/index.tsx +++ b/src/components/templates/TransactionDetails/index.tsx @@ -2,16 +2,16 @@ import React, { useCallback, useMemo, useRef } from 'react'; import { Linking, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer, Text } from '@components/base'; +import { DetailsItemTypography } from '@components/base/ExplorerTransactions'; import { BottomSheetRef } from '@components/composite'; +import { TokenLogo } from '@components/modular'; +import { GlobeIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; +import Config from '@constants/config'; import { Transaction, TransactionTokenInfo } from '@models/Transaction'; import { NumberUtils } from '@utils'; -import { COLORS } from '@constants/colors'; import { SharePortfolio } from '../BottomSheetSharePortfolio'; import { styles } from './styles'; -import { TokenLogo } from '@components/modular'; -import { GlobeIcon } from '@components/svg/icons/v2'; -import Config from '@constants/config'; -import { DetailsItemTypography } from '@components/base/ExplorerTransactions'; import { AddressRowWithAction } from '../ExplorerAccount/components/address-row-with-action'; interface TransactionDetailsProps { diff --git a/src/components/templates/WalletDepositFunds/index.tsx b/src/components/templates/WalletDepositFunds/index.tsx index 915d29e58..642e0fa33 100644 --- a/src/components/templates/WalletDepositFunds/index.tsx +++ b/src/components/templates/WalletDepositFunds/index.tsx @@ -7,24 +7,24 @@ import { ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import Animated, { - useAnimatedStyle, - useSharedValue, - withTiming -} from 'react-native-reanimated'; import { GestureHandlerRootView, PanGestureHandler, PanGestureHandlerGestureEvent } from 'react-native-gesture-handler'; -import { styles } from './styles'; +import Animated, { + useAnimatedStyle, + useSharedValue, + withTiming +} from 'react-native-reanimated'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Text } from '@components/base'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { ReceiveFunds } from '../ReceiveFunds'; import { useWalletStore } from '@entities/wallet'; +import { ReceiveFunds } from '../ReceiveFunds'; +import { styles } from './styles'; const MAX_SCROLL_Y = 64; diff --git a/src/components/templates/WalletDepositFunds/styles.ts b/src/components/templates/WalletDepositFunds/styles.ts index 585324e6d..ebf7f6167 100644 --- a/src/components/templates/WalletDepositFunds/styles.ts +++ b/src/components/templates/WalletDepositFunds/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { DEVICE_WIDTH } from '@constants/variables'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ gestureContainer: { diff --git a/src/components/templates/WalletItem/WalletItem.test.tsx b/src/components/templates/WalletItem/WalletItem.test.tsx index 0e37024e9..6cd76038f 100644 --- a/src/components/templates/WalletItem/WalletItem.test.tsx +++ b/src/components/templates/WalletItem/WalletItem.test.tsx @@ -1,9 +1,9 @@ import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render } from '@testing-library/react-native'; -import { WalletItem } from '@components/templates'; -import { ExplorerAccountType } from '@appTypes'; import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { ExplorerAccountType } from '@appTypes'; +import { WalletItem } from '@components/templates'; import clearAllMocks = jest.clearAllMocks; const mockItem = { diff --git a/src/components/templates/WalletItem/index.tsx b/src/components/templates/WalletItem/index.tsx index 2cbe4fc4e..adcd3006b 100644 --- a/src/components/templates/WalletItem/index.tsx +++ b/src/components/templates/WalletItem/index.tsx @@ -1,10 +1,10 @@ import React, { useMemo } from 'react'; import { FlexAlignType, View } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; -import { ExplorerAccount } from '@models/Explorer'; -import { useAMBPrice } from '@hooks'; import { PercentChange } from '@components/composite'; import { COLORS } from '@constants/colors'; +import { useAMBPrice } from '@hooks'; +import { ExplorerAccount } from '@models/Explorer'; import { scale, NumberUtils, StringUtils } from '@utils'; import { AddressIndicator } from '../AddressIndicator'; diff --git a/src/components/templates/WalletNoNFTsView/index.tsx b/src/components/templates/WalletNoNFTsView/index.tsx index 717dd518e..bfe7f6bcd 100644 --- a/src/components/templates/WalletNoNFTsView/index.tsx +++ b/src/components/templates/WalletNoNFTsView/index.tsx @@ -1,18 +1,18 @@ import React, { useMemo, useRef } from 'react'; import { ActivityIndicator, Image, StyleProp, ViewStyle } from 'react-native'; -import Animated, { - useAnimatedStyle, - useSharedValue, - withTiming -} from 'react-native-reanimated'; import { GestureHandlerRootView, PanGestureHandler, PanGestureHandlerGestureEvent } from 'react-native-gesture-handler'; -import { styles } from './styles'; +import Animated, { + useAnimatedStyle, + useSharedValue, + withTiming +} from 'react-native-reanimated'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { styles } from './styles'; const MAX_SCROLL_Y = 64; diff --git a/src/components/templates/WalletPicker/WalletPicker.item.tsx b/src/components/templates/WalletPicker/WalletPicker.item.tsx index 3e6bf774c..132b54be3 100644 --- a/src/components/templates/WalletPicker/WalletPicker.item.tsx +++ b/src/components/templates/WalletPicker/WalletPicker.item.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { View } from 'react-native'; +import { CryptoCurrencyCode } from '@appTypes'; import { Row, Spacer, Text } from '@components/base'; +import { CheckIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; import { AccountDBModel } from '@database'; -import { WalletAvatars } from './WalletPicker.constants'; import { useBalanceOfAddress, useUSDPrice } from '@hooks'; -import { CryptoCurrencyCode } from '@appTypes'; import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { styles } from './styles'; -import { COLORS } from '@constants/colors'; -import { CheckIcon } from '@components/svg/icons'; +import { WalletAvatars } from './WalletPicker.constants'; interface WalletItemProps { wallet: AccountDBModel; diff --git a/src/components/templates/WalletPicker/index.tsx b/src/components/templates/WalletPicker/index.tsx index da1487ea0..4479e85f0 100644 --- a/src/components/templates/WalletPicker/index.tsx +++ b/src/components/templates/WalletPicker/index.tsx @@ -3,13 +3,13 @@ import { ScrollView, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Button, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { scale, verticalScale } from '@utils'; +import { WalletAvatarDefault } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; import { AccountDBModel } from '@database'; -import { WalletAvatarDefault } from '@components/svg/icons'; +import { scale, verticalScale } from '@utils'; +import { styles } from './styles'; import { WalletAvatars, avatarScale } from './WalletPicker.constants'; import { WalletPickerItem } from './WalletPicker.item'; -import { styles } from './styles'; interface WalletPickerProps { wallets: AccountDBModel[]; diff --git a/src/components/templates/WalletPicker/styles.ts b/src/components/templates/WalletPicker/styles.ts index bd54dd022..8f253db61 100644 --- a/src/components/templates/WalletPicker/styles.ts +++ b/src/components/templates/WalletPicker/styles.ts @@ -1,5 +1,5 @@ -import { COLORS } from '@constants/colors'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ circularAvatar: { diff --git a/src/components/templates/WalletTransactionsAndAssets/NftAssets/index.tsx b/src/components/templates/WalletTransactionsAndAssets/NftAssets/index.tsx index 9e492ca8a..bc0558b94 100644 --- a/src/components/templates/WalletTransactionsAndAssets/NftAssets/index.tsx +++ b/src/components/templates/WalletTransactionsAndAssets/NftAssets/index.tsx @@ -1,12 +1,12 @@ import React, { useCallback } from 'react'; import { FlatList, RefreshControl, View } from 'react-native'; -import { styles } from './styles'; -import { Token } from '@models'; -import { Button, Spinner } from '@components/base'; -import { SingleAssetNFT } from '@components/modular'; import { useNavigation } from '@react-navigation/native'; import { CryptoCurrencyCode, HomeNavigationProp } from '@appTypes'; +import { Button, Spinner } from '@components/base'; +import { SingleAssetNFT } from '@components/modular'; import { useWalletStore } from '@entities/wallet'; +import { Token } from '@models'; +import { styles } from './styles'; import { WalletNoNFTsView } from '../../WalletNoNFTsView'; interface NftAssetsProps { diff --git a/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx b/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx index 4332c89b1..a3ed000ef 100644 --- a/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx +++ b/src/components/templates/WalletTransactionsAndAssets/WalletAssets/index.tsx @@ -1,16 +1,16 @@ import React, { forwardRef, useCallback, useMemo } from 'react'; import { FlatList, RefreshControl, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import { useTranslation } from 'react-i18next'; import { ethers } from 'ethers'; -import { styles } from './styles'; -import { LocalizedRenderEmpty } from '@components/templates/LocalizedRenderEmpty'; -import { SingleAsset } from '@components/modular'; -import { Button, Spinner } from '@components/base'; +import { useTranslation } from 'react-i18next'; import { CryptoCurrencyCode, HomeNavigationProp } from '@appTypes'; +import { Button, Spinner } from '@components/base'; +import { SingleAsset } from '@components/modular'; +import { LocalizedRenderEmpty } from '@components/templates/LocalizedRenderEmpty'; +import { AMB_DECIMALS } from '@constants/variables'; import { ExplorerAccount, Token } from '@models'; import { TokenUtils } from '@utils'; -import { AMB_DECIMALS } from '@constants/variables'; +import { styles } from './styles'; interface WalletAssetsProps { tokens: Token[] | undefined; diff --git a/src/components/templates/WalletTransactionsAndAssets/index.tsx b/src/components/templates/WalletTransactionsAndAssets/index.tsx index d2640f86e..a525e740b 100644 --- a/src/components/templates/WalletTransactionsAndAssets/index.tsx +++ b/src/components/templates/WalletTransactionsAndAssets/index.tsx @@ -11,19 +11,19 @@ import { NativeSyntheticEvent, View } from 'react-native'; -import { DerivedValue } from 'react-native-reanimated'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { DerivedValue } from 'react-native-reanimated'; +import { Spinner } from '@components/base'; import { AnimatedTabs } from '@components/modular'; -import { ExplorerAccount } from '@models'; +import { _tokensOrNftMapper } from '@entities/wallet'; +import { balanceReducer } from '@features/wallet-assets/utils'; import { useTokensAndTransactions } from '@hooks'; +import { ExplorerAccount } from '@models'; +import { styles } from './styles'; import { AccountTransactions } from '../ExplorerAccount'; -import { WalletAssets } from './WalletAssets'; import { NftAssets } from './NftAssets'; +import { WalletAssets } from './WalletAssets'; import { WalletDepositFunds } from '../WalletDepositFunds'; -import { Spinner } from '@components/base'; -import { _tokensOrNftMapper } from '@entities/wallet'; -import { balanceReducer } from '@features/wallet-assets/utils'; interface WalletTransactionsAndAssetsProps { account: ExplorerAccount; diff --git a/src/constants/config.ts b/src/constants/config.ts index 13d7b2ec7..df7dfc5f6 100644 --- a/src/constants/config.ts +++ b/src/constants/config.ts @@ -1,7 +1,7 @@ import * as Updates from 'expo-updates'; -import { BRIDGE_DATA } from '@constants/bridgeData'; import { ALL_TOKENS_DATA } from '@constants/allToken'; +import { BRIDGE_DATA } from '@constants/bridgeData'; import { SWAP_SUPPORTED_TOKENS } from '@features/swap/entities'; const envs = { diff --git a/src/constants/shadow.ts b/src/constants/shadow.ts index 8dfe7ffbb..4bb0e5eff 100644 --- a/src/constants/shadow.ts +++ b/src/constants/shadow.ts @@ -1,6 +1,6 @@ import { StyleProp, ViewStyle } from 'react-native'; -import { COLORS } from './colors'; import { cssShadowToNative } from '@utils'; +import { COLORS } from './colors'; export const buttonWithShadowStyle = ( disabled: boolean, diff --git a/src/constants/variables.ts b/src/constants/variables.ts index c0f7455da..22464a433 100644 --- a/src/constants/variables.ts +++ b/src/constants/variables.ts @@ -1,5 +1,5 @@ -import { NotificationSettings } from '@appTypes/notification'; import { Dimensions } from 'react-native'; +import { NotificationSettings } from '@appTypes/notification'; export const DEVICE_WIDTH = Dimensions.get('window').width; export const DEVICE_HEIGHT = Dimensions.get('window').height; diff --git a/src/contexts/Localizations/index.tsx b/src/contexts/Localizations/index.tsx index 0c119e6d9..f17b2e0e8 100644 --- a/src/contexts/Localizations/index.tsx +++ b/src/contexts/Localizations/index.tsx @@ -6,12 +6,12 @@ import React, { useEffect, useState } from 'react'; +import dayjs from 'dayjs'; import * as SecureStore from 'expo-secure-store'; import moment from 'moment'; -import dayjs from 'dayjs'; import { Language, LanguageCode } from '@appTypes'; -import { LocalizationUtils } from '@utils'; import i18n from '@localization/i18n'; +import { LocalizationUtils } from '@utils'; interface ILanguageContext { changeCurrentLanguage: (language: Language) => Promise; diff --git a/src/database/Database.ts b/src/database/Database.ts index 8795f7ffd..809effe20 100644 --- a/src/database/Database.ts +++ b/src/database/Database.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { DatabaseTable } from '@appTypes'; -import { database } from './main'; import { Model, Q, Database as WDB } from '@nozbe/watermelondb'; -import { Clause } from '@nozbe/watermelondb/QueryDescription'; import LocalStorage from '@nozbe/watermelondb/Database/LocalStorage'; +import { Clause } from '@nozbe/watermelondb/QueryDescription'; +import { DatabaseTable } from '@appTypes'; +import { database } from './main'; class Database { private db: WDB | undefined; diff --git a/src/database/main.ts b/src/database/main.ts index e49c7bc34..07d3ccde3 100644 --- a/src/database/main.ts +++ b/src/database/main.ts @@ -1,6 +1,6 @@ import { Platform } from 'react-native'; -import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite'; import { Database } from '@nozbe/watermelondb'; +import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite'; import { TransactionsDBModel, WalletDBModel, @@ -9,9 +9,9 @@ import { TransactionRawDBModel, TransactionScannersTmpDBModel } from './models'; -import { schema } from './schemas'; import { PublicAddressDbModel } from './models/public-address'; import { PublicAddressListDbModel } from './models/public-address-list'; +import { schema } from './schemas'; const adapter = new SQLiteAdapter({ schema, diff --git a/src/database/models/account.ts b/src/database/models/account.ts index c4b3ed19e..f6ce3216f 100644 --- a/src/database/models/account.ts +++ b/src/database/models/account.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field, relation } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; import { WalletDBModel } from './wallet'; export class AccountDBModel extends Model { diff --git a/src/database/models/public-address-list.ts b/src/database/models/public-address-list.ts index 7315147d1..f5e4a71a7 100644 --- a/src/database/models/public-address-list.ts +++ b/src/database/models/public-address-list.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model, Q } from '@nozbe/watermelondb'; import { text } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; import { PublicAddressDbModel } from './public-address'; export class PublicAddressListDbModel extends Model { diff --git a/src/database/models/public-address.ts b/src/database/models/public-address.ts index 44254b202..d5cf57437 100644 --- a/src/database/models/public-address.ts +++ b/src/database/models/public-address.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; export class PublicAddressDbModel extends Model { static table = DatabaseTable.PublicAddresses; diff --git a/src/database/models/transaction-scanners-tmp.ts b/src/database/models/transaction-scanners-tmp.ts index 6c4cc3b90..41c62a219 100644 --- a/src/database/models/transaction-scanners-tmp.ts +++ b/src/database/models/transaction-scanners-tmp.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; export class TransactionScannersTmpDBModel extends Model { static table = DatabaseTable.TransactionScannersTmp; diff --git a/src/database/models/transactions-raw.ts b/src/database/models/transactions-raw.ts index 5e80b0ec9..ddd9d09ab 100644 --- a/src/database/models/transactions-raw.ts +++ b/src/database/models/transactions-raw.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; export class TransactionRawDBModel extends Model { static table = DatabaseTable.TransactionRaw; diff --git a/src/database/models/transactions.ts b/src/database/models/transactions.ts index ac4d1b289..2e0fbda57 100644 --- a/src/database/models/transactions.ts +++ b/src/database/models/transactions.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; export class TransactionsDBModel extends Model { static table = DatabaseTable.Transactions; diff --git a/src/database/models/wallet-pub.ts b/src/database/models/wallet-pub.ts index 197b136fe..d3f49416c 100644 --- a/src/database/models/wallet-pub.ts +++ b/src/database/models/wallet-pub.ts @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field, relation } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; import { WalletDBModel } from './wallet'; export class WalletPubDBModel extends Model { diff --git a/src/database/models/wallet.ts b/src/database/models/wallet.ts index 705fbe939..e0f84144d 100644 --- a/src/database/models/wallet.ts +++ b/src/database/models/wallet.ts @@ -1,6 +1,6 @@ -import { DatabaseTable } from '@appTypes'; import { Model } from '@nozbe/watermelondb'; import { text, field } from '@nozbe/watermelondb/decorators'; +import { DatabaseTable } from '@appTypes'; export class WalletDBModel extends Model { static table = DatabaseTable.Wallets; diff --git a/src/database/schemas/account.ts b/src/database/schemas/account.ts index f4063b53c..b6d169d31 100644 --- a/src/database/schemas/account.ts +++ b/src/database/schemas/account.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const AccountsTable = tableSchema({ name: DatabaseTable.Accounts, diff --git a/src/database/schemas/index.ts b/src/database/schemas/index.ts index 128c87fbd..5fb6cfe9b 100644 --- a/src/database/schemas/index.ts +++ b/src/database/schemas/index.ts @@ -1,12 +1,12 @@ import { appSchema } from '@nozbe/watermelondb'; -import { WalletTable } from './wallet'; -import { TransactionScannersTmpTable } from './transaction-scanners-tmp'; -import { WalletPubTable } from './wallet-pub'; import { AccountsTable } from './account'; -import { TransactionRawTable } from './transaction-raw'; -import { TransactionsTable } from './transactions'; import { PublicAddressesTable } from './public-address'; import { PublicAddressListsTable } from './public-address-list'; +import { TransactionRawTable } from './transaction-raw'; +import { TransactionScannersTmpTable } from './transaction-scanners-tmp'; +import { TransactionsTable } from './transactions'; +import { WalletTable } from './wallet'; +import { WalletPubTable } from './wallet-pub'; export const schema = appSchema({ version: 1, diff --git a/src/database/schemas/public-address-list.ts b/src/database/schemas/public-address-list.ts index fcf878dce..82ab514c6 100644 --- a/src/database/schemas/public-address-list.ts +++ b/src/database/schemas/public-address-list.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const PublicAddressListsTable = tableSchema({ name: DatabaseTable.PublicAddressLists, diff --git a/src/database/schemas/public-address.ts b/src/database/schemas/public-address.ts index 0143dad5f..01eef10dd 100644 --- a/src/database/schemas/public-address.ts +++ b/src/database/schemas/public-address.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const PublicAddressesTable = tableSchema({ name: DatabaseTable.PublicAddresses, diff --git a/src/database/schemas/transaction-raw.ts b/src/database/schemas/transaction-raw.ts index 846353e8f..1cea20a8f 100644 --- a/src/database/schemas/transaction-raw.ts +++ b/src/database/schemas/transaction-raw.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const TransactionRawTable = tableSchema({ name: DatabaseTable.TransactionRaw, diff --git a/src/database/schemas/transaction-scanners-tmp.ts b/src/database/schemas/transaction-scanners-tmp.ts index aa3fd79bb..a901b0ad8 100644 --- a/src/database/schemas/transaction-scanners-tmp.ts +++ b/src/database/schemas/transaction-scanners-tmp.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const TransactionScannersTmpTable = tableSchema({ name: DatabaseTable.TransactionScannersTmp, diff --git a/src/database/schemas/transactions.ts b/src/database/schemas/transactions.ts index 4c94538be..9ee8063ec 100644 --- a/src/database/schemas/transactions.ts +++ b/src/database/schemas/transactions.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const TransactionsTable = tableSchema({ name: DatabaseTable.Transactions, diff --git a/src/database/schemas/wallet-pub.ts b/src/database/schemas/wallet-pub.ts index 78c1f44fb..7ec787f0b 100644 --- a/src/database/schemas/wallet-pub.ts +++ b/src/database/schemas/wallet-pub.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const WalletPubTable = tableSchema({ name: DatabaseTable.WalletPub, diff --git a/src/database/schemas/wallet.ts b/src/database/schemas/wallet.ts index 2adef2a3b..e62de547e 100644 --- a/src/database/schemas/wallet.ts +++ b/src/database/schemas/wallet.ts @@ -1,5 +1,5 @@ -import { DatabaseTable } from '@appTypes'; import { tableSchema } from '@nozbe/watermelondb'; +import { DatabaseTable } from '@appTypes'; export const WalletTable = tableSchema({ name: DatabaseTable.Wallets, diff --git a/src/database/services/account.ts b/src/database/services/account.ts index e59d1b138..06f90fdd2 100644 --- a/src/database/services/account.ts +++ b/src/database/services/account.ts @@ -1,7 +1,7 @@ +import { Q } from '@nozbe/watermelondb'; import { DatabaseTable } from '@appTypes'; import Database from '@database/Database'; import { AccountDBModel, WalletDBModel } from '@database/models'; -import { Q } from '@nozbe/watermelondb'; import { WalletDB } from './wallet'; const accountsDb = DatabaseTable.Accounts; diff --git a/src/database/services/public-address-list.ts b/src/database/services/public-address-list.ts index 909aff23e..13e93749f 100644 --- a/src/database/services/public-address-list.ts +++ b/src/database/services/public-address-list.ts @@ -1,6 +1,6 @@ +import { Q } from '@nozbe/watermelondb'; import { CacheableAccount, DatabaseTable } from '@appTypes'; import Database from '@database/Database'; -import { Q } from '@nozbe/watermelondb'; import { PublicAddressListDbModel } from '@database/models'; import { PublicAddressDB } from './public-address'; diff --git a/src/database/services/public-address.ts b/src/database/services/public-address.ts index 2bb25941e..1592ebf02 100644 --- a/src/database/services/public-address.ts +++ b/src/database/services/public-address.ts @@ -1,7 +1,7 @@ -import Database from '@database/Database'; import { Q } from '@nozbe/watermelondb'; -import { PublicAddressDbModel } from '@database/models'; import { CacheableAccount, DatabaseTable } from '@appTypes'; +import Database from '@database/Database'; +import { PublicAddressDbModel } from '@database/models'; const publichAddressesDb = DatabaseTable.PublicAddresses; diff --git a/src/database/services/wallet.ts b/src/database/services/wallet.ts index 0adc4df85..e19149d21 100644 --- a/src/database/services/wallet.ts +++ b/src/database/services/wallet.ts @@ -1,7 +1,7 @@ +import { Q } from '@nozbe/watermelondb'; import { DatabaseTable } from '@appTypes'; import Database from '@database/Database'; import { WalletDBModel } from '@database/models'; -import { Q } from '@nozbe/watermelondb'; const walletsDb = DatabaseTable.Wallets; diff --git a/src/entities/addresses/lib/hooks/use-fetch-addresses.ts b/src/entities/addresses/lib/hooks/use-fetch-addresses.ts index aa38a383e..1e8012c50 100644 --- a/src/entities/addresses/lib/hooks/use-fetch-addresses.ts +++ b/src/entities/addresses/lib/hooks/use-fetch-addresses.ts @@ -1,8 +1,8 @@ import { useCallback, useEffect } from 'react'; +import { API } from '@api/api'; +import { MULTISIG_VAULT } from '@constants/variables'; import { PublicAddressDB } from '@database'; import { ExplorerAccount } from '@models'; -import { MULTISIG_VAULT } from '@constants/variables'; -import { API } from '@api/api'; import { AddressUtils } from '@utils/address'; import { ArrayUtils } from '@utils/array'; import { useAddressesStore } from '../../model'; diff --git a/src/entities/addresses/utils/_db.mapper.ts b/src/entities/addresses/utils/_db.mapper.ts index 4f1193799..bdea2e98b 100644 --- a/src/entities/addresses/utils/_db.mapper.ts +++ b/src/entities/addresses/utils/_db.mapper.ts @@ -1,5 +1,5 @@ -import { ExplorerAccount } from '@models'; import { PublicAddressDB } from '@database'; +import { ExplorerAccount } from '@models'; export async function _dbAddressesMapper(payload: ExplorerAccount[]) { return payload.reduce>( diff --git a/src/entities/currencies/lib/hooks/use-currencies-query.ts b/src/entities/currencies/lib/hooks/use-currencies-query.ts index 3fa60e9dc..546cb2400 100644 --- a/src/entities/currencies/lib/hooks/use-currencies-query.ts +++ b/src/entities/currencies/lib/hooks/use-currencies-query.ts @@ -1,8 +1,8 @@ import { useEffect } from 'react'; import { useQuery } from '@apollo/client'; import { GET_CURRENCIES_QUERY } from '@entities/currencies/lib/currencies.graph'; -import { AwaitCurrencyResponse } from '@entities/currencies/types'; import { useCurrenciesStore } from '@entities/currencies/model'; +import { AwaitCurrencyResponse } from '@entities/currencies/types'; export function useCurrenciesQuery() { const { onSetCurrencies } = useCurrenciesStore(); diff --git a/src/entities/currencies/lib/hooks/use-currency-selector.ts b/src/entities/currencies/lib/hooks/use-currency-selector.ts index 2fe872ebc..c04f513ab 100644 --- a/src/entities/currencies/lib/hooks/use-currency-selector.ts +++ b/src/entities/currencies/lib/hooks/use-currency-selector.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; -import { useCurrenciesStore } from '@entities/currencies/model'; import { lowerCase } from 'lodash'; +import { useCurrenciesStore } from '@entities/currencies/model'; export function useCurrencySelector(amount: number | string, symbol: string) { const { currencies } = useCurrenciesStore(); diff --git a/src/entities/harbor/constants/index.ts b/src/entities/harbor/constants/index.ts index 1c7bf4cc0..99ad48de9 100644 --- a/src/entities/harbor/constants/index.ts +++ b/src/entities/harbor/constants/index.ts @@ -1,8 +1,8 @@ import { BigNumber } from 'ethers'; -import { Token } from '@models'; import { CryptoCurrencyCode } from '@appTypes'; -import { TokenUtils } from '@utils'; import { TierRewardList } from '@entities/harbor/model/types'; +import { Token } from '@models'; +import { TokenUtils } from '@utils'; export const EMPTY_TOKEN = new Token( { diff --git a/src/entities/harbor/model/harbor-store.ts b/src/entities/harbor/model/harbor-store.ts index 342cb47b3..313c703a7 100644 --- a/src/entities/harbor/model/harbor-store.ts +++ b/src/entities/harbor/model/harbor-store.ts @@ -1,10 +1,10 @@ -import { create } from 'zustand'; import { BigNumber } from 'ethers'; +import { create } from 'zustand'; +import { harborService } from '@api/harbor/harbor-service'; import { HarborStoreModel, TierRewardItem } from '@entities/harbor/model/types'; import { getAllHarborData } from '@entities/harbor/utils/getAllHarborData'; import { parseData } from '@entities/harbor/utils/parceData'; import { DEFAULT_DATA, REWARD_TIERS_LIST } from '../constants'; -import { harborService } from '@api/harbor/harbor-service'; export const useHarborStore = create((set) => ({ data: DEFAULT_DATA, diff --git a/src/entities/harbor/utils/getHarborToken.ts b/src/entities/harbor/utils/getHarborToken.ts index 46b16a5c7..789c07397 100644 --- a/src/entities/harbor/utils/getHarborToken.ts +++ b/src/entities/harbor/utils/getHarborToken.ts @@ -1,7 +1,7 @@ import { API } from '@api/api'; -import { TokenUtils } from '@utils'; import Config from '@constants/config'; import { EMPTY_TOKEN } from '@entities/harbor/constants'; +import { TokenUtils } from '@utils'; export const getHarborToken = async (address: string) => { const tokens = await API.explorerService.getTransactionsOfOwnAccount( diff --git a/src/entities/harbor/utils/parceData.ts b/src/entities/harbor/utils/parceData.ts index ed4ec4ceb..dc4a4c1ed 100644 --- a/src/entities/harbor/utils/parceData.ts +++ b/src/entities/harbor/utils/parceData.ts @@ -1,5 +1,5 @@ -import { HarborDataModel } from '@entities/harbor/model/types'; import { DEFAULT_DATA } from '@entities/harbor/constants'; +import { HarborDataModel } from '@entities/harbor/model/types'; type ParseDataModel = Awaited<(string | any)[]>[]; diff --git a/src/entities/kosmos/api/markets.api.ts b/src/entities/kosmos/api/markets.api.ts index 6b30f86f9..2d47379d1 100644 --- a/src/entities/kosmos/api/markets.api.ts +++ b/src/entities/kosmos/api/markets.api.ts @@ -1,6 +1,6 @@ import axios from 'axios'; -import { MarketType } from '@entities/kosmos/types'; import Config from '@constants/config'; +import { MarketType } from '@entities/kosmos/types'; export async function fetchActiveMarkets(): Promise { const response = await axios.get( diff --git a/src/entities/kosmos/lib/hooks/use-token.ts b/src/entities/kosmos/lib/hooks/use-token.ts index 680077687..c30d3c17a 100644 --- a/src/entities/kosmos/lib/hooks/use-token.ts +++ b/src/entities/kosmos/lib/hooks/use-token.ts @@ -1,6 +1,6 @@ import { useCallback, useMemo } from 'react'; -import { $token } from '@entities/kosmos/utils'; import { useMarketTokens } from '@entities/kosmos/lib/hooks/use-market-tokens'; +import { $token } from '@entities/kosmos/utils'; export function useToken(address?: string) { const { tokens } = useMarketTokens(); diff --git a/src/entities/kosmos/lib/hooks/use-transactions.ts b/src/entities/kosmos/lib/hooks/use-transactions.ts index 033bd7dd5..0fcab11f6 100644 --- a/src/entities/kosmos/lib/hooks/use-transactions.ts +++ b/src/entities/kosmos/lib/hooks/use-transactions.ts @@ -1,8 +1,8 @@ import { useCallback, useEffect, useState } from 'react'; -import { useWalletStore } from '@entities/wallet'; -import type { TxType } from '@entities/kosmos'; import { fetchMarketTransactions } from '@entities/kosmos/api'; import { useTransactionsStore } from '@entities/kosmos/model'; +import { useWalletStore } from '@entities/wallet'; +import type { TxType } from '@entities/kosmos'; const VERSIONS = ['v1', 'v2']; diff --git a/src/entities/lists/lib/hooks/use-fetch-lists.ts b/src/entities/lists/lib/hooks/use-fetch-lists.ts index b70d89fdb..1c2034fd5 100644 --- a/src/entities/lists/lib/hooks/use-fetch-lists.ts +++ b/src/entities/lists/lib/hooks/use-fetch-lists.ts @@ -1,11 +1,11 @@ import { useCallback, useEffect, useMemo, useRef } from 'react'; +import { CacheableAccountList } from '@appTypes'; +import { MULTISIG_VAULT } from '@constants/variables'; +import { PublicAddressDbModel, PublicAddressListDB } from '@database'; import { useAddressesStore } from '@entities/addresses'; import { useListsStore } from '@entities/lists'; -import { PublicAddressDbModel, PublicAddressListDB } from '@database'; import { Cache, CacheKey } from '@lib/cache'; -import { MULTISIG_VAULT } from '@constants/variables'; import { ExplorerAccount } from '@models'; -import { CacheableAccountList } from '@appTypes'; type CreateListActions = (payload: string) => Promise; diff --git a/src/entities/lists/lib/hooks/use-lists-selector.ts b/src/entities/lists/lib/hooks/use-lists-selector.ts index 12959d6b7..5d67324ff 100644 --- a/src/entities/lists/lib/hooks/use-lists-selector.ts +++ b/src/entities/lists/lib/hooks/use-lists-selector.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react'; -import { AccountList } from '@models'; -import { useListsStore } from '@entities/lists/model/lists.store'; import { useAddressesStore } from '@entities/addresses'; +import { useListsStore } from '@entities/lists/model/lists.store'; +import { AccountList } from '@models'; export function useListsSelector() { const { listsOfAddressGroup } = useListsStore(); diff --git a/src/entities/wallet/lib/use-wallet-private-key.tsx b/src/entities/wallet/lib/use-wallet-private-key.tsx index 7e8415843..c9bb270eb 100644 --- a/src/entities/wallet/lib/use-wallet-private-key.tsx +++ b/src/entities/wallet/lib/use-wallet-private-key.tsx @@ -1,6 +1,6 @@ import { useCallback } from 'react'; -import { useWalletStore } from '../model/wallet-store'; import { Cache, CacheKey } from '@lib/cache'; +import { useWalletStore } from '../model/wallet-store'; export function useWalletPrivateKey() { const { wallet } = useWalletStore(); diff --git a/src/entities/wallet/utils/tokens-or-nft-mapper.ts b/src/entities/wallet/utils/tokens-or-nft-mapper.ts index bb10d0deb..ab67aa25f 100644 --- a/src/entities/wallet/utils/tokens-or-nft-mapper.ts +++ b/src/entities/wallet/utils/tokens-or-nft-mapper.ts @@ -1,5 +1,5 @@ -import { Token } from '@models'; import { CryptoCurrencyCode } from '@appTypes'; +import { Token } from '@models'; export const _tokensOrNftMapper = (_tokens: Token[]) => { const tokens = _tokens.filter( diff --git a/src/features/addresses/lib/hooks/use-addresses-actions.ts b/src/features/addresses/lib/hooks/use-addresses-actions.ts index d357612cc..b2114b048 100644 --- a/src/features/addresses/lib/hooks/use-addresses-actions.ts +++ b/src/features/addresses/lib/hooks/use-addresses-actions.ts @@ -1,8 +1,8 @@ import { useCallback } from 'react'; -import { useAddressesStore } from '@entities/addresses'; import _ from 'lodash'; -import { ExplorerAccount } from '@models'; import { PublicAddressDB } from '@database'; +import { useAddressesStore } from '@entities/addresses'; +import { ExplorerAccount } from '@models'; type DispatchActionKeys = 'add' | 'remove' | 'update' | 'add-or-update' | 'set'; type DispatcherArgs = { diff --git a/src/features/addresses/lib/hooks/use-list-notifications.ts b/src/features/addresses/lib/hooks/use-list-notifications.ts index ff33559c4..f5ca42555 100644 --- a/src/features/addresses/lib/hooks/use-list-notifications.ts +++ b/src/features/addresses/lib/hooks/use-list-notifications.ts @@ -1,12 +1,12 @@ import { useEffect } from 'react'; -import { useAddressesStore } from '@entities/addresses'; -import { useAddressesActions } from '@features/addresses'; import { AirDAOEventType, AirDAONotificationReceiveEventPayload } from '@appTypes'; -import { AddressUtils } from '@utils'; +import { useAddressesStore } from '@entities/addresses'; +import { useAddressesActions } from '@features/addresses'; import { AirDAOEventDispatcher } from '@lib'; +import { AddressUtils } from '@utils'; export function useListNotifications() { const { allAddresses } = useAddressesStore(); diff --git a/src/features/bridge/constants/index.ts b/src/features/bridge/constants/index.ts index 5407f1827..88dbaaf73 100644 --- a/src/features/bridge/constants/index.ts +++ b/src/features/bridge/constants/index.ts @@ -1,6 +1,6 @@ -import { Token } from '@lib/bridgeSDK/models/types'; -import { CryptoCurrencyCode } from '@appTypes'; import { BigNumber } from 'ethers'; +import { CryptoCurrencyCode } from '@appTypes'; +import { Token } from '@lib/bridgeSDK/models/types'; export const DEFAULT_AMB_NETWORK = { side: '0x0000000000', diff --git a/src/features/bridge/context/Bridge.Context.tsx b/src/features/bridge/context/Bridge.Context.tsx index 54e174c4e..d8ae652d0 100644 --- a/src/features/bridge/context/Bridge.Context.tsx +++ b/src/features/bridge/context/Bridge.Context.tsx @@ -1,12 +1,10 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { createContextSelector } from '@utils'; -import { - BridgeDataState, - Config as BridgeConfigModel, - FeeData, - Token -} from '@lib/bridgeSDK/models/types'; -import { getBridgePairs } from '@lib'; +import { formatUnits } from 'ethers/lib/utils'; +import { useTranslation } from 'react-i18next'; +import { CryptoCurrencyCode } from '@appTypes'; +import { Toast, ToastType } from '@components/modular'; +import Config from '@constants/config'; +import { useWalletStore } from '@entities/wallet'; import { BRIDGE_ERROR_CODES, DEFAULT_AMB_NETWORK, @@ -16,26 +14,28 @@ import { EMPTY_FEE_DATA, METHODS_FROM_ERRORS } from '@features/bridge/constants'; -import { getBridgeConfig } from '../utils'; import { parsedBridges } from '@features/bridge/utils/parseBridges'; -import { - BridgeSelectorTypes, - ParsedBridge, - PreviewDataWithFeeModel -} from '@models/Bridge'; -import { CryptoCurrencyCode } from '@appTypes'; -import Config from '@constants/config'; -import { formatUnits } from 'ethers/lib/utils'; +import { getBridgePairs } from '@lib'; import { bridgeWithdraw } from '@lib/bridgeSDK/bridgeFunctions/calculateGazFee'; -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import { useTranslation } from 'react-i18next'; -import { Toast, ToastType } from '@components/modular'; -import { useWalletStore } from '@entities/wallet'; +import { + BridgeDataState, + Config as BridgeConfigModel, + FeeData, + Token +} from '@lib/bridgeSDK/models/types'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { + BridgeSelectorTypes, + ParsedBridge, + PreviewDataWithFeeModel +} from '@models/Bridge'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; +import { createContextSelector } from '@utils'; +import { getBridgeConfig } from '../utils'; export const BridgeContext = () => { const { t } = useTranslation(); diff --git a/src/features/bridge/hooks/bridge/services/parseBridgeData.ts b/src/features/bridge/hooks/bridge/services/parseBridgeData.ts index fc1ebb977..adeb82dd3 100644 --- a/src/features/bridge/hooks/bridge/services/parseBridgeData.ts +++ b/src/features/bridge/hooks/bridge/services/parseBridgeData.ts @@ -1,11 +1,11 @@ +import { Dispatch, SetStateAction } from 'react'; +import { CryptoCurrencyCode } from '@appTypes'; import { BridgePairsModel, NetworksNames, RenderTokenItem } from '@models/Bridge'; import { DEFAULT_TOKEN_PAIRS } from '../../../constants'; -import { CryptoCurrencyCode } from '@appTypes'; -import { Dispatch, SetStateAction } from 'react'; export const parseNetworkParams = ( pair: BridgePairsModel, diff --git a/src/features/bridge/hooks/usePendingTransactions.ts b/src/features/bridge/hooks/usePendingTransactions.ts index 9dc2b1327..3c179bf8e 100644 --- a/src/features/bridge/hooks/usePendingTransactions.ts +++ b/src/features/bridge/hooks/usePendingTransactions.ts @@ -1,5 +1,5 @@ -import { useBridgeHistory } from '@hooks/query/useBridgeHistory'; import { useMemo } from 'react'; +import { useBridgeHistory } from '@hooks/query/useBridgeHistory'; export const usePendingTransactions = () => { const { data: transactions } = useBridgeHistory(); diff --git a/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx b/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx index ddcbc0711..24a10c55e 100644 --- a/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeNetworkSelector/index.tsx @@ -1,15 +1,15 @@ import React, { forwardRef } from 'react'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { FlatList, TouchableOpacity } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { CloseCircleIcon } from '@components/svg/icons/v2'; +import { BridgeSelectorItem } from '@components/templates/BridgeSelectorItem'; import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; import { useBridgeContextData } from '@features/bridge/context'; -import { FlatList, TouchableOpacity } from 'react-native'; -import { BridgeSelectorItem } from '@components/templates/BridgeSelectorItem'; -import { styles } from './styles'; -import { CloseCircleIcon } from '@components/svg/icons/v2'; import { BridgeSelectorTypes } from '@models/Bridge'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; interface BottomSheetChoseNetworksProps { onPressItem: (item: any) => void; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx index 12bdbc733..ec7923752 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/BottomSheetBridgePreview.tsx @@ -1,14 +1,14 @@ import React, { forwardRef, RefObject, useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; +import { TouchableOpacity, View } from 'react-native'; import { BigNumber } from 'ethers'; +import { useTranslation } from 'react-i18next'; +import { Row, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; import { CloseCircleIcon } from '@components/svg/icons/v2'; -import { Row, Spacer, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; import { useBridgeContextData } from '@features/bridge/context'; import { amountCheckers } from '@features/bridge/templates/BottomSheetBridgePreview/helpers/amountChecker'; import { scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; -import { TouchableOpacity, View } from 'react-native'; import { GeneralPreviewTemplate } from './components'; interface BottomSheetChoseNetworksProps { diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx index b3f08c2dc..ac893897c 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/GeneralPreviewTemplate/GeneralPreviewTemplate.tsx @@ -1,18 +1,18 @@ import React, { useEffect } from 'react'; import { TouchableOpacity } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { BridgeTransactionPendingTemplate } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components'; -import { useBridgeTransactionStatus } from '@features/bridge/hooks/useBridgeTransactionStatus'; -import { useBridgeContextData } from '@features/bridge/context'; -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { Row, Spacer, Spinner, Text } from '@components/base'; +import { BottomSheetSuccessView } from '@components/base/BottomSheetStatusView'; +import { PrimaryButton } from '@components/modular'; +import { CloseCircleIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; +import { useBridgeContextData } from '@features/bridge/context'; +import { useBridgeTransactionStatus } from '@features/bridge/hooks/useBridgeTransactionStatus'; +import { BridgeTransactionPendingTemplate } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components'; +import { BridgeNetworksSelected } from '@features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { NumberUtils, scale } from '@utils'; -import { CloseCircleIcon } from '@components/svg/icons/v2'; -import { PrimaryButton } from '@components/modular'; import { PreviewDataTemplate } from '../PreviewDataTemplate/PreviewDataTemplate'; -import { BottomSheetSuccessView } from '@components/base/BottomSheetStatusView'; -import { BridgeNetworksSelected } from '@features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected'; interface GeneralPreviewDataModel { loader: boolean; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/Loader/Loader.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/Loader/Loader.tsx index 4e28d1031..86044e8fb 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/Loader/Loader.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/Loader/Loader.tsx @@ -1,6 +1,6 @@ -import { Spacer, Spinner } from '@components/base'; import React from 'react'; import { View } from 'react-native'; +import { Spacer, Spinner } from '@components/base'; export const Loader = () => ( diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx index 703b79815..5e9bb2a8b 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/PreviewDataTemplate.tsx @@ -1,14 +1,14 @@ import React, { useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; import { FlatList, View } from 'react-native'; -import { verticalScale } from '@utils'; +import { useTranslation } from 'react-i18next'; import { Spacer } from '@components/base'; -import { BridgeNetworksSelected } from '@features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected'; -import { PreviewDataItem } from '@features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem'; -import { PrimaryButton } from '@components/modular'; -import { useBridgeContextData } from '@features/bridge/context'; import { TextOrSpinner } from '@components/composite'; +import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { useBridgeContextData } from '@features/bridge/context'; +import { PreviewDataItem } from '@features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem'; +import { BridgeNetworksSelected } from '@features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected'; +import { verticalScale } from '@utils'; interface PreviewDataTemplateModel { errorBalance: boolean; diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx index ca6dc0292..4c7790482 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx +++ b/src/features/bridge/templates/BottomSheetBridgePreview/components/PreviewDataTemplate/components/PreviewDataItem.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { View } from 'react-native'; +import { formatUnits } from 'ethers/lib/utils'; import { Row, Spacer, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; import { DataToPreviewModel } from '@models/Bridge'; import { NumberUtils, scale } from '@utils'; -import { formatUnits } from 'ethers/lib/utils'; interface PreviewDataItemProps { item: { diff --git a/src/features/bridge/templates/BottomSheetBridgePreview/helpers/amountChecker.ts b/src/features/bridge/templates/BottomSheetBridgePreview/helpers/amountChecker.ts index 334b45044..987771d24 100644 --- a/src/features/bridge/templates/BottomSheetBridgePreview/helpers/amountChecker.ts +++ b/src/features/bridge/templates/BottomSheetBridgePreview/helpers/amountChecker.ts @@ -1,6 +1,6 @@ import { BigNumber, BigNumberish } from 'ethers'; -import { Token } from '@lib/bridgeSDK/models/types'; import { parseUnits } from 'ethers/lib/utils'; +import { Token } from '@lib/bridgeSDK/models/types'; const isAmountGraterThenBalance = ({ balance, diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx index 8fdcaff53..a5236eceb 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory.tsx @@ -1,14 +1,14 @@ import React, { forwardRef, useCallback, useMemo, useState } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { Row, Spacer, Text } from '@components/base'; import { useTranslation } from 'react-i18next'; -import { COLORS } from '@constants/colors'; +import { CryptoCurrencyCode } from '@appTypes'; +import { Row, Spacer, Text } from '@components/base'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { TokenLogo } from '@components/modular'; -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; +import { COLORS } from '@constants/colors'; +import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; import { useUSDPrice } from '@hooks'; -import { CryptoCurrencyCode } from '@appTypes'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { NETWORK, timestamp, @@ -16,7 +16,7 @@ import { NumberUtils, StringUtils } from '@utils'; -import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; +import { styles } from './styles'; type RowRightItemType = 'default' | 'status' | 'token' | 'amount'; diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts index f698845f8..1147c3235 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionHistory/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx index 5d833991a..64aa76ecc 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/BottomSheetBridgeTransactionPendingHistory.tsx @@ -1,13 +1,13 @@ import React, { forwardRef } from 'react'; +import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Spacer, Text } from '@components/base'; -import { scale, verticalScale } from '@utils'; -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import { COLORS } from '@constants/colors'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { BridgeTransactionPendingTemplate } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components'; -import { View } from 'react-native'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; +import { scale, verticalScale } from '@utils'; interface BottomSheetBridgeTransactionPendingHistoryProps { transaction: BridgeTransactionHistoryDTO; diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx index f3607adb3..1a128445a 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/BridgeTransactionPendingTemplate.tsx @@ -1,13 +1,13 @@ import React, { useCallback } from 'react'; -import { useTranslation } from 'react-i18next'; import { View } from 'react-native'; -import { styles } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { styles } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles'; import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; -import { RowStageSection } from '../RowStageSection/RowStageSection'; -import { scale } from '@utils'; import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; +import { scale } from '@utils'; +import { RowStageSection } from '../RowStageSection/RowStageSection'; interface BridgeTransactionPendingTemplateModel { transaction: BridgeTransactionHistoryDTO; diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/RowStageSection/RowStageSection.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/RowStageSection/RowStageSection.tsx index accef60bf..85f0afa53 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/RowStageSection/RowStageSection.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/RowStageSection/RowStageSection.tsx @@ -1,9 +1,9 @@ import React, { ReactNode } from 'react'; import { View } from 'react-native'; -import { styles } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles'; +import { useTranslation } from 'react-i18next'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { useTranslation } from 'react-i18next'; +import { styles } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/BridgeTransactionPendingTemplate/styles'; export const RowStageSection = ({ children, diff --git a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/TransactionLoader/TransactionLoader.tsx b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/TransactionLoader/TransactionLoader.tsx index 7c8a1c9d4..f09caab3f 100644 --- a/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/TransactionLoader/TransactionLoader.tsx +++ b/src/features/bridge/templates/BottomSheetBridgeTransactionPendingHistory/components/TransactionLoader/TransactionLoader.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import { View } from 'react-native'; import { Spinner } from '@components/base'; -import React from 'react'; export const TransactionLoader = () => ( { const { wallet: selectedWallet } = useWalletStore(); diff --git a/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx b/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx index 1fe9d8e90..e5e004a0e 100644 --- a/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx +++ b/src/features/bridge/templates/BridgeForm/components/TokenSelectData/TokenSelectData.tsx @@ -1,15 +1,15 @@ import React, { forwardRef } from 'react'; -import { formatUnits } from 'ethers/lib/utils'; import { FlatList, View } from 'react-native'; -import { COLORS } from '@constants/colors'; -import { scale, NumberUtils } from '@utils'; +import { formatUnits } from 'ethers/lib/utils'; import { Text } from '@components/base'; import { BottomSheetRef } from '@components/composite'; import { BridgeSelectorItem } from '@components/templates/BridgeSelectorItem'; +import { COLORS } from '@constants/colors'; +import { DECIMAL_LIMIT } from '@constants/variables'; import { useBridgeContextData } from '@features/bridge/context'; -import { RenderTokenItem } from '@models/Bridge'; import { Token } from '@lib/bridgeSDK/models/types'; -import { DECIMAL_LIMIT } from '@constants/variables'; +import { RenderTokenItem } from '@models/Bridge'; +import { scale, NumberUtils } from '@utils'; import { styles } from './styles'; interface BottomSheetChoseNetworksProps { diff --git a/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx b/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx index 8d4fd49f4..fa926f115 100644 --- a/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx +++ b/src/features/bridge/templates/BridgeHistory/BridgeHistory.Transactions.tsx @@ -5,18 +5,18 @@ import { SectionList, SectionListData } from 'react-native'; -import { useTranslation } from 'react-i18next'; import moment from 'moment/moment'; -import { styles } from './styles'; -import { LocalizedRenderEmpty } from '@components/templates'; +import { useTranslation } from 'react-i18next'; import { Spacer, Text } from '@components/base'; import { CenteredSpinner } from '@components/composite'; -import { useBridgeHistory } from '@hooks/query/useBridgeHistory'; -import { verticalScale } from '@utils'; +import { LocalizedRenderEmpty } from '@components/templates'; import { COLORS } from '@constants/colors'; -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import { parseBridgeTransaction } from '@lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction'; import { BridgeTransaction } from '@features/bridge/templates/BridgeTransaction'; +import { useBridgeHistory } from '@hooks/query/useBridgeHistory'; +import { parseBridgeTransaction } from '@lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; interface TransactionSection { title: string; diff --git a/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetwork.Selectors.tsx b/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetwork.Selectors.tsx index fe70a296a..dbf0f6a34 100644 --- a/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetwork.Selectors.tsx +++ b/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetwork.Selectors.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Row } from '@components/base'; -import { BridgeNetworkPicker } from './BridgeNetworkPicker/BridgeNetwork.Picker'; import { RightArrowInCircle } from '@components/svg/icons'; +import { BridgeNetworkPicker } from './BridgeNetworkPicker/BridgeNetwork.Picker'; export const BridgeNetworkSelectors = () => { return ( diff --git a/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx b/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx index e201d3b2d..d2e88574c 100644 --- a/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx +++ b/src/features/bridge/templates/BridgeNetworkSelectors/BridgeNetworkPicker/BridgeNetwork.Picker.tsx @@ -1,16 +1,16 @@ import React, { useRef } from 'react'; import { View } from 'react-native'; -import { styles } from '../../BridgeNetworkSelectors/styles'; -import { BridgeNetworkPickerProps, ParsedBridge } from '@models/Bridge'; -import { BottomSheetRef } from '@components/composite'; -import { BottomSheetBridgeNetworkSelector } from '@features/bridge/templates/BottomSheetBridgeNetworkSelector'; +import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; import { TokenLogo } from '@components/modular'; -import { useBridgeContextData } from '@features/bridge/context'; import { ChevronDownIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; +import { useBridgeContextData } from '@features/bridge/context'; +import { BottomSheetBridgeNetworkSelector } from '@features/bridge/templates/BottomSheetBridgeNetworkSelector'; +import { BridgeNetworkPickerProps, ParsedBridge } from '@models/Bridge'; import { scale } from '@utils'; -import { useTranslation } from 'react-i18next'; +import { styles } from '../../BridgeNetworkSelectors/styles'; export const BridgeNetworkPicker = ({ type }: BridgeNetworkPickerProps) => { const isFrom = type === 'from'; diff --git a/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts b/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts index 08a72e121..cddd2b371 100644 --- a/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts +++ b/src/features/bridge/templates/BridgeNetworkSelectors/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx b/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx index a686c4dbc..514d38a41 100644 --- a/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx +++ b/src/features/bridge/templates/BridgeNetworksSelected/BridgeNetworksSelected.tsx @@ -1,11 +1,11 @@ import React, { useMemo } from 'react'; -import { styles } from './styles'; +import { View } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; -import { NETWORK, SHORTEN_NETWORK } from '@utils'; import { RightArrowIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { View } from 'react-native'; +import { NETWORK, SHORTEN_NETWORK } from '@utils'; +import { styles } from './styles'; interface BridgeNetworksSelectedProps { size?: 'small' | 'large'; diff --git a/src/features/bridge/templates/BridgeNetworksSelected/styles.ts b/src/features/bridge/templates/BridgeNetworksSelected/styles.ts index 8fe2e6f3b..ee3888265 100644 --- a/src/features/bridge/templates/BridgeNetworksSelected/styles.ts +++ b/src/features/bridge/templates/BridgeNetworksSelected/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ previewWrapper: { diff --git a/src/features/bridge/templates/BridgeTemplate.tsx b/src/features/bridge/templates/BridgeTemplate.tsx index abb860b09..d991ca1bc 100644 --- a/src/features/bridge/templates/BridgeTemplate.tsx +++ b/src/features/bridge/templates/BridgeTemplate.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; -import { BridgeNetworkSelectors } from './BridgeNetworkSelectors/BridgeNetwork.Selectors'; import { Spacer } from '@components/base'; -import { scale } from '@utils'; import { BridgeForm } from '@features/bridge/templates/BridgeForm/BridgeForm'; +import { scale } from '@utils'; +import { BridgeNetworkSelectors } from './BridgeNetworkSelectors/BridgeNetwork.Selectors'; +import { styles } from './styles'; export const BridgeTemplate = () => { return ( diff --git a/src/features/bridge/templates/BridgeTransaction/components/Status/Status.tsx b/src/features/bridge/templates/BridgeTransaction/components/Status/Status.tsx index dc3a98464..07b272bf8 100644 --- a/src/features/bridge/templates/BridgeTransaction/components/Status/Status.tsx +++ b/src/features/bridge/templates/BridgeTransaction/components/Status/Status.tsx @@ -1,5 +1,7 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; +import { useTranslation } from 'react-i18next'; +import { Text } from '@components//base'; import { claimPendingStyle, confirmationStyles, @@ -9,8 +11,6 @@ import { styles, successStyle } from './Status.styles'; -import { useTranslation } from 'react-i18next'; -import { Text } from '@components//base'; interface StatusProps { status: string; diff --git a/src/features/bridge/templates/BridgeTransaction/index.tsx b/src/features/bridge/templates/BridgeTransaction/index.tsx index 41c73e4a9..555a1d541 100644 --- a/src/features/bridge/templates/BridgeTransaction/index.tsx +++ b/src/features/bridge/templates/BridgeTransaction/index.tsx @@ -1,7 +1,15 @@ import React, { useMemo, useRef } from 'react'; import { View } from 'react-native'; -import { styles } from './BridgeTransaction.style'; +import { useTranslation } from 'react-i18next'; +import { Button, Row, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; import { TokenLogo } from '@components/modular'; +import { COLORS } from '@constants/colors'; +import { DECIMAL_LIMIT } from '@constants/variables'; +import { useBridgeTransactionStatus } from '@features/bridge/hooks/useBridgeTransactionStatus'; +import { BottomSheetBridgeTransactionHistory } from '@features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory'; +import { BottomSheetBridgeTransactionPendingHistory } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { NumberUtils, scale, @@ -9,15 +17,7 @@ import { tokenThumb, transactionFrom } from '@utils'; -import { BottomSheetRef } from '@components/composite'; -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import { Button, Row, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; -import { useBridgeTransactionStatus } from '@features/bridge/hooks/useBridgeTransactionStatus'; -import { useTranslation } from 'react-i18next'; -import { DECIMAL_LIMIT } from '@constants/variables'; -import { BottomSheetBridgeTransactionPendingHistory } from '@features/bridge/templates/BottomSheetBridgeTransactionPendingHistory'; -import { BottomSheetBridgeTransactionHistory } from '@features/bridge/templates/BottomSheetBridgeTransactionHistory/BottomSheetBridgeTransactionHistory'; +import { styles } from './BridgeTransaction.style'; interface BridgeTransactionModel { transaction: BridgeTransactionHistoryDTO; diff --git a/src/features/bridge/utils/parseBridges.ts b/src/features/bridge/utils/parseBridges.ts index 48927dcc8..fb5f5be35 100644 --- a/src/features/bridge/utils/parseBridges.ts +++ b/src/features/bridge/utils/parseBridges.ts @@ -1,9 +1,9 @@ -import { getNetworkNames } from './getNetworkName'; import { DEFAULT_AMB_NETWORK, DEFAULT_ETH_NETWORK } from '@features/bridge/constants'; import { Config } from '@lib/bridgeSDK/models/types'; +import { getNetworkNames } from './getNetworkName'; export const parsedBridges = (bridgeConfig: Config) => { const bridges = Object.keys(bridgeConfig?.bridges || []).map((item) => { diff --git a/src/features/explorer/utils/tx-status.tsx b/src/features/explorer/utils/tx-status.tsx index f0a795580..2d1f03579 100644 --- a/src/features/explorer/utils/tx-status.tsx +++ b/src/features/explorer/utils/tx-status.tsx @@ -6,8 +6,8 @@ import { ContractCallIcon, FailedIcon } from '@components/svg/icons/v2/transactions'; -import { Transaction } from '@models'; import { COLORS } from '@constants/colors'; +import { Transaction } from '@models'; export const _txStatusLabel = (tx: Transaction) => { const { type, status } = tx; diff --git a/src/features/harbor/components/base/preview-modules/error-template/index.tsx b/src/features/harbor/components/base/preview-modules/error-template/index.tsx index b01a72462..497f3d3ea 100644 --- a/src/features/harbor/components/base/preview-modules/error-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/error-template/index.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { ErrorIcon } from '@components/svg/icons/v2/harbor'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; +import { styles } from './styles'; interface PreviewFormModel { onClose: () => void; diff --git a/src/features/harbor/components/base/preview-modules/error-template/styles.ts b/src/features/harbor/components/base/preview-modules/error-template/styles.ts index da8716f70..bef1dbcb3 100644 --- a/src/features/harbor/components/base/preview-modules/error-template/styles.ts +++ b/src/features/harbor/components/base/preview-modules/error-template/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/features/harbor/components/base/preview-modules/form-template/index.tsx b/src/features/harbor/components/base/preview-modules/form-template/index.tsx index 6067ac3b5..03221c42a 100644 --- a/src/features/harbor/components/base/preview-modules/form-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/form-template/index.tsx @@ -1,16 +1,16 @@ import * as React from 'react'; import { FlatList, ListRenderItemInfo, View } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { Row, Spacer, Text } from '@components/base'; +import { TextOrSpinner } from '@components/composite'; +import { PrimaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { FormTemplateProps, HarborPreViewData } from '@features/harbor/components/harbor-preview/model'; -import { styles } from './styles'; -import { Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { PrimaryButton } from '@components/modular'; -import { TextOrSpinner } from '@components/composite'; +import { styles } from './styles'; export const FormTemplate = ({ data, diff --git a/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx index df9ecd124..0e4b0b327 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { useTranslation } from 'react-i18next'; import { Pressable } from 'react-native'; import * as Clipboard from 'expo-clipboard'; +import { useTranslation } from 'react-i18next'; import { Row, Text } from '@components/base'; +import { Toast, ToastPosition, ToastType } from '@components/modular'; +import { contentBox } from '@components/styles'; import { GlobeIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; -import { contentBox } from '@components/styles'; -import { Toast, ToastPosition, ToastType } from '@components/modular'; import { scale, StringUtils } from '@utils'; interface CopyHashModel { diff --git a/src/features/harbor/components/base/preview-modules/success-template/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/index.tsx index be1a7b334..7ae687869 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/index.tsx @@ -1,20 +1,20 @@ import React, { useMemo } from 'react'; import { FlatList, ListRenderItemInfo, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; +import { useNavigation } from '@react-navigation/native'; import moment from 'moment'; +import { useTranslation } from 'react-i18next'; +import { HarborNavigationProp } from '@appTypes/navigation/harbor'; +import { Row, Spacer, Text } from '@components/base'; +import { PrimaryButton, SecondaryButton } from '@components/modular'; +import { SuccessIcon } from '@components/svg/icons/v2/harbor'; +import { COLORS } from '@constants/colors'; +import { SuccessTitle } from '@features/harbor/components/base/preview-modules/success-template/success-title'; import { HarborPreViewData, SuccessTemplateDataProps } from '@features/harbor/components/harbor-preview/model'; -import { Row, Spacer, Text } from '@components/base'; -import { SuccessIcon } from '@components/svg/icons/v2/harbor'; -import { SuccessTitle } from '@features/harbor/components/base/preview-modules/success-template/success-title'; -import { COLORS } from '@constants/colors'; -import { PrimaryButton, SecondaryButton } from '@components/modular'; -import { CopyHash } from './copy-hash'; import { delay, scale } from '@utils'; -import { useNavigation } from '@react-navigation/native'; -import { HarborNavigationProp } from '@appTypes/navigation/harbor'; +import { CopyHash } from './copy-hash'; import { styles } from './styes'; export const SuccessTemplate = ({ diff --git a/src/features/harbor/components/base/preview-modules/success-template/styes.tsx b/src/features/harbor/components/base/preview-modules/success-template/styes.tsx index 5da5ff2ec..f6880aa62 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/styes.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/styes.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx index cc5a6802e..3d62c656f 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/success-title/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { TextStyle, View } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { CryptoCurrencyCode } from '@appTypes'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils'; -import { COLORS } from '@constants/colors'; import { TokenLogo } from '@components/modular'; -import { CryptoCurrencyCode } from '@appTypes'; +import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; interface TitleData { name: string; diff --git a/src/features/harbor/components/base/stake-info-container/index.tsx b/src/features/harbor/components/base/stake-info-container/index.tsx index cfbccf182..19ec8a330 100644 --- a/src/features/harbor/components/base/stake-info-container/index.tsx +++ b/src/features/harbor/components/base/stake-info-container/index.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { View } from 'react-native'; -import { useTranslation } from 'react-i18next'; +import { useNavigation } from '@react-navigation/native'; import { formatEther } from 'ethers/lib/utils'; +import { useTranslation } from 'react-i18next'; +import { CryptoCurrencyCode } from '@appTypes'; +import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { PrimaryButton, TokenLogo } from '@components/modular'; -import { COLORS } from '@constants/colors'; -import { useNavigation } from '@react-navigation/native'; -import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { PlusIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; +import { HarborDataModel } from '@entities/harbor/model/types'; +import { useAMBPrice } from '@hooks'; import { NumberUtils, scale } from '@utils'; -import { CryptoCurrencyCode } from '@appTypes'; import { styles } from './styles'; -import { useAMBPrice } from '@hooks'; -import { HarborDataModel } from '@entities/harbor/model/types'; interface StakeInfoContainerProps { loading: boolean; diff --git a/src/features/harbor/components/base/stake-info-container/styles.ts b/src/features/harbor/components/base/stake-info-container/styles.ts index 222e2af93..ce2c109b7 100644 --- a/src/features/harbor/components/base/stake-info-container/styles.ts +++ b/src/features/harbor/components/base/stake-info-container/styles.ts @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; +import { contentBox } from '@components/styles'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { contentBox } from '@components/styles'; export const styles = StyleSheet.create({ main: { diff --git a/src/features/harbor/components/base/tier-item/index.tsx b/src/features/harbor/components/base/tier-item/index.tsx index 78e24a699..a8ad85c3a 100644 --- a/src/features/harbor/components/base/tier-item/index.tsx +++ b/src/features/harbor/components/base/tier-item/index.tsx @@ -2,8 +2,8 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; import { Text } from '@components/base'; import { TierRewardItem } from '@entities/harbor/model/types'; -import { styles } from './styles'; import { scale } from '@utils'; +import { styles } from './styles'; interface TierItemProps { rewardValue: TierRewardItem; diff --git a/src/features/harbor/components/base/tiers-info-container/index.tsx b/src/features/harbor/components/base/tiers-info-container/index.tsx index dbc5dc4e2..e69efc560 100644 --- a/src/features/harbor/components/base/tiers-info-container/index.tsx +++ b/src/features/harbor/components/base/tiers-info-container/index.tsx @@ -1,11 +1,11 @@ -import { View } from 'react-native'; import React, { useMemo } from 'react'; +import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { ImportantInfo } from '@components/svg/icons/v2/harbor'; -import { scale } from '@utils'; -import { COLORS } from '@constants/colors'; import { DropDownPanel } from '@components/templates'; +import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; import { styles } from './styles'; import { TierInfoItem } from '../tier-info-item'; diff --git a/src/features/harbor/components/base/tiers-selector/index.tsx b/src/features/harbor/components/base/tiers-selector/index.tsx index 89ed49d05..bc8c121a2 100644 --- a/src/features/harbor/components/base/tiers-selector/index.tsx +++ b/src/features/harbor/components/base/tiers-selector/index.tsx @@ -1,20 +1,20 @@ import React, { useEffect, useState } from 'react'; import { TouchableOpacity, View } from 'react-native'; -import Tooltip from 'react-native-walkthrough-tooltip'; import { useTranslation } from 'react-i18next'; +import Tooltip from 'react-native-walkthrough-tooltip'; import { Row, Spacer, Text } from '@components/base'; +import { CircleInfoIcon } from '@components/svg/icons/v2/harbor'; +import { COLORS } from '@constants/colors'; import { EMPTY_SELECTED_TIER, REWARD_TIERS_LIST } from '@entities/harbor/constants'; -import { TierRewardItem } from '@entities/harbor/model/types'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; -import { COLORS } from '@constants/colors'; -import { styles } from './styles'; +import { TierRewardItem } from '@entities/harbor/model/types'; import { TokenReward } from '@features/harbor/components/base/token-reward'; import { calculateClaimAmount } from '@features/harbor/hooks'; -import { CircleInfoIcon } from '@components/svg/icons/v2/harbor'; import { isAndroid, scale } from '@utils'; +import { styles } from './styles'; interface TiersContainerProps { bondAmount: string; diff --git a/src/features/harbor/components/base/tiers-selector/styles.tsx b/src/features/harbor/components/base/tiers-selector/styles.tsx index 3c5784ba6..fc91bb7dd 100644 --- a/src/features/harbor/components/base/tiers-selector/styles.tsx +++ b/src/features/harbor/components/base/tiers-selector/styles.tsx @@ -1,7 +1,7 @@ import { StyleSheet } from 'react-native'; +import { contentBox } from '@components/styles'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { contentBox } from '@components/styles'; export const styles = StyleSheet.create({ toolTipContainerStyle: { diff --git a/src/features/harbor/components/base/token-reward/index.tsx b/src/features/harbor/components/base/token-reward/index.tsx index fd6458557..2c622168d 100644 --- a/src/features/harbor/components/base/token-reward/index.tsx +++ b/src/features/harbor/components/base/token-reward/index.tsx @@ -6,9 +6,9 @@ import { RewardTokenNamesModel, TierRewardItem } from '@entities/harbor/model/types'; +import { NumberUtils } from '@utils'; import { TierItem } from '../tier-item'; import { styles } from './styles'; -import { NumberUtils } from '@utils'; interface TokenRewardProps { rewardTokenName: RewardTokenNamesModel; diff --git a/src/features/harbor/components/base/withdraw-info/index.tsx b/src/features/harbor/components/base/withdraw-info/index.tsx index 55fdc8ba5..6c2ba180c 100644 --- a/src/features/harbor/components/base/withdraw-info/index.tsx +++ b/src/features/harbor/components/base/withdraw-info/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; +import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { View } from 'react-native'; -import { scale } from '@utils'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; +import { scale } from '@utils'; import { styles } from './styles'; export const WithdrawInfo = ({}) => { diff --git a/src/features/harbor/components/harbor-preview/index.tsx b/src/features/harbor/components/harbor-preview/index.tsx index 9e24ce069..86e3f3a6e 100644 --- a/src/features/harbor/components/harbor-preview/index.tsx +++ b/src/features/harbor/components/harbor-preview/index.tsx @@ -1,26 +1,26 @@ import React, { forwardRef, useCallback, useMemo, useState } from 'react'; import { View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { useForwardedRef } from '@hooks'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Spacer } from '@components/base'; -import { isAndroid, scale } from '@utils'; -import { - BottomSheetHarborPreViewProps, - EmptyHarborProcessTransaction -} from '@features/harbor/components/harbor-preview/model'; -import { useWalletStore } from '@entities/wallet'; -import { useHarborStore } from '@entities/harbor/model/harbor-store'; -import { TransactionDTO } from '@models'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { EMPTY_HARBOR_PROCESS_TRANSACTION } from '@entities/harbor/constants'; +import { useHarborStore } from '@entities/harbor/model/harbor-store'; +import { useWalletStore } from '@entities/wallet'; import { ErrorTemplate, FormTemplate, SuccessTemplate } from '@features/harbor/components/base'; +import { + BottomSheetHarborPreViewProps, + EmptyHarborProcessTransaction +} from '@features/harbor/components/harbor-preview/model'; import { dataParseFunction, processFunctions } from '@features/harbor/hooks'; +import { useForwardedRef } from '@hooks'; +import { TransactionDTO } from '@models'; +import { isAndroid, scale } from '@utils'; +import { styles } from './styles'; export const BottomSheetHarborPreView = forwardRef< BottomSheetRef, diff --git a/src/features/harbor/components/tabs/harbor-stake-tabs/index.tsx b/src/features/harbor/components/tabs/harbor-stake-tabs/index.tsx index 4dab47fc7..41b8150a4 100644 --- a/src/features/harbor/components/tabs/harbor-stake-tabs/index.tsx +++ b/src/features/harbor/components/tabs/harbor-stake-tabs/index.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { WrappedListsContainer } from '@features/kosmos/components/base'; -import { AnimatedTabsV2 } from '@components/modular/AnimatedTabsV2'; import { TokenLogo } from '@components/modular'; +import { AnimatedTabsV2 } from '@components/modular/AnimatedTabsV2'; +import { WrappedListsContainer } from '@features/kosmos/components/base'; import { StakeAMBTab } from '../stake-amb-tab'; export const HarborStakeTabs = () => { diff --git a/src/features/harbor/components/tabs/stake-amb-tab/index.tsx b/src/features/harbor/components/tabs/stake-amb-tab/index.tsx index f7e6edb88..3734f19d4 100644 --- a/src/features/harbor/components/tabs/stake-amb-tab/index.tsx +++ b/src/features/harbor/components/tabs/stake-amb-tab/index.tsx @@ -1,14 +1,14 @@ import React, { useMemo } from 'react'; import { RefreshControl, ScrollView, View } from 'react-native'; -import { scale } from '@utils'; import { Spacer } from '@components/base'; -import { styles } from './styles'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { useWalletStore } from '@entities/wallet'; import { StakeInfoContainer, TiersInfoContainer } from '@features/harbor/components/base'; +import { scale } from '@utils'; +import { styles } from './styles'; export const StakeAMBTab = ({}) => { const { data: harborData, loading, updateAll } = useHarborStore(); diff --git a/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx b/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx index ab4477e8c..fd6f7aa15 100644 --- a/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx +++ b/src/features/harbor/components/tabs/withdraw-reward-only-tab/index.tsx @@ -1,16 +1,16 @@ import React, { useCallback, useRef, useState } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { TiersSelector } from '../../base/tiers-selector'; -import { scale } from '@utils'; -import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { Spacer, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { BottomSheetRef } from '@components/composite'; import { DEFAULT_WITHDRAW_PREVIEW } from '@entities/harbor/constants'; +import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { BottomSheetHarborPreView } from '@features/harbor/components/harbor-preview'; +import { scale } from '@utils'; import { styles } from './styles'; +import { TiersSelector } from '../../base/tiers-selector'; export const WithdrawRewardOnlyTab = () => { const { t } = useTranslation(); diff --git a/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx b/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx index 8b91d618d..65a49d7f3 100644 --- a/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx +++ b/src/features/harbor/components/tabs/withdraw-stake-reward-tab/index.tsx @@ -6,26 +6,26 @@ import React, { useState } from 'react'; import { View } from 'react-native'; +import { formatEther, parseEther } from 'ethers/lib/utils'; +import { useTranslation } from 'react-i18next'; import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import { formatEther, parseEther } from 'ethers/lib/utils'; -import { useTranslation } from 'react-i18next'; -import { scale } from '@utils'; -import { useHarborStore } from '@entities/harbor/model/harbor-store'; -import { InputWithoutTokenSelect } from '@components/templates'; import { Spacer, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; +import { InputWithoutTokenSelect } from '@components/templates'; import { COLORS } from '@constants/colors'; import { DEFAULT_WITHDRAW_PREVIEW } from '@entities/harbor/constants'; -import { BottomSheetRef } from '@components/composite'; -import { TiersSelector } from '../../base/tiers-selector'; +import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { WithdrawInfo } from '@features/harbor/components/base'; import { BottomSheetHarborPreView } from '@features/harbor/components/harbor-preview'; -import { styles } from './styles'; import { useKeyboardHeight } from '@hooks'; +import { scale } from '@utils'; +import { styles } from './styles'; +import { TiersSelector } from '../../base/tiers-selector'; export const WithdrawStakeRewardTab = () => { const bottomSheetRef = useRef(null); diff --git a/src/features/harbor/hooks/calculateClaimAmount.ts b/src/features/harbor/hooks/calculateClaimAmount.ts index 66db6cbfc..e92089d5b 100644 --- a/src/features/harbor/hooks/calculateClaimAmount.ts +++ b/src/features/harbor/hooks/calculateClaimAmount.ts @@ -1,9 +1,9 @@ import { BigNumberish } from 'ethers'; +import { formatEther } from 'ethers/lib/utils'; import { RewardTokenNamesModel, TierRewardItem } from '@entities/harbor/model/types'; -import { formatEther } from 'ethers/lib/utils'; import { NumberUtils } from '@utils'; export const calculateClaimAmount = ( diff --git a/src/features/harbor/hooks/parseDataHelpers/index.ts b/src/features/harbor/hooks/parseDataHelpers/index.ts index edf599ed9..01c282325 100644 --- a/src/features/harbor/hooks/parseDataHelpers/index.ts +++ b/src/features/harbor/hooks/parseDataHelpers/index.ts @@ -1,6 +1,6 @@ import { parseStakeData } from './parseStakeData'; -import { parseWithdrawStakePreview } from './parseWithdrawStakePreview'; import { parseWithdrawReward } from './parseWithdrawReward'; +import { parseWithdrawStakePreview } from './parseWithdrawStakePreview'; export const dataParseFunction = (type: string, data: any) => { switch (type) { diff --git a/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts b/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts index 673df4225..5a1ce5afb 100644 --- a/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts +++ b/src/features/harbor/hooks/parseDataHelpers/parseStakeData.ts @@ -1,6 +1,6 @@ +import { CryptoCurrencyCode } from '@appTypes'; import { COLORS } from '@constants/colors'; import { StakePreviewDataModel } from '@features/harbor/components/harbor-preview/model'; -import { CryptoCurrencyCode } from '@appTypes'; import { NumberUtils, StringUtils } from '@utils'; export const parseStakeData = (previewData: StakePreviewDataModel) => { diff --git a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts index bb7660074..9f93e8284 100644 --- a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts +++ b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawReward.ts @@ -1,6 +1,6 @@ -import { WithdrawPreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { CryptoCurrencyCode } from '@appTypes'; import { COLORS } from '@constants/colors'; +import { WithdrawPreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { NumberUtils } from '@utils'; export const parseWithdrawReward = (previewData: WithdrawPreviewDataModel) => { diff --git a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts index 5c80d994b..3387be272 100644 --- a/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts +++ b/src/features/harbor/hooks/parseDataHelpers/parseWithdrawStakePreview.ts @@ -1,5 +1,5 @@ -import { WithdrawPreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { CryptoCurrencyCode } from '@appTypes'; +import { WithdrawPreviewDataModel } from '@features/harbor/components/harbor-preview/model'; import { NumberUtils } from '@utils'; export const parseWithdrawStakePreview = ( diff --git a/src/features/harbor/hooks/processHelpers/processFunction.ts b/src/features/harbor/hooks/processHelpers/processFunction.ts index 3a49b54fe..2f74543bb 100644 --- a/src/features/harbor/hooks/processHelpers/processFunction.ts +++ b/src/features/harbor/hooks/processHelpers/processFunction.ts @@ -1,8 +1,8 @@ +import { IsNullableAccount } from '@entities/wallet/model/types'; import { HarborPreView, ModalTypes } from '@features/harbor/components/harbor-preview/model'; -import { IsNullableAccount } from '@entities/wallet/model/types'; import { processStake } from './processStake'; import { processWithdraw } from './processWithdraw'; import { processWithdrawReward } from './processWithdrawReward'; diff --git a/src/features/harbor/hooks/processHelpers/resultHandler.ts b/src/features/harbor/hooks/processHelpers/resultHandler.ts index fbb679033..d132a7d44 100644 --- a/src/features/harbor/hooks/processHelpers/resultHandler.ts +++ b/src/features/harbor/hooks/processHelpers/resultHandler.ts @@ -1,5 +1,5 @@ -import { delay } from '@utils'; import { explorerService } from '@api/explorer-service'; +import { delay } from '@utils'; export const resultHandler = async (result: any) => { if (result?.error || !result?.transactionHash) { diff --git a/src/features/kosmos/components/base/chart-interval-item/index.tsx b/src/features/kosmos/components/base/chart-interval-item/index.tsx index 154b7c837..733e68fa9 100644 --- a/src/features/kosmos/components/base/chart-interval-item/index.tsx +++ b/src/features/kosmos/components/base/chart-interval-item/index.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; import { StyleProp, TouchableOpacity, ViewStyle } from 'react-native'; -import { scale } from '@utils'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; interface ChartIntervalItemProps { interval: { label: string; value: number }; diff --git a/src/features/kosmos/components/base/filters-item/index.tsx b/src/features/kosmos/components/base/filters-item/index.tsx index 513de3862..e26e4a93d 100644 --- a/src/features/kosmos/components/base/filters-item/index.tsx +++ b/src/features/kosmos/components/base/filters-item/index.tsx @@ -1,10 +1,10 @@ import React, { Dispatch, SetStateAction, useMemo } from 'react'; import { StyleProp, ViewStyle, TouchableOpacity } from 'react-native'; import { upperFirst } from 'lodash'; -import { styles } from './styles'; import { Text } from '@components/base'; -import { FiltersState } from '@features/kosmos/types'; import { COLORS } from '@constants/colors'; +import { FiltersState } from '@features/kosmos/types'; +import { styles } from './styles'; interface FiltersItemProps { stateKey: keyof FiltersState; diff --git a/src/features/kosmos/components/base/list-cell-headings/index.tsx b/src/features/kosmos/components/base/list-cell-headings/index.tsx index 81495d625..b02f337de 100644 --- a/src/features/kosmos/components/base/list-cell-headings/index.tsx +++ b/src/features/kosmos/components/base/list-cell-headings/index.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { StyleProp, ViewStyle } from 'react-native'; -import { useTranslation } from 'react-i18next'; import capitalize from 'lodash/capitalize'; +import { useTranslation } from 'react-i18next'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; diff --git a/src/features/kosmos/components/base/market-list-item/index.tsx b/src/features/kosmos/components/base/market-list-item/index.tsx index 6c41cc601..e70af0a0a 100644 --- a/src/features/kosmos/components/base/market-list-item/index.tsx +++ b/src/features/kosmos/components/base/market-list-item/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { TokenLogo } from '@components/modular'; -import { NumberUtils } from '@utils'; +import { COLORS } from '@constants/colors'; import { MarketType, useToken } from '@entities/kosmos'; import { $discount, discountColor } from '@features/kosmos/utils'; +import { NumberUtils } from '@utils'; +import { styles } from './styles'; interface MarketListItemProps { market: MarketType; diff --git a/src/features/kosmos/components/base/order-card-details/index.tsx b/src/features/kosmos/components/base/order-card-details/index.tsx index c8f72dec6..c696c31b2 100644 --- a/src/features/kosmos/components/base/order-card-details/index.tsx +++ b/src/features/kosmos/components/base/order-card-details/index.tsx @@ -2,14 +2,14 @@ import React, { useCallback, useMemo, useRef } from 'react'; import { Pressable, View } from 'react-native'; import { BigNumber, ethers } from 'ethers'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; import { TokenLogo } from '@components/modular'; -import { $discount, formatDecimals } from '@features/kosmos/utils'; import { COLORS } from '@constants/colors'; -import { BottomSheetReviewOrder } from '@features/kosmos/components/templates/bottom-sheet-review-order'; -import { BottomSheetRef } from '@components/composite'; import { $token, TxType, useTokensStore } from '@entities/kosmos'; +import { BottomSheetReviewOrder } from '@features/kosmos/components/templates/bottom-sheet-review-order'; +import { $discount, formatDecimals } from '@features/kosmos/utils'; +import { styles } from './styles'; interface OrderCardDetailsProps { transaction: TxType; diff --git a/src/features/kosmos/components/base/screen-loader/index.tsx b/src/features/kosmos/components/base/screen-loader/index.tsx index 9797cce40..0d69f520e 100644 --- a/src/features/kosmos/components/base/screen-loader/index.tsx +++ b/src/features/kosmos/components/base/screen-loader/index.tsx @@ -1,6 +1,6 @@ -import { Spinner } from '@components/base'; import React, { useMemo } from 'react'; import { DimensionValue, StyleProp, View, ViewStyle } from 'react-native'; +import { Spinner } from '@components/base'; interface ScreenLoaderProps { readonly height?: DimensionValue; diff --git a/src/features/kosmos/components/base/transaction-history-item/index.tsx b/src/features/kosmos/components/base/transaction-history-item/index.tsx index e675b679c..f6ad1e90f 100644 --- a/src/features/kosmos/components/base/transaction-history-item/index.tsx +++ b/src/features/kosmos/components/base/transaction-history-item/index.tsx @@ -1,16 +1,16 @@ import React, { useMemo } from 'react'; +import { BigNumber, ethers } from 'ethers'; import { Row, Spacer, Text } from '@components/base'; -import { styles } from './styles'; import { TokenLogo } from '@components/modular'; -import { formatDecimals } from '@features/kosmos/utils'; import { COLORS } from '@constants/colors'; -import { BigNumber, ethers } from 'ethers'; import { timestampToFormattedDate, Token, TxType, useTokensStore } from '@entities/kosmos'; +import { formatDecimals } from '@features/kosmos/utils'; +import { styles } from './styles'; type NotRequiredToken = Token | undefined; diff --git a/src/features/kosmos/components/base/transaction-history-item/styles.ts b/src/features/kosmos/components/base/transaction-history-item/styles.ts index f32570e95..c5c52aa2e 100644 --- a/src/features/kosmos/components/base/transaction-history-item/styles.ts +++ b/src/features/kosmos/components/base/transaction-history-item/styles.ts @@ -1,5 +1,5 @@ -import { verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ row: { alignSelf: 'flex-start', marginBottom: verticalScale(24) } diff --git a/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx b/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx index 7aa1f8f2b..24fef31da 100644 --- a/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx +++ b/src/features/kosmos/components/composite/buy-bond-input-with-error/index.tsx @@ -1,14 +1,14 @@ import React, { LegacyRef, useCallback, useMemo, useState } from 'react'; import { LayoutChangeEvent, View } from 'react-native'; -import { styles } from './styles'; -import { InputWithIcon } from '@components/composite'; import { InputRef, Spacer, Text } from '@components/base'; +import { InputWithIcon } from '@components/composite'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { MarketType, Token } from '@entities/kosmos'; +import { usePurchaseStore } from '@features/kosmos'; import { useTransactionErrorHandler } from '@features/kosmos/lib/hooks'; import { StringUtils, NumberUtils, verticalScale } from '@utils'; -import { usePurchaseStore } from '@features/kosmos'; -import { MarketType, Token } from '@entities/kosmos'; +import { styles } from './styles'; interface BuyBondInputWithErrorProps { onFocus: () => void; diff --git a/src/features/kosmos/components/composite/chart-time-intervals/index.tsx b/src/features/kosmos/components/composite/chart-time-intervals/index.tsx index 55d924f3c..a728fa534 100644 --- a/src/features/kosmos/components/composite/chart-time-intervals/index.tsx +++ b/src/features/kosmos/components/composite/chart-time-intervals/index.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; -import { styles } from './styles'; import { Row } from '@components/base'; -import { ChartIntervalItem } from '@features/kosmos/components/base'; import { CHART_INTERVALS } from '@entities/kosmos'; +import { ChartIntervalItem } from '@features/kosmos/components/base'; +import { styles } from './styles'; interface ChartTimeIntervalsProps { onChangeInterval: (interval: number) => void; diff --git a/src/features/kosmos/components/composite/chart-tooltip/index.tsx b/src/features/kosmos/components/composite/chart-tooltip/index.tsx index 87f580b8e..9a4cd44aa 100644 --- a/src/features/kosmos/components/composite/chart-tooltip/index.tsx +++ b/src/features/kosmos/components/composite/chart-tooltip/index.tsx @@ -2,12 +2,9 @@ import React, { useMemo } from 'react'; import { Platform, View } from 'react-native'; import moment from 'moment'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { DEVICE_HEIGHT, DEVICE_WIDTH } from '@constants/variables'; -import { TooltipState } from '../../modular/market-chart/types'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { ChartStrokedArrow } from '../../base'; +import { DEVICE_HEIGHT, DEVICE_WIDTH } from '@constants/variables'; import { RECT_HEIGHT, RECT_WIDTH, @@ -15,6 +12,9 @@ import { TRIANGLE_WIDTH } from '@entities/kosmos'; import { $discount, discountColor } from '@features/kosmos/utils'; +import { styles } from './styles'; +import { ChartStrokedArrow } from '../../base'; +import { TooltipState } from '../../modular/market-chart/types'; interface ChartTooltipProps { tooltip: TooltipState; diff --git a/src/features/kosmos/components/composite/chart-tooltip/styles.ts b/src/features/kosmos/components/composite/chart-tooltip/styles.ts index 961778063..4e08fabd8 100644 --- a/src/features/kosmos/components/composite/chart-tooltip/styles.ts +++ b/src/features/kosmos/components/composite/chart-tooltip/styles.ts @@ -1,5 +1,5 @@ -import { COLORS } from '@constants/colors'; import { Platform, StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; import { RECT_HEIGHT, RECT_WIDTH, diff --git a/src/features/kosmos/components/composite/claimable-order-card-details/index.tsx b/src/features/kosmos/components/composite/claimable-order-card-details/index.tsx index a2173e060..945490e95 100644 --- a/src/features/kosmos/components/composite/claimable-order-card-details/index.tsx +++ b/src/features/kosmos/components/composite/claimable-order-card-details/index.tsx @@ -8,22 +8,22 @@ import React, { import { StyleProp, View, ViewStyle } from 'react-native'; // @ts-ignore import { ContractNames } from '@airdao/airdao-bond'; -import { useTranslation } from 'react-i18next'; import { BigNumber, ethers } from 'ethers'; -import { styles } from './styles'; +import { useTranslation } from 'react-i18next'; +import { TextOrSpinner } from '@components/composite'; +import { SecondaryButton, Toast, ToastType } from '@components/modular'; +import { COLORS } from '@constants/colors'; +import { buttonWithShadowStyle } from '@constants/shadow'; +import { getTimeRemaining, TxType, useToken } from '@entities/kosmos'; import { useOrdersStore } from '@features/kosmos'; import { OrderCardDetails } from '@features/kosmos/components/base'; import { useClaimBonds } from '@features/kosmos/lib/hooks/use-claim-bonds'; -import { SecondaryButton, Toast, ToastType } from '@components/modular'; -import { getTimeRemaining, TxType, useToken } from '@entities/kosmos'; -import { COLORS } from '@constants/colors'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { TextOrSpinner } from '@components/composite'; -import { buttonWithShadowStyle } from '@constants/shadow'; +import { styles } from './styles'; interface ClaimableOrderCardDetailsProps { readonly transaction: TxType; diff --git a/src/features/kosmos/components/composite/filters-section/index.tsx b/src/features/kosmos/components/composite/filters-section/index.tsx index ead0a1760..e0b0c5a30 100644 --- a/src/features/kosmos/components/composite/filters-section/index.tsx +++ b/src/features/kosmos/components/composite/filters-section/index.tsx @@ -1,10 +1,10 @@ import React, { Dispatch, SetStateAction } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { FiltersItem } from '../../base'; import { FiltersState } from '@features/kosmos/types'; +import { styles } from './styles'; +import { FiltersItem } from '../../base'; interface FiltersSectionsProps { label: string; diff --git a/src/features/kosmos/components/composite/market-table-details/index.tsx b/src/features/kosmos/components/composite/market-table-details/index.tsx index ef9c59ca9..b1d097f56 100644 --- a/src/features/kosmos/components/composite/market-table-details/index.tsx +++ b/src/features/kosmos/components/composite/market-table-details/index.tsx @@ -1,18 +1,18 @@ import React, { ReactNode } from 'react'; import { LayoutChangeEvent, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; -import { RowJustifyAlignedItem } from '@features/kosmos/components/base'; import { Row, Text } from '@components/base'; -import { useMarketDetails } from '@features/kosmos/lib/hooks'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils'; import { MarketType, _timestampToDate, timestampToFormattedDate } from '@entities/kosmos'; +import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; +import { RowJustifyAlignedItem } from '@features/kosmos/components/base'; +import { useMarketDetails } from '@features/kosmos/lib/hooks'; +import { NumberUtils } from '@utils'; +import { styles } from './styles'; interface MarketTableDetailsProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/composite/markets-list/index.tsx b/src/features/kosmos/components/composite/markets-list/index.tsx index 61fe54b90..fd1e37ac1 100644 --- a/src/features/kosmos/components/composite/markets-list/index.tsx +++ b/src/features/kosmos/components/composite/markets-list/index.tsx @@ -3,11 +3,13 @@ import { TouchableOpacity, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { FlashList, ListRenderItemInfo } from '@shopify/flash-list'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { MarketListItem, ScreenLoader } from '@/features/kosmos/components/base'; +import { filter } from '@/features/kosmos/utils'; +import { HomeNavigationProp } from '@appTypes'; +import { DEVICE_HEIGHT, DEVICE_WIDTH } from '@constants/variables'; import { FiltersState, MarketType, @@ -15,14 +17,12 @@ import { useClosedMarketsQuery, useMarketTokens } from '@entities/kosmos'; -import { filter } from '@/features/kosmos/utils'; -import { DEVICE_HEIGHT, DEVICE_WIDTH } from '@constants/variables'; -import { HomeNavigationProp } from '@appTypes'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { styles } from './styles'; const ESTIMATED_ITEM_SIZE = 56; const ESTIMATED_LIST_SIZE = { width: DEVICE_WIDTH, height: DEVICE_HEIGHT }; diff --git a/src/features/kosmos/components/composite/markets-list/styles.ts b/src/features/kosmos/components/composite/markets-list/styles.ts index ec567965e..12e16637c 100644 --- a/src/features/kosmos/components/composite/markets-list/styles.ts +++ b/src/features/kosmos/components/composite/markets-list/styles.ts @@ -1,5 +1,5 @@ -import { COLORS } from '@constants/colors'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ listFooterComponent: { diff --git a/src/features/kosmos/components/composite/total-orders-amount/index.tsx b/src/features/kosmos/components/composite/total-orders-amount/index.tsx index d68baade8..a964b1f52 100644 --- a/src/features/kosmos/components/composite/total-orders-amount/index.tsx +++ b/src/features/kosmos/components/composite/total-orders-amount/index.tsx @@ -2,14 +2,14 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; import { upperCase } from 'lodash'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { TxType, useToken } from '@entities/kosmos'; import { totalBondedReducer, totalClaimableReducer } from '@features/kosmos/utils'; -import { TxType, useToken } from '@entities/kosmos'; +import { styles } from './styles'; interface TotalOrdersAmountProps { transactions: TxType[]; diff --git a/src/features/kosmos/components/modular/balance/index.tsx b/src/features/kosmos/components/modular/balance/index.tsx index d7ff433d4..cee0ef463 100644 --- a/src/features/kosmos/components/modular/balance/index.tsx +++ b/src/features/kosmos/components/modular/balance/index.tsx @@ -3,8 +3,8 @@ import { TouchableOpacity, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils'; import { MarketType, Token } from '@entities/kosmos'; +import { NumberUtils } from '@utils'; interface BalanceWithButtonProps { quoteToken: Token | undefined; diff --git a/src/features/kosmos/components/modular/buy-bond-button/index.tsx b/src/features/kosmos/components/modular/buy-bond-button/index.tsx index 24a44663f..0456116a0 100644 --- a/src/features/kosmos/components/modular/buy-bond-button/index.tsx +++ b/src/features/kosmos/components/modular/buy-bond-button/index.tsx @@ -1,26 +1,26 @@ import React, { Dispatch, SetStateAction, useCallback, useMemo } from 'react'; import { ethers } from 'ethers'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { TextOrSpinner } from '@components/composite'; import { PrimaryButton, Toast, ToastType } from '@components/modular'; +import Config from '@constants/config'; + +import { buttonWithShadowStyle } from '@constants/shadow'; +import { MarketType } from '@entities/kosmos'; +import { useWalletPrivateKey } from '@entities/wallet'; +import { usePurchaseStore } from '@features/kosmos'; +import { purchaseBonds } from '@features/kosmos/lib/contracts'; import { useBondContracts, useMarketDetails, useResetStore, useTransactionErrorHandler } from '@features/kosmos/lib/hooks'; -import { purchaseBonds } from '@features/kosmos/lib/contracts'; -import Config from '@constants/config'; - import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { buttonWithShadowStyle } from '@constants/shadow'; -import { TextOrSpinner } from '@components/composite'; -import { usePurchaseStore } from '@features/kosmos'; -import { useWalletPrivateKey } from '@entities/wallet'; -import { MarketType } from '@entities/kosmos'; +import { styles } from './styles'; interface BuyBondButtonProps { market: MarketType; diff --git a/src/features/kosmos/components/modular/filters-selector/index.tsx b/src/features/kosmos/components/modular/filters-selector/index.tsx index ee217116e..3f4a747ba 100644 --- a/src/features/kosmos/components/modular/filters-selector/index.tsx +++ b/src/features/kosmos/components/modular/filters-selector/index.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { TouchableOpacity, View } from 'react-native'; -import { styles } from './styles'; import { Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { ChevronDownIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; +import { styles } from './styles'; interface FiltersSelectorProps { label: string; diff --git a/src/features/kosmos/components/modular/filters-selector/styles.ts b/src/features/kosmos/components/modular/filters-selector/styles.ts index 2d8b6483f..5d1d04d56 100644 --- a/src/features/kosmos/components/modular/filters-selector/styles.ts +++ b/src/features/kosmos/components/modular/filters-selector/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/modular/market-chart/index.tsx b/src/features/kosmos/components/modular/market-chart/index.tsx index 500a49920..f995969d9 100644 --- a/src/features/kosmos/components/modular/market-chart/index.tsx +++ b/src/features/kosmos/components/modular/market-chart/index.tsx @@ -1,12 +1,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { View } from 'react-native'; -import { LineChart } from 'react-native-chart-kit'; import { useFocusEffect } from '@react-navigation/native'; -import { chartConfigStyle, styles } from './styles'; -import { DataPointsPressEventHandler, TooltipState } from './types'; -import { useChartStore } from '@features/kosmos'; -import { ChartTooltip } from '@features/kosmos/components/composite'; -import { mapper } from '@features/kosmos/utils'; +import { LineChart } from 'react-native-chart-kit'; import { ApiPricesResponse, CHART_HEIGHT, @@ -17,6 +12,11 @@ import { MarketType, replaceTimestamps } from '@entities/kosmos'; +import { useChartStore } from '@features/kosmos'; +import { ChartTooltip } from '@features/kosmos/components/composite'; +import { mapper } from '@features/kosmos/utils'; +import { chartConfigStyle, styles } from './styles'; +import { DataPointsPressEventHandler, TooltipState } from './types'; type MarketChartProps = { tokenAddress: string; diff --git a/src/features/kosmos/components/modular/market-chart/styles.ts b/src/features/kosmos/components/modular/market-chart/styles.ts index 76375aa48..17f2c70f4 100644 --- a/src/features/kosmos/components/modular/market-chart/styles.ts +++ b/src/features/kosmos/components/modular/market-chart/styles.ts @@ -1,6 +1,6 @@ -import { COLORS } from '@constants/colors'; import { StyleSheet } from 'react-native'; import { AbstractChartConfig } from 'react-native-chart-kit/dist/AbstractChart'; +import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/modular/review-bond-purchase-button/index.tsx b/src/features/kosmos/components/modular/review-bond-purchase-button/index.tsx index 17b1e841e..fe4e8ebbf 100644 --- a/src/features/kosmos/components/modular/review-bond-purchase-button/index.tsx +++ b/src/features/kosmos/components/modular/review-bond-purchase-button/index.tsx @@ -4,14 +4,14 @@ import Animated, { useAnimatedKeyboard, useAnimatedStyle } from 'react-native-reanimated'; -import { styles } from './styles'; import { Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { buttonWithShadowStyle } from '@constants/shadow'; +import { MarketType } from '@entities/kosmos'; import { usePurchaseStore } from '@features/kosmos'; import { useTransactionErrorHandler } from '@features/kosmos/lib/hooks'; -import { MarketType } from '@entities/kosmos'; -import { buttonWithShadowStyle } from '@constants/shadow'; +import { styles } from './styles'; interface ReviewBondPurchaseButtonProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/modular/user-orders-list/index.tsx b/src/features/kosmos/components/modular/user-orders-list/index.tsx index f7a40bdf6..575a93bcd 100644 --- a/src/features/kosmos/components/modular/user-orders-list/index.tsx +++ b/src/features/kosmos/components/modular/user-orders-list/index.tsx @@ -1,11 +1,6 @@ import React, { useCallback, useMemo } from 'react'; import { RefreshControl, View, VirtualizedList } from 'react-native'; import { useFocusEffect } from '@react-navigation/native'; -import { styles } from './styles'; -import { useClaimState } from '@features/kosmos/lib/hooks'; -import { ScreenLoader } from '@features/kosmos/components/base'; -import { TotalOrdersAmount } from '../../composite/total-orders-amount'; -import { ClaimableOrderCardDetails } from '@features/kosmos/components/composite'; import { TransactionListItem, TxType, @@ -13,6 +8,11 @@ import { useTransactions as useOrders, useMarketTokens } from '@entities/kosmos'; +import { ScreenLoader } from '@features/kosmos/components/base'; +import { ClaimableOrderCardDetails } from '@features/kosmos/components/composite'; +import { useClaimState } from '@features/kosmos/lib/hooks'; +import { styles } from './styles'; +import { TotalOrdersAmount } from '../../composite/total-orders-amount'; export const UserOrdersList = () => { const { transactions, isTransactionsLoading, refetchTransactions } = diff --git a/src/features/kosmos/components/modular/user-orders-list/styles.ts b/src/features/kosmos/components/modular/user-orders-list/styles.ts index e30c04b0f..abe8fc81a 100644 --- a/src/features/kosmos/components/modular/user-orders-list/styles.ts +++ b/src/features/kosmos/components/modular/user-orders-list/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx b/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx index 6e19fa1e6..70a34540c 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx +++ b/src/features/kosmos/components/templates/bottom-sheet-filters/index.tsx @@ -7,16 +7,16 @@ import React, { } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { FiltersSections } from '@features/kosmos/components/composite'; import { Row, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils'; -import { useForwardedRef } from '@hooks'; import { SecondaryButton } from '@components/modular'; -import { INITIAL_FILTERS } from '@features/kosmos/utils'; +import { COLORS } from '@constants/colors'; import { FiltersState } from '@entities/kosmos'; +import { FiltersSections } from '@features/kosmos/components/composite'; +import { INITIAL_FILTERS } from '@features/kosmos/utils'; +import { useForwardedRef } from '@hooks'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; interface BottomSheetFiltersProps { updateFilters: Dispatch>; diff --git a/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts b/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts index 4747ed198..da2a8d724 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts +++ b/src/features/kosmos/components/templates/bottom-sheet-filters/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ heading: { diff --git a/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx b/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx index e87399ad2..9100eb4af 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx +++ b/src/features/kosmos/components/templates/bottom-sheet-preview-purchase/index.tsx @@ -6,27 +6,27 @@ import React, { useState } from 'react'; import { View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { ethers } from 'ethers'; import { upperCase } from 'lodash'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Row, Spacer, Text } from '@components/base'; -import { useForwardedRef } from '@hooks'; -import { COLORS } from '@constants/colors'; -import { useMarketDetails } from '@features/kosmos/lib/hooks'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { TokenLogo } from '@components/modular'; -import { $discount, formatDecimals } from '@features/kosmos/utils'; -import { usePurchaseStore } from '@features/kosmos'; -import { BuyBondButton } from '../../modular'; +import { COLORS } from '@constants/colors'; import { _timestampToDate, MarketType, timestampToFormattedDate, useTokensStore } from '@entities/kosmos'; +import { usePurchaseStore } from '@features/kosmos'; +import { useMarketDetails } from '@features/kosmos/lib/hooks'; +import { $discount, formatDecimals } from '@features/kosmos/utils'; +import { useForwardedRef } from '@hooks'; import { isAndroid, verticalScale } from '@utils'; +import { styles } from './styles'; +import { BuyBondButton } from '../../modular'; interface BottomSheetPreviewPurchaseProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx b/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx index 12381b971..35ea3640b 100644 --- a/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx +++ b/src/features/kosmos/components/templates/bottom-sheet-review-order/index.tsx @@ -2,18 +2,10 @@ import React, { forwardRef, ReactNode, useMemo } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { styles } from './styles'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; import { Row, Spacer, Text } from '@components/base'; -import { useForwardedRef } from '@hooks'; -import { COLORS } from '@constants/colors'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { TokenLogo } from '@components/modular'; -import { - $discount, - discountColor, - formatDecimals -} from '@features/kosmos/utils'; -import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; +import { COLORS } from '@constants/colors'; import { _timestampToDate, Token, @@ -21,7 +13,15 @@ import { useTokensStore, VESTINGS } from '@entities/kosmos'; +import { Status } from '@features/bridge/templates/BridgeTransaction/components/Status/Status'; +import { + $discount, + discountColor, + formatDecimals +} from '@features/kosmos/utils'; +import { useForwardedRef } from '@hooks'; import { environment, NumberUtils, StringUtils } from '@utils'; +import { styles } from './styles'; const ADDRESS_LEFT_PADDING = 5; const ADDRESS_RIGHT_PADDING = 4; diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/index.tsx b/src/features/kosmos/components/templates/exact-market-token-tabs/index.tsx index 0f6feb3b7..77faa49dd 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/index.tsx +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { LayoutChangeEvent } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { AnimatedTabs } from '@components/modular'; +import { MarketType } from '@entities/kosmos'; +import { styles } from './styles'; import { BuyBondTab } from './tabs/buy-bond'; import { TransactionsHistoryTab } from './tabs/transactions'; -import { MarketType } from '@entities/kosmos'; interface ExactMarketTokenTabsProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx index 5697ce0da..b8c747979 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/buy-bond/index.tsx @@ -6,29 +6,29 @@ import { TouchableOpacity, View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { InputRef, Row, Text } from '@components/base'; +import { BottomSheetRef } from '@components/composite'; +import { InputWithTokenSelect } from '@components/templates'; +import { COLORS } from '@constants/colors'; +import { MarketType } from '@entities/kosmos'; +import { usePurchaseStore } from '@features/kosmos'; +import { ReviewBondPurchaseButton } from '@features/kosmos/components/modular'; import { useMarketDetails, useTransactionErrorHandler } from '@features/kosmos/lib/hooks'; -import { COLORS } from '@constants/colors'; -import { ReviewBondPurchaseButton } from '@features/kosmos/components/modular'; import { $discount, discountColor } from '@features/kosmos/utils'; -import { usePurchaseStore } from '@features/kosmos'; -import { BottomSheetPreviewPurchase } from '../../../bottom-sheet-preview-purchase'; -import { BottomSheetRef } from '@components/composite'; -import { InputWithTokenSelect } from '@components/templates'; import { Token } from '@models'; import { NumberUtils, isAndroid, isIos } from '@utils'; -import { MarketType } from '@entities/kosmos'; +import { styles } from './styles'; +import { BottomSheetPreviewPurchase } from '../../../bottom-sheet-preview-purchase'; interface BuyBondTabProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx index ebc1b3f5f..8a82b0281 100644 --- a/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx +++ b/src/features/kosmos/components/templates/exact-market-token-tabs/tabs/transactions/index.tsx @@ -1,19 +1,19 @@ import React, { useMemo } from 'react'; import { RefreshControl, View, VirtualizedList } from 'react-native'; -import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { TransactionHistoryItem } from '@features/kosmos/components/base'; -import { useMarketDetails } from '@features/kosmos/lib/hooks'; import { upperCase } from 'lodash'; -import { COLORS } from '@constants/colors'; +import { useTranslation } from 'react-i18next'; import { Row, Spinner, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; import { MarketType, TransactionListItem, TxType, useMarketTransactions } from '@entities/kosmos'; +import { TransactionHistoryItem } from '@features/kosmos/components/base'; +import { useMarketDetails } from '@features/kosmos/lib/hooks'; import { isIos } from '@utils'; +import { styles } from './styles'; interface TransactionsHistoryTabProps { market: MarketType | undefined; diff --git a/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx b/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx index 9d82e030f..c3ded09af 100644 --- a/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx +++ b/src/features/kosmos/components/templates/market-chart-with-timeframes/index.tsx @@ -6,15 +6,15 @@ import { ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { MarketChart } from '@features/kosmos/components/modular'; -import { useMarketDetails } from '@features/kosmos/lib/hooks'; -import { ChartTimeIntervals } from '@features/kosmos/components/composite'; -import { verticalScale } from '@utils'; import { Row, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { CHART_INTERVALS, MarketType } from '@entities/kosmos'; import { useChartStore } from '@features/kosmos'; +import { ChartTimeIntervals } from '@features/kosmos/components/composite'; +import { MarketChart } from '@features/kosmos/components/modular'; +import { useMarketDetails } from '@features/kosmos/lib/hooks'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; interface MarketChartsWithTimeframesProps { market: MarketType; diff --git a/src/features/kosmos/components/templates/market-tabs/index.tsx b/src/features/kosmos/components/templates/market-tabs/index.tsx index c20b556f9..dad09fd90 100644 --- a/src/features/kosmos/components/templates/market-tabs/index.tsx +++ b/src/features/kosmos/components/templates/market-tabs/index.tsx @@ -1,10 +1,10 @@ import React, { Dispatch, SetStateAction, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -import { AnimatedTabs } from '@components/modular'; import { MarketsList } from '@/features/kosmos/components/composite'; +import { AnimatedTabs } from '@components/modular'; import { WrappedListsContainer } from '@features/kosmos/components/base'; -import { FiltersState } from '@features/kosmos/types'; import { UserOrdersList } from '@features/kosmos/components/modular'; +import { FiltersState } from '@features/kosmos/types'; interface MarketsTabsProps { changeActiveIndex: Dispatch>; diff --git a/src/features/kosmos/lib/contracts/ERC20.ts b/src/features/kosmos/lib/contracts/ERC20.ts index e5145eded..8bc1af1f0 100644 --- a/src/features/kosmos/lib/contracts/ERC20.ts +++ b/src/features/kosmos/lib/contracts/ERC20.ts @@ -1,7 +1,7 @@ // TODO: remove these function & extract into common contracts +import { ethers } from 'ethers'; import Config from '@constants/config'; import { Token } from '@features/kosmos/types'; -import { ethers } from 'ethers'; import { ERC20_BALANCE } from '../abi/ERC20_BALANCE'; interface BalanceArgs { diff --git a/src/features/kosmos/lib/contracts/claim.ts b/src/features/kosmos/lib/contracts/claim.ts index caa34bf4e..68c011aaf 100644 --- a/src/features/kosmos/lib/contracts/claim.ts +++ b/src/features/kosmos/lib/contracts/claim.ts @@ -1,11 +1,11 @@ import { Dispatch, SetStateAction } from 'react'; -import { ethers } from 'ethers'; import * as Bond from '@airdao/airdao-bond'; -// @ts-ignore import * as BondOld from 'airdao-bond-old'; +import { ethers } from 'ethers'; +// @ts-ignore +import { Toast, ToastType } from '@components/modular'; import Config from '@constants/config'; import { claimExpiredOrder } from '@features/kosmos/api'; -import { Toast, ToastType } from '@components/modular'; interface ClaimBondsArgs { contracts: any; diff --git a/src/features/kosmos/lib/contracts/purchase.ts b/src/features/kosmos/lib/contracts/purchase.ts index c93c45098..50c4fb72b 100644 --- a/src/features/kosmos/lib/contracts/purchase.ts +++ b/src/features/kosmos/lib/contracts/purchase.ts @@ -1,6 +1,6 @@ +import { Methods, ContractNames } from '@airdao/airdao-bond'; import { ethers } from 'ethers'; // @ts-ignore -import { Methods, ContractNames } from '@airdao/airdao-bond'; import { PurchaseArgs } from '@features/kosmos/types'; export const purchaseBonds = async ( diff --git a/src/features/kosmos/lib/hooks/use-balance.ts b/src/features/kosmos/lib/hooks/use-balance.ts index d98ef9cd5..1fcd110f7 100644 --- a/src/features/kosmos/lib/hooks/use-balance.ts +++ b/src/features/kosmos/lib/hooks/use-balance.ts @@ -1,9 +1,9 @@ import { useCallback } from 'react'; import { BigNumber, ethers, utils } from 'ethers'; +import { MarketType, useMarketTokens } from '@entities/kosmos'; import { usePurchaseStore } from '@features/kosmos'; import { formatDecimals } from '@features/kosmos/utils'; import { useMarketDetails } from './use-market-details'; -import { MarketType, useMarketTokens } from '@entities/kosmos'; export function useBalance(market: MarketType | undefined) { const { onChangeAmountToBuy } = usePurchaseStore(); diff --git a/src/features/kosmos/lib/hooks/use-bond-contracts.ts b/src/features/kosmos/lib/hooks/use-bond-contracts.ts index 4031e9685..c3638b947 100644 --- a/src/features/kosmos/lib/hooks/use-bond-contracts.ts +++ b/src/features/kosmos/lib/hooks/use-bond-contracts.ts @@ -1,8 +1,8 @@ import { useEffect, useState } from 'react'; import { Contracts } from '@airdao/airdao-bond'; import { ethers } from 'ethers'; -import { useWalletPrivateKey } from '@entities/wallet'; import Config from '@constants/config'; +import { useWalletPrivateKey } from '@entities/wallet'; export function useBondContracts() { const { _extractPrivateKey } = useWalletPrivateKey(); diff --git a/src/features/kosmos/lib/hooks/use-claim-bonds.ts b/src/features/kosmos/lib/hooks/use-claim-bonds.ts index 2f1476181..7cec6cd68 100644 --- a/src/features/kosmos/lib/hooks/use-claim-bonds.ts +++ b/src/features/kosmos/lib/hooks/use-claim-bonds.ts @@ -1,10 +1,10 @@ import { Dispatch, SetStateAction } from 'react'; // @ts-ignore import { ContractNames, Methods } from '@airdao/airdao-bond'; +import { TxType, useTransactions } from '@entities/kosmos'; +import { useWalletPrivateKey } from '@entities/wallet'; import { useBondContracts } from './use-bond-contracts'; import { claimBond } from '../contracts'; -import { useWalletPrivateKey } from '@entities/wallet'; -import { TxType, useTransactions } from '@entities/kosmos'; export function useClaimBonds( transaction: TxType, diff --git a/src/features/kosmos/lib/hooks/use-market-details.ts b/src/features/kosmos/lib/hooks/use-market-details.ts index d097031ed..7c5d186a6 100644 --- a/src/features/kosmos/lib/hooks/use-market-details.ts +++ b/src/features/kosmos/lib/hooks/use-market-details.ts @@ -1,7 +1,5 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { BigNumber, utils } from 'ethers'; -import { $discount, formatDecimals } from '@features/kosmos/utils'; -import { _willGet, _willGetSubFee } from '@features/kosmos/utils/transaction'; import { getProtocolFee, MarketType, @@ -10,6 +8,8 @@ import { VESTINGS } from '@entities/kosmos'; import { usePurchaseStore } from '@features/kosmos'; +import { $discount, formatDecimals } from '@features/kosmos/utils'; +import { _willGet, _willGetSubFee } from '@features/kosmos/utils/transaction'; import { environment } from '@utils'; export function useMarketDetails(market: MarketType | undefined) { diff --git a/src/features/kosmos/lib/hooks/use-transaction-error-handler.ts b/src/features/kosmos/lib/hooks/use-transaction-error-handler.ts index 0f312e688..1cb971dfd 100644 --- a/src/features/kosmos/lib/hooks/use-transaction-error-handler.ts +++ b/src/features/kosmos/lib/hooks/use-transaction-error-handler.ts @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react'; import { BigNumber, utils } from 'ethers'; import { useTranslation } from 'react-i18next'; -import { useMarketDetails } from './use-market-details'; import { MarketType } from '@entities/kosmos'; import { usePurchaseStore } from '@features/kosmos'; +import { useMarketDetails } from './use-market-details'; export function useTransactionErrorHandler(market: MarketType | undefined) { const { t } = useTranslation(); diff --git a/src/features/kosmos/model/purchase.store.ts b/src/features/kosmos/model/purchase.store.ts index ed21b4579..46bb80045 100644 --- a/src/features/kosmos/model/purchase.store.ts +++ b/src/features/kosmos/model/purchase.store.ts @@ -1,5 +1,5 @@ -import { create } from 'zustand'; import { ethers } from 'ethers'; +import { create } from 'zustand'; export interface PurchaseStore { amountToBuy: string; diff --git a/src/features/kosmos/utils/filter.ts b/src/features/kosmos/utils/filter.ts index b6d88330e..b75e3ccb3 100644 --- a/src/features/kosmos/utils/filter.ts +++ b/src/features/kosmos/utils/filter.ts @@ -1,3 +1,4 @@ +import { $token } from '@entities/kosmos'; import i18n from '@localization/i18n'; import { @@ -7,7 +8,6 @@ import { StatusFilterValues, Token } from '../types'; -import { $token } from '@entities/kosmos'; export const INITIAL_FILTERS: FiltersState = { status: i18n.t('kosmos.status.active'), diff --git a/src/features/lists/lib/hooks/use-list-actions.ts b/src/features/lists/lib/hooks/use-list-actions.ts index 2e1e33d45..d57eaf982 100644 --- a/src/features/lists/lib/hooks/use-list-actions.ts +++ b/src/features/lists/lib/hooks/use-list-actions.ts @@ -1,6 +1,7 @@ import { useCallback } from 'react'; -import { PublicAddressListDB } from '@database'; import { CacheableAccountList } from '@appTypes'; +import { PublicAddressListDB } from '@database'; +import { useAddressesStore } from '@entities/addresses'; import { useListsStore } from '@entities/lists/model/lists.store'; import { @@ -8,7 +9,6 @@ import { sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; import { AccountList, ExplorerAccount } from '@models'; -import { useAddressesStore } from '@entities/addresses'; export function useListActions(onDismissBottomSheet?: () => void) { const { allAddresses } = useAddressesStore(); diff --git a/src/features/passcode/lib/hooks/use-passcode-actions.ts b/src/features/passcode/lib/hooks/use-passcode-actions.ts index 2f4ea6ce5..4c2272959 100644 --- a/src/features/passcode/lib/hooks/use-passcode-actions.ts +++ b/src/features/passcode/lib/hooks/use-passcode-actions.ts @@ -1,14 +1,14 @@ import { useCallback } from 'react'; import * as LocalAuthentication from 'expo-local-authentication'; import { toLength } from 'lodash'; -import { DeviceUtils, PasscodeUtils } from '@utils'; -import { Cache, CacheKey } from '@lib/cache'; -import { useSupportedBiometrics } from '@hooks'; import { _error, authenticateNativePopup, usePasscodeStore } from '@features/passcode'; +import { useSupportedBiometrics } from '@hooks'; +import { Cache, CacheKey } from '@lib/cache'; +import { DeviceUtils, PasscodeUtils } from '@utils'; export function usePasscodeActions() { const supportedBiometrics = useSupportedBiometrics(); diff --git a/src/features/products/components/base/product-list-item/index.tsx b/src/features/products/components/base/product-list-item/index.tsx index 45c24e9ac..89aa11de9 100644 --- a/src/features/products/components/base/product-list-item/index.tsx +++ b/src/features/products/components/base/product-list-item/index.tsx @@ -1,13 +1,13 @@ import React, { useCallback } from 'react'; import { Pressable, View } from 'react-native'; -import { LinearGradient } from 'expo-linear-gradient'; -import { styles } from './styles'; -import { Product } from '@features/products/utils'; -import { Row, Text } from '@components/base'; import { useNavigation } from '@react-navigation/native'; -import { HomeNavigationProp } from '@appTypes'; +import { LinearGradient } from 'expo-linear-gradient'; import { lowerCase } from 'lodash'; import capitalize from 'lodash/capitalize'; +import { HomeNavigationProp } from '@appTypes'; +import { Row, Text } from '@components/base'; +import { Product } from '@features/products/utils'; +import { styles } from './styles'; interface ProductListItemProps { product: Product; diff --git a/src/features/products/components/templates/products-list/index.tsx b/src/features/products/components/templates/products-list/index.tsx index 7a1a01b6b..1f49a5047 100644 --- a/src/features/products/components/templates/products-list/index.tsx +++ b/src/features/products/components/templates/products-list/index.tsx @@ -4,14 +4,14 @@ import { SectionListData, SectionListRenderItemInfo } from 'react-native'; -import { styles } from './styles'; -import { Product, SectionizedProducts } from '@features/products/utils'; -import { PRODUCTS } from '@features/products/entities'; +import { useTranslation } from 'react-i18next'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { ProductListItem } from '../../base'; +import { PRODUCTS } from '@features/products/entities'; +import { Product, SectionizedProducts } from '@features/products/utils'; import { verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; +import { styles } from './styles'; +import { ProductListItem } from '../../base'; export const ProductsList = () => { const { t } = useTranslation(); diff --git a/src/features/products/entities/_products.tsx b/src/features/products/entities/_products.tsx index b14502b4d..6a7509ebd 100644 --- a/src/features/products/entities/_products.tsx +++ b/src/features/products/entities/_products.tsx @@ -1,11 +1,11 @@ import React from 'react'; +import { TFunction } from 'i18next'; import { BridgeAccountActionIcon, SwapAccountActionIcon } from '@components/svg/icons/v2/actions'; -import { SectionizedProducts } from '../utils'; -import { TFunction } from 'i18next'; import { HarborAccountAction } from '@components/svg/icons/v2/harbor'; +import { SectionizedProducts } from '../utils'; export const PRODUCTS = (t: TFunction): SectionizedProducts[] => { return [ diff --git a/src/features/send-funds/components/base/tokens-list-item/index.tsx b/src/features/send-funds/components/base/tokens-list-item/index.tsx index 9cc319423..65a1d09d2 100644 --- a/src/features/send-funds/components/base/tokens-list-item/index.tsx +++ b/src/features/send-funds/components/base/tokens-list-item/index.tsx @@ -1,18 +1,18 @@ import React, { useCallback, useMemo } from 'react'; import { StyleProp, TouchableOpacity, View, ViewStyle } from 'react-native'; -import { styles } from './styles'; +import { CryptoCurrencyCode } from '@appTypes'; import { Row, Spacer, Text } from '@components/base'; -import { Token } from '@models'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { useUSDPrice } from '@hooks'; +import { Token } from '@models'; import { StringValidators, wrapTokenIcon, NumberUtils, StringUtils } from '@utils'; -import { useUSDPrice } from '@hooks'; -import { CryptoCurrencyCode } from '@appTypes'; +import { styles } from './styles'; interface TokensListItemProps { token: Token; diff --git a/src/features/send-funds/components/composite/tokens-list/index.tsx b/src/features/send-funds/components/composite/tokens-list/index.tsx index 502b13f46..1cd16e3cd 100644 --- a/src/features/send-funds/components/composite/tokens-list/index.tsx +++ b/src/features/send-funds/components/composite/tokens-list/index.tsx @@ -1,10 +1,10 @@ import React, { useCallback } from 'react'; import { FlatList, ListRenderItemInfo, View } from 'react-native'; -import { styles } from './styles'; -import { Token } from '@models'; -import { TokensListItem } from '../../base'; import { Spacer, Spinner } from '@components/base'; import { useSendFundsStore } from '@features/send-funds'; +import { Token } from '@models'; +import { styles } from './styles'; +import { TokensListItem } from '../../base'; interface TokensListProps { // readonly tokens: Token[]; diff --git a/src/features/send-funds/components/composite/tokens-list/styles.ts b/src/features/send-funds/components/composite/tokens-list/styles.ts index bf2d90652..66bd45810 100644 --- a/src/features/send-funds/components/composite/tokens-list/styles.ts +++ b/src/features/send-funds/components/composite/tokens-list/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { DEVICE_HEIGHT } from '@constants/variables'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ loader: { diff --git a/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx b/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx index 7cb344bc2..40122ded9 100644 --- a/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx +++ b/src/features/send-funds/components/modular/amount-selection-keyboard-extend/index.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import Animated, { useAnimatedKeyboard, useAnimatedStyle } from 'react-native-reanimated'; -import { styles } from './styles'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Row } from '@components/base'; -import { PercentageItem } from '../../base'; import { isIos } from '@utils'; +import { styles } from './styles'; +import { PercentageItem } from '../../base'; const PERCENTS = [25, 50, 75, 100]; diff --git a/src/features/send-funds/components/modular/barcode-scanner/index.tsx b/src/features/send-funds/components/modular/barcode-scanner/index.tsx index bda5e0d8c..b97d4ac50 100644 --- a/src/features/send-funds/components/modular/barcode-scanner/index.tsx +++ b/src/features/send-funds/components/modular/barcode-scanner/index.tsx @@ -1,8 +1,8 @@ import React, { forwardRef } from 'react'; -import { useForwardedRef } from '@hooks'; -import { BarcodeScanner } from '@components/templates'; import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { BarcodeScanner } from '@components/templates'; import { DEVICE_HEIGHT } from '@constants/variables'; +import { useForwardedRef } from '@hooks'; interface FundsBarcodeScannerProps { onScanned: (address: string) => void; diff --git a/src/features/send-funds/components/templates/header/index.tsx b/src/features/send-funds/components/templates/header/index.tsx index 5396a4aff..5f20a0b82 100644 --- a/src/features/send-funds/components/templates/header/index.tsx +++ b/src/features/send-funds/components/templates/header/index.tsx @@ -1,13 +1,13 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Button, Text } from '@components/base'; import { Header } from '@components/composite'; import { BarcodeScannerIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { useBarcode } from '@features/send-funds/lib/hooks'; import { StringUtils } from '@utils'; +import { styles } from './styles'; interface FundsHeaderProps { sender: string; diff --git a/src/features/send-funds/components/templates/header/styles.ts b/src/features/send-funds/components/templates/header/styles.ts index 769649c41..a3f747649 100644 --- a/src/features/send-funds/components/templates/header/styles.ts +++ b/src/features/send-funds/components/templates/header/styles.ts @@ -1,5 +1,5 @@ -import { COLORS } from '@constants/colors'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ header: { diff --git a/src/features/send-funds/lib/hooks/use-barcode.ts b/src/features/send-funds/lib/hooks/use-barcode.ts index bf05c3bb2..49d3c0a50 100644 --- a/src/features/send-funds/lib/hooks/use-barcode.ts +++ b/src/features/send-funds/lib/hooks/use-barcode.ts @@ -1,13 +1,13 @@ import { useCallback } from 'react'; +import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; import { CompositeNavigationProp, useNavigation } from '@react-navigation/native'; -import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { HomeParamsList, RootStackParamsList, TabsParamsList } from '@appTypes'; import { ethereumAddressRegex } from '@constants/regex'; import { useSendFundsStore } from '@features/send-funds/model'; -import { HomeParamsList, RootStackParamsList, TabsParamsList } from '@appTypes'; type Navigation = CompositeNavigationProp< BottomTabNavigationProp, diff --git a/src/features/send-funds/model/send-funds.store.ts b/src/features/send-funds/model/send-funds.store.ts index 5393e7813..6d458673e 100644 --- a/src/features/send-funds/model/send-funds.store.ts +++ b/src/features/send-funds/model/send-funds.store.ts @@ -1,7 +1,7 @@ import { create } from 'zustand'; +import { Token } from '@models'; import { SendFundsState } from './types'; import { SEND_FUNDS_INITIAL_STATE, $change } from '../utils'; -import { Token } from '@models'; interface SendFundsStore { state: SendFundsState; diff --git a/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx b/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx index 244c986cb..6f889b494 100644 --- a/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx +++ b/src/features/swap/components/base/bottom-sheet-review-token-item/index.tsx @@ -1,14 +1,14 @@ import React, { useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { Spacer, Text } from '@components/base'; +import { TokenLogo } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { useSwapContextSelector } from '@features/swap/context'; import { FIELD } from '@features/swap/types'; import { SwapStringUtils } from '@features/swap/utils'; -import { TokenLogo } from '@components/modular'; -import { Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { NumberUtils, verticalScale } from '@utils'; +import { styles } from './styles'; interface BottomSheetReviewTokenItemProps { type: keyof typeof FIELD; diff --git a/src/features/swap/components/base/settings-input-with-label/index.tsx b/src/features/swap/components/base/settings-input-with-label/index.tsx index 5a69275b8..18a1c7faa 100644 --- a/src/features/swap/components/base/settings-input-with-label/index.tsx +++ b/src/features/swap/components/base/settings-input-with-label/index.tsx @@ -5,11 +5,11 @@ import { TextInputProps, TouchableWithoutFeedback } from 'react-native'; -import { styles } from './styles'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { SwapStringUtils } from '@features/swap/utils'; import { INITIAL_SLIPPAGE_TOLERANCE } from '@features/swap/context/initials'; +import { SwapStringUtils } from '@features/swap/utils'; +import { styles } from './styles'; interface SettingsInputWithLabelProps extends TextInputProps { label: string; diff --git a/src/features/swap/components/base/settings-input-with-label/styles.ts b/src/features/swap/components/base/settings-input-with-label/styles.ts index b17ff05ca..0a9f7bf6d 100644 --- a/src/features/swap/components/base/settings-input-with-label/styles.ts +++ b/src/features/swap/components/base/settings-input-with-label/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ formWithLabel: { diff --git a/src/features/swap/components/base/swap-buttons-list/approval-required/index.tsx b/src/features/swap/components/base/swap-buttons-list/approval-required/index.tsx index 6b43361a6..4085fd4cf 100644 --- a/src/features/swap/components/base/swap-buttons-list/approval-required/index.tsx +++ b/src/features/swap/components/base/swap-buttons-list/approval-required/index.tsx @@ -1,12 +1,12 @@ import React, { useMemo } from 'react'; import { StyleProp, TextStyle, ViewStyle, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from '../styles'; import { Spinner, Text } from '@components/base'; import { PrimaryButton, SecondaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { AllowanceStatus } from '@features/swap/types'; import { useSwapContextSelector } from '@features/swap/context'; +import { AllowanceStatus } from '@features/swap/types'; +import { styles } from '../styles'; interface ApprovalRequiredButtonProps { isIncreasingAllowance: boolean; diff --git a/src/features/swap/components/base/swap-buttons-list/error-impact/index.tsx b/src/features/swap/components/base/swap-buttons-list/error-impact/index.tsx index fb9d4f6b6..21eed6872 100644 --- a/src/features/swap/components/base/swap-buttons-list/error-impact/index.tsx +++ b/src/features/swap/components/base/swap-buttons-list/error-impact/index.tsx @@ -1,11 +1,11 @@ import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; +import { Spinner, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { useSwapContextSelector } from '@features/swap/context'; import { useSwapSettings } from '@features/swap/lib/hooks'; -import { Spinner, Text } from '@components/base'; import { PriceImpactErrorColors } from '../utils/colors'; -import { useSwapContextSelector } from '@features/swap/context'; interface SwapErrorImpactButtonProps { isProcessingSwap: boolean; diff --git a/src/features/swap/components/base/swap-buttons-list/swap/index.tsx b/src/features/swap/components/base/swap-buttons-list/swap/index.tsx index 9073bcf2b..0bb5598fc 100644 --- a/src/features/swap/components/base/swap-buttons-list/swap/index.tsx +++ b/src/features/swap/components/base/swap-buttons-list/swap/index.tsx @@ -1,13 +1,13 @@ import React, { useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; import { StyleProp, ViewStyle } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Row, Spinner, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { styles } from '../styles'; import { useSwapContextSelector } from '@features/swap/context'; import { isETHtoWrapped, isWrappedToETH } from '@features/swap/utils'; import { cssShadowToNative } from '@utils'; +import { styles } from '../styles'; interface SwapButtonProps { isProcessingSwap: boolean; diff --git a/src/features/swap/components/composite/balance/index.tsx b/src/features/swap/components/composite/balance/index.tsx index 16e0f8be2..90370705f 100644 --- a/src/features/swap/components/composite/balance/index.tsx +++ b/src/features/swap/components/composite/balance/index.tsx @@ -1,17 +1,17 @@ import React, { useCallback, useMemo } from 'react'; +import { ethers } from 'ethers'; import { formatEther } from 'ethers/lib/utils'; import { useTranslation } from 'react-i18next'; +import { CryptoCurrencyCode } from '@appTypes'; +import { ShimmerLoader } from '@components/animations'; import { Button, Row, Spacer, Text } from '@components/base'; -import { FIELD, SelectedTokensKeys } from '@features/swap/types'; +import { WalletOutlineIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { useSwapContextSelector } from '@features/swap/context'; import { useSwapBalance, useSwapFieldsHandler } from '@features/swap/lib/hooks'; -import { NumberUtils, scale } from '@utils'; +import { FIELD, SelectedTokensKeys } from '@features/swap/types'; import { useUSDPrice } from '@hooks'; -import { CryptoCurrencyCode } from '@appTypes'; -import { COLORS } from '@constants/colors'; -import { ShimmerLoader } from '@components/animations'; -import { WalletOutlineIcon } from '@components/svg/icons/v2'; -import { ethers } from 'ethers'; +import { NumberUtils, scale } from '@utils'; interface BalanceProps { type: SelectedTokensKeys; diff --git a/src/features/swap/components/composite/preview-information/index.tsx b/src/features/swap/components/composite/preview-information/index.tsx index 9ac513195..06e3c732d 100644 --- a/src/features/swap/components/composite/preview-information/index.tsx +++ b/src/features/swap/components/composite/preview-information/index.tsx @@ -1,11 +1,11 @@ import React, { ReactNode, useMemo } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Text } from '@components/base'; -import { useSwapContextSelector } from '@features/swap/context'; import { COLORS } from '@constants/colors'; +import { useSwapContextSelector } from '@features/swap/context'; import { useSwapHelpers, useSwapTokens } from '@features/swap/lib/hooks'; +import { styles } from './styles'; export const PreviewInformation = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/composite/settings-deadline-form/index.tsx b/src/features/swap/components/composite/settings-deadline-form/index.tsx index 2e710b0a7..96e289268 100644 --- a/src/features/swap/components/composite/settings-deadline-form/index.tsx +++ b/src/features/swap/components/composite/settings-deadline-form/index.tsx @@ -1,11 +1,11 @@ import React, { useCallback } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Text } from '@components/base'; import { TextInput } from '@components/base/Input/Input.text'; import { COLORS } from '@constants/colors'; import { useSwapSettings } from '@features/swap/lib/hooks'; +import { styles } from './styles'; export const SettingsDeadlineForm = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/composite/settings-expert-mode-form/index.tsx b/src/features/swap/components/composite/settings-expert-mode-form/index.tsx index f5acce31c..1bf4659c0 100644 --- a/src/features/swap/components/composite/settings-expert-mode-form/index.tsx +++ b/src/features/swap/components/composite/settings-expert-mode-form/index.tsx @@ -1,8 +1,8 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Switch, Text } from '@components/base'; -import { useSwapSettings } from '@features/swap/lib/hooks'; import { COLORS } from '@constants/colors'; +import { useSwapSettings } from '@features/swap/lib/hooks'; export const SettingsExpertModeForm = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/composite/settings-multi-hop-form/index.tsx b/src/features/swap/components/composite/settings-multi-hop-form/index.tsx index 7b3ba0934..56a171c21 100644 --- a/src/features/swap/components/composite/settings-multi-hop-form/index.tsx +++ b/src/features/swap/components/composite/settings-multi-hop-form/index.tsx @@ -1,11 +1,11 @@ import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Switch, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; import { useSwapFieldsHandler, useSwapSettings } from '@features/swap/lib/hooks'; -import { COLORS } from '@constants/colors'; export const SettingsMultiHopForm = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/composite/settings-slippage-tolerance-form/index.tsx b/src/features/swap/components/composite/settings-slippage-tolerance-form/index.tsx index 79c8a8623..d2fffa56d 100644 --- a/src/features/swap/components/composite/settings-slippage-tolerance-form/index.tsx +++ b/src/features/swap/components/composite/settings-slippage-tolerance-form/index.tsx @@ -1,12 +1,12 @@ import React, { useCallback } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { SettingsInputWithLabel } from '@/features/swap/components/base'; -import { PercentageBox } from '@components/composite/PercentageBox'; import { Row, Text } from '@components/base'; -import { useSwapSettings } from '@features/swap/lib/hooks'; +import { PercentageBox } from '@components/composite/PercentageBox'; import { COLORS } from '@constants/colors'; +import { useSwapSettings } from '@features/swap/lib/hooks'; +import { styles } from './styles'; const SLIPPAGE_TOLERANCE_PERCENTAGES = ['0.1', '0.5', '1']; diff --git a/src/features/swap/components/composite/swap-reverse-tokens/index.tsx b/src/features/swap/components/composite/swap-reverse-tokens/index.tsx index 66e2effe1..7a2514a80 100644 --- a/src/features/swap/components/composite/swap-reverse-tokens/index.tsx +++ b/src/features/swap/components/composite/swap-reverse-tokens/index.tsx @@ -1,17 +1,17 @@ import React, { useCallback } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; +import { Divider } from '@/features/swap/components/base'; +import { Button, Spacer } from '@components/base'; +import { SwapOppositeArrowsIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; +import { useSwapContextSelector } from '@features/swap/context'; import { useSwapFieldsHandler, useSwapSelectTokens, useSwapTokens } from '@features/swap/lib/hooks'; -import { useSwapContextSelector } from '@features/swap/context'; -import { Divider } from '@/features/swap/components/base'; -import { Button, Spacer } from '@components/base'; -import { SwapOppositeArrowsIcon } from '@components/svg/icons'; -import { COLORS } from '@constants/colors'; import { scale } from '@utils'; +import { styles } from './styles'; export const SwapReverseTokens = () => { const { onReverseSelectedTokens } = useSwapSelectTokens(); diff --git a/src/features/swap/components/composite/swap-reverse-tokens/styles.ts b/src/features/swap/components/composite/swap-reverse-tokens/styles.ts index 97f9e1854..83e08d3e3 100644 --- a/src/features/swap/components/composite/swap-reverse-tokens/styles.ts +++ b/src/features/swap/components/composite/swap-reverse-tokens/styles.ts @@ -1,5 +1,5 @@ -import { COLORS } from '@constants/colors'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ wrapper: { diff --git a/src/features/swap/components/composite/token-selector/index.tsx b/src/features/swap/components/composite/token-selector/index.tsx index 59e2f6745..a69701541 100644 --- a/src/features/swap/components/composite/token-selector/index.tsx +++ b/src/features/swap/components/composite/token-selector/index.tsx @@ -1,16 +1,16 @@ import React, { useCallback, useMemo } from 'react'; import { TouchableOpacity, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; -import { useSwapContextSelector } from '@features/swap/context'; -import { SelectedTokensKeys } from '@features/swap/types'; -import { scale } from '@utils'; import { TokenLogo } from '@components/modular'; +import { ArrowBottomFillIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; +import { useSwapContextSelector } from '@features/swap/context'; import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; +import { SelectedTokensKeys } from '@features/swap/types'; import { SwapStringUtils } from '@features/swap/utils'; -import { ArrowBottomFillIcon } from '@components/svg/icons/v2'; +import { scale } from '@utils'; +import { styles } from './styles'; interface TokenSelectorProps { readonly type: SelectedTokensKeys; diff --git a/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx b/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx index 1b1db673c..a20109952 100644 --- a/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx +++ b/src/features/swap/components/modular/bottom-sheet-token-item/index.tsx @@ -7,18 +7,18 @@ import { ViewStyle } from 'react-native'; import { ethers } from 'ethers'; -import { styles } from './styles'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; import { useSwapContextSelector } from '@features/swap/context'; -import { FIELD, SelectedTokensKeys, SwapToken } from '@features/swap/types'; import { useSwapFieldsHandler, useSwapSelectTokens } from '@features/swap/lib/hooks'; +import { FIELD, SelectedTokensKeys, SwapToken } from '@features/swap/types'; import { SwapStringUtils } from '@features/swap/utils'; import { NumberUtils } from '@utils'; +import { styles } from './styles'; interface BottomSheetTokenItemProps { token: ListRenderItemInfo['item']; diff --git a/src/features/swap/components/modular/input-with-token-select/index.tsx b/src/features/swap/components/modular/input-with-token-select/index.tsx index 032b88d52..3f6dd0fc4 100644 --- a/src/features/swap/components/modular/input-with-token-select/index.tsx +++ b/src/features/swap/components/modular/input-with-token-select/index.tsx @@ -1,15 +1,15 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; import { LayoutChangeEvent, Platform, Pressable, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { InputRef, Text } from '@components/base'; import { TextInput } from '@components/base/Input/Input.text'; +import { COLORS } from '@constants/colors'; import { Balance, TokenSelector } from '@features/swap/components/composite'; -import { FIELD, SelectedTokensKeys } from '@features/swap/types'; -import { useSwapFieldsHandler } from '@features/swap/lib/hooks'; import { useSwapContextSelector } from '@features/swap/context'; +import { useSwapFieldsHandler } from '@features/swap/lib/hooks'; +import { FIELD, SelectedTokensKeys } from '@features/swap/types'; import { StringUtils, NumberUtils } from '@utils'; -import { COLORS } from '@constants/colors'; +import { styles } from './styles'; interface InputWithTokenSelectProps { readonly type: SelectedTokensKeys; diff --git a/src/features/swap/components/modular/review-swap-button/index.tsx b/src/features/swap/components/modular/review-swap-button/index.tsx index c195cb4eb..8b1a51e7b 100644 --- a/src/features/swap/components/modular/review-swap-button/index.tsx +++ b/src/features/swap/components/modular/review-swap-button/index.tsx @@ -1,6 +1,8 @@ import React, { useCallback, useMemo, useState } from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { FontFamily } from '@components/base/Text/Text.types'; +import { TextOrSpinner } from '@components/composite'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; import { useSwapContextSelector } from '@features/swap/context'; @@ -10,8 +12,6 @@ import { } from '@features/swap/lib/hooks'; import { buttonActionString } from '@features/swap/utils/button-action.string'; import { cssShadowToNative } from '@utils'; -import { TextOrSpinner } from '@components/composite'; -import { FontFamily } from '@components/base/Text/Text.types'; function buttonStyles(disabled: boolean) { return { diff --git a/src/features/swap/components/modular/submit-swap-actions/index.tsx b/src/features/swap/components/modular/submit-swap-actions/index.tsx index 2e23aa8c4..33eb26d0b 100644 --- a/src/features/swap/components/modular/submit-swap-actions/index.tsx +++ b/src/features/swap/components/modular/submit-swap-actions/index.tsx @@ -1,15 +1,15 @@ import React, { useCallback } from 'react'; import { Alert } from 'react-native'; -import { useSwapContextSelector } from '@features/swap/context'; -import { - useSwapActions, - useSwapBottomSheetHandler -} from '@features/swap/lib/hooks'; import { ApprovalRequiredButton, SwapButton, SwapErrorImpactButton } from '@features/swap/components/base/swap-buttons-list'; +import { useSwapContextSelector } from '@features/swap/context'; +import { + useSwapActions, + useSwapBottomSheetHandler +} from '@features/swap/lib/hooks'; import { AllowanceStatus, BottomSheetStatus } from '@features/swap/types'; import { diff --git a/src/features/swap/components/modular/submit-swap-actions/styles.ts b/src/features/swap/components/modular/submit-swap-actions/styles.ts index 264879ac6..db6f525fa 100644 --- a/src/features/swap/components/modular/submit-swap-actions/styles.ts +++ b/src/features/swap/components/modular/submit-swap-actions/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ row: { diff --git a/src/features/swap/components/modular/token-info-plate/index.tsx b/src/features/swap/components/modular/token-info-plate/index.tsx index 1547caf97..b094c41e3 100644 --- a/src/features/swap/components/modular/token-info-plate/index.tsx +++ b/src/features/swap/components/modular/token-info-plate/index.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useMemo, useState } from 'react'; +import { StyleProp, ViewStyle } from 'react-native'; import { formatEther } from 'ethers/lib/utils'; import { Text, Row } from '@components/base'; +import { COLORS } from '@constants/colors'; import { useSwapContextSelector } from '@features/swap/context'; import { useSwapTokens, useSwapBetterRate } from '@features/swap/lib/hooks'; import { SwapStringUtils, plateVisibility } from '@features/swap/utils'; -import { COLORS } from '@constants/colors'; -import { StyleProp, ViewStyle } from 'react-native'; import { verticalScale } from '@utils'; export const TokenInfoPlate = () => { diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx index 28f815331..af2f85850 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/index.tsx @@ -2,15 +2,15 @@ import React, { useCallback } from 'react'; import { InteractionManager, View } from 'react-native'; import { CommonActions, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { HomeNavigationProp } from '@appTypes'; import { Spacer, Text } from '@components/base'; import { PrimaryButton, SecondaryButton } from '@components/modular'; +import { ErrorIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; import { BottomSheetStatus } from '@features/swap/types'; -import { COLORS } from '@constants/colors'; -import { ErrorIcon } from '@components/svg/icons/v2'; import { cssShadowToNative, verticalScale, _delayNavigation } from '@utils'; +import { styles } from './styles'; export const ErrorSwapView = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts index 755d522ed..73c4d3f79 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/error/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx index e8b65660b..2c631859f 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/render.tsx @@ -1,6 +1,5 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; -import { styles } from '../styles'; import { Spacer } from '@components/base'; import { BottomSheetReviewTokenItem } from '@features/swap/components/base'; import { PreviewInformation } from '@features/swap/components/composite'; @@ -12,8 +11,9 @@ import { import { BottomSheetStatus, FIELD } from '@features/swap/types'; import { isETHtoWrapped, isWrappedToETH } from '@features/swap/utils'; import { scale } from '@utils'; -import { SuccessSwapView } from './success'; +import { styles } from '../styles'; import { ErrorSwapView } from './error'; +import { SuccessSwapView } from './success'; export const RenderBottomSheetStatusView = () => { const { tokensRoute } = useSwapTokens(); diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx index fae8f328c..07a19eac8 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/components/success/index.tsx @@ -2,16 +2,16 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; import { CommonActions, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { HomeNavigationProp } from '@appTypes'; import { Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; +import { SuccessIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { useSwapContextSelector } from '@features/swap/context'; import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; import { BottomSheetStatus } from '@features/swap/types'; -import { COLORS } from '@constants/colors'; -import { SuccessIcon } from '@components/svg/icons/v2'; import { _delayNavigation, verticalScale, cssShadowToNative } from '@utils'; +import { styles } from './styles'; export const SuccessSwapView = () => { const { t } = useTranslation(); diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx b/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx index 80b5cf1c2..5d77e3745 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/index.tsx @@ -1,17 +1,17 @@ import React, { forwardRef, useCallback, useMemo } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; -import { useForwardedRef } from '@hooks'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { CommonActions, useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; +import { HomeNavigationProp } from '@appTypes'; import { Spacer } from '@components/base'; -import { scale, _delayNavigation } from '@utils'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { useSwapContextSelector } from '@features/swap/context'; -import { RenderBottomSheetStatusView } from './components/render'; -import { useTranslation } from 'react-i18next'; import { useSwapBottomSheetHandler } from '@features/swap/lib/hooks'; import { BottomSheetStatus } from '@features/swap/types'; -import { CommonActions, useNavigation } from '@react-navigation/native'; -import { HomeNavigationProp } from '@appTypes'; +import { useForwardedRef } from '@hooks'; +import { scale, _delayNavigation } from '@utils'; +import { RenderBottomSheetStatusView } from './components/render'; +import { styles } from './styles'; export const BottomSheetPreviewSwap = forwardRef( (_, ref) => { diff --git a/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts b/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts index 1f3f63bca..894e20292 100644 --- a/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-preview-swap/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { moderateScale, scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx b/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx index c294d83aa..8986b817e 100644 --- a/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx +++ b/src/features/swap/components/templates/bottom-sheet-tokens-list/index.tsx @@ -1,16 +1,16 @@ import React, { forwardRef, useCallback } from 'react'; import { FlatList, ListRenderItemInfo } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { ethers } from 'ethers'; -import { styles } from './styles'; +import { useTranslation } from 'react-i18next'; import { Spacer } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { useForwardedRef } from '@hooks'; import Config from '@constants/config'; -import { scale } from '@utils'; import { BottomSheetTokenItem } from '@features/swap/components/modular'; -import { FIELD, SelectedTokensKeys, SwapToken } from '@features/swap/types'; import { useSwapAllBalances } from '@features/swap/lib/hooks/use-swap-all-balances'; +import { FIELD, SelectedTokensKeys, SwapToken } from '@features/swap/types'; +import { useForwardedRef } from '@hooks'; +import { scale } from '@utils'; +import { styles } from './styles'; interface BottomSheetTokensListProps { type: SelectedTokensKeys; diff --git a/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts b/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts index 833a2ae1d..5c753db87 100644 --- a/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts +++ b/src/features/swap/components/templates/bottom-sheet-tokens-list/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ heading: { diff --git a/src/features/swap/components/templates/swap-form/index.tsx b/src/features/swap/components/templates/swap-form/index.tsx index b5eacbe61..861d99006 100644 --- a/src/features/swap/components/templates/swap-form/index.tsx +++ b/src/features/swap/components/templates/swap-form/index.tsx @@ -1,16 +1,16 @@ import React from 'react'; import { KeyboardAvoidingView, View } from 'react-native'; -import { styles } from './styles'; -import { KeyboardDismissingView, Spacer } from '@components/base'; -import { FIELD } from '@features/swap/types'; -import { scale, isIos } from '@utils'; +import { SwapReverseTokens } from '@/features/swap/components/composite'; import { InputWithTokenSelect, ReviewSwapButton, TokenInfoPlate } from '@/features/swap/components/modular'; -import { SwapReverseTokens } from '@/features/swap/components/composite'; +import { KeyboardDismissingView, Spacer } from '@components/base'; import { useSwapInterface } from '@features/swap/lib/hooks'; +import { FIELD } from '@features/swap/types'; +import { scale, isIos } from '@utils'; +import { styles } from './styles'; const KEYBOARD_BEHAVIOR = isIos ? 'padding' : 'height'; diff --git a/src/features/swap/context/initials.ts b/src/features/swap/context/initials.ts index b4d4ec436..e4a711560 100644 --- a/src/features/swap/context/initials.ts +++ b/src/features/swap/context/initials.ts @@ -1,10 +1,10 @@ +import { SWAP_SUPPORTED_TOKENS } from '../entities'; import { SelectedTokensAmountState, SelectedTokensState, Settings, UIBottomSheetInformationState } from '../types'; -import { SWAP_SUPPORTED_TOKENS } from '../entities'; export const INITIAL_SLIPPAGE_TOLERANCE = '0.50'; export const INITIAL_DEADLINE = '20'; diff --git a/src/features/swap/context/swap.context.tsx b/src/features/swap/context/swap.context.tsx index 9c0c0c768..de12434cb 100644 --- a/src/features/swap/context/swap.context.tsx +++ b/src/features/swap/context/swap.context.tsx @@ -1,4 +1,12 @@ import { useCallback, useEffect, useRef, useState } from 'react'; +import { ethers } from 'ethers'; +import { + BottomSheetStatus, + FIELD, + SelectedPairsState, + SelectedTokensKeys +} from '@/features/swap/types'; +import { BottomSheetRef } from '@components/composite'; import { createContextSelector } from '@utils'; import { INITIAL_UI_BOTTOM_SHEET_INFORMATION, @@ -6,14 +14,6 @@ import { INITIAL_SELECTED_TOKENS_AMOUNT, INITIAL_SETTINGS } from './initials'; -import { BottomSheetRef } from '@components/composite'; -import { - BottomSheetStatus, - FIELD, - SelectedPairsState, - SelectedTokensKeys -} from '@/features/swap/types'; -import { ethers } from 'ethers'; import { initialBalances } from '../utils/balances'; export const SwapContext = () => { diff --git a/src/features/swap/lib/contracts/allowance.ts b/src/features/swap/lib/contracts/allowance.ts index 19a2c72de..7fb2e473f 100644 --- a/src/features/swap/lib/contracts/allowance.ts +++ b/src/features/swap/lib/contracts/allowance.ts @@ -1,8 +1,8 @@ import { ethers } from 'ethers'; +import Config from '@constants/config'; import { ALLOWANCE } from '@features/swap/lib/abi'; import { AllowanceArgs } from '@features/swap/types'; import { createSigner } from '@features/swap/utils/contracts/instances'; -import Config from '@constants/config'; export async function checkIsApprovalRequired({ address, diff --git a/src/features/swap/lib/contracts/swap.ts b/src/features/swap/lib/contracts/swap.ts index 2822badf7..f80983fa1 100644 --- a/src/features/swap/lib/contracts/swap.ts +++ b/src/features/swap/lib/contracts/swap.ts @@ -1,13 +1,10 @@ import { Wallet, ethers } from 'ethers'; import { formatEther } from 'ethers/lib/utils'; +import { ERC20, TRADE } from '@features/swap/lib/abi'; import { InAmountGetterArgs, OutAmountGetterArgs } from '@features/swap/types/swap'; -import { - createAMBProvider, - createRouterContract -} from '@features/swap/utils/contracts/instances'; import { isNativeWrapped, minimumAmountOut, @@ -17,7 +14,10 @@ import { withMultiHopPath, dexValidators } from '@features/swap/utils'; -import { ERC20, TRADE } from '@features/swap/lib/abi'; +import { + createAMBProvider, + createRouterContract +} from '@features/swap/utils/contracts/instances'; export async function getAmountsOut({ amountToSell, diff --git a/src/features/swap/lib/hooks/use-all-liquidity-pools.ts b/src/features/swap/lib/hooks/use-all-liquidity-pools.ts index 7fce90a26..4b51cbeae 100644 --- a/src/features/swap/lib/hooks/use-all-liquidity-pools.ts +++ b/src/features/swap/lib/hooks/use-all-liquidity-pools.ts @@ -1,13 +1,13 @@ import { useCallback, useEffect } from 'react'; import { ethers } from 'ethers'; +import { useSwapContextSelector } from '@features/swap/context'; import { PAIR } from '@features/swap/lib/abi'; +import { SelectedTokensState } from '@features/swap/types'; +import { wrapNativeAddress } from '@features/swap/utils'; import { createAMBProvider, createFactoryContract } from '@features/swap/utils/contracts/instances'; -import { SelectedTokensState } from '@features/swap/types'; -import { useSwapContextSelector } from '@features/swap/context'; -import { wrapNativeAddress } from '@features/swap/utils'; export function useAllLiquidityPools() { const { setPairs, allPairsRef } = useSwapContextSelector(); diff --git a/src/features/swap/lib/hooks/use-swap-actions.ts b/src/features/swap/lib/hooks/use-swap-actions.ts index 348a4279f..4062c9c1b 100644 --- a/src/features/swap/lib/hooks/use-swap-actions.ts +++ b/src/features/swap/lib/hooks/use-swap-actions.ts @@ -1,16 +1,7 @@ import { useCallback } from 'react'; import { ethers } from 'ethers'; +import { useWalletPrivateKey } from '@entities/wallet'; import { useSwapContextSelector } from '@features/swap/context'; -import { - checkIsApprovalRequired, - increaseAllowance, - swapExactETHForTokens, - swapExactTokensForETH, - swapExactTokensForTokens, - swapMultiHopExactTokensForTokens, - unwrapETH, - wrapETH -} from '../contracts'; import { calculateAllowanceWithProviderFee, isETHtoWrapped, @@ -19,15 +10,23 @@ import { wrapNativeAddress } from '@features/swap/utils'; import { createSigner } from '@features/swap/utils/contracts/instances'; -import { useSwapSettings } from './use-swap-settings'; -import { useSwapTokens } from './use-swap-tokens'; -import { useSwapHelpers } from './use-swap-helpers'; - import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { useWalletPrivateKey } from '@entities/wallet'; +import { + checkIsApprovalRequired, + increaseAllowance, + swapExactETHForTokens, + swapExactTokensForETH, + swapExactTokensForTokens, + swapMultiHopExactTokensForTokens, + unwrapETH, + wrapETH +} from '../contracts'; +import { useSwapHelpers } from './use-swap-helpers'; +import { useSwapSettings } from './use-swap-settings'; +import { useSwapTokens } from './use-swap-tokens'; export function useSwapActions() { const { _extractPrivateKey } = useWalletPrivateKey(); diff --git a/src/features/swap/lib/hooks/use-swap-all-balances.ts b/src/features/swap/lib/hooks/use-swap-all-balances.ts index d6ec318fb..8f302323f 100644 --- a/src/features/swap/lib/hooks/use-swap-all-balances.ts +++ b/src/features/swap/lib/hooks/use-swap-all-balances.ts @@ -1,10 +1,10 @@ import { useCallback } from 'react'; import { ethers } from 'ethers'; import Config from '@constants/config'; -import { useSwapMultiplyBalance } from './use-swap-multiply-balance'; -import { SwapToken } from '@features/swap/types'; import { useSwapContextSelector } from '@features/swap/context'; +import { SwapToken } from '@features/swap/types'; import { initialBalances } from '@features/swap/utils/balances'; +import { useSwapMultiplyBalance } from './use-swap-multiply-balance'; export function useSwapAllBalances() { const { getTokenBalance } = useSwapMultiplyBalance(); diff --git a/src/features/swap/lib/hooks/use-swap-balance.ts b/src/features/swap/lib/hooks/use-swap-balance.ts index 10cac7f5e..df3a80515 100644 --- a/src/features/swap/lib/hooks/use-swap-balance.ts +++ b/src/features/swap/lib/hooks/use-swap-balance.ts @@ -1,9 +1,9 @@ import { useCallback, useState } from 'react'; import { useFocusEffect } from '@react-navigation/native'; import { BigNumber } from 'ethers/lib/ethers'; +import { useWalletStore } from '@entities/wallet'; import { SwapToken } from '@features/swap/types'; import { erc20Contracts } from '@lib/erc20/erc20.contracts'; -import { useWalletStore } from '@entities/wallet'; export function useSwapBalance(token: SwapToken | null) { const { wallet } = useWalletStore(); diff --git a/src/features/swap/lib/hooks/use-swap-better-currency.ts b/src/features/swap/lib/hooks/use-swap-better-currency.ts index 8a4abf870..4b6bacc43 100644 --- a/src/features/swap/lib/hooks/use-swap-better-currency.ts +++ b/src/features/swap/lib/hooks/use-swap-better-currency.ts @@ -1,13 +1,13 @@ import { useCallback } from 'react'; +import { ethers, BigNumber } from 'ethers'; +import { useSwapContextSelector } from '@features/swap/context'; import { addresses, extractArrayOfMiddleMultiHopAddresses, dexValidators } from '@features/swap/utils'; import { getObjectKeyByValue } from '@utils'; -import { ethers, BigNumber } from 'ethers'; import { getAmountsOut, getAmountsIn } from '../contracts'; -import { useSwapContextSelector } from '@features/swap/context'; import { useSwapSettings } from './use-swap-settings'; export function useSwapBetterCurrency() { diff --git a/src/features/swap/lib/hooks/use-swap-better-rate.ts b/src/features/swap/lib/hooks/use-swap-better-rate.ts index 57a88128e..b6a4a6143 100644 --- a/src/features/swap/lib/hooks/use-swap-better-rate.ts +++ b/src/features/swap/lib/hooks/use-swap-better-rate.ts @@ -1,10 +1,10 @@ import { useCallback } from 'react'; import { BigNumber } from 'ethers'; -import { useSwapBetterCurrency } from './use-swap-better-currency'; import { extractArrayOfMiddleMultiHopAddresses, isMultiHopSwapAvailable } from '@features/swap/utils'; +import { useSwapBetterCurrency } from './use-swap-better-currency'; import { useSwapSettings } from './use-swap-settings'; const BASE_RATE_AMOUNT_TO_SELL = '1'; diff --git a/src/features/swap/lib/hooks/use-swap-fields-handler.ts b/src/features/swap/lib/hooks/use-swap-fields-handler.ts index 0a714a4bb..178d3cc9b 100644 --- a/src/features/swap/lib/hooks/use-swap-fields-handler.ts +++ b/src/features/swap/lib/hooks/use-swap-fields-handler.ts @@ -1,11 +1,11 @@ import { useCallback, useMemo } from 'react'; import { formatEther } from 'ethers/lib/utils'; import debounce from 'lodash/debounce'; -import { useSwapHelpers } from './use-swap-helpers'; import { useSwapContextSelector } from '@features/swap/context'; import { FIELD, SelectedTokensKeys } from '@features/swap/types'; import { SwapStringUtils } from '@features/swap/utils'; import { useSwapBetterCurrency } from './use-swap-better-currency'; +import { useSwapHelpers } from './use-swap-helpers'; export function useSwapFieldsHandler() { const { diff --git a/src/features/swap/lib/hooks/use-swap-interface.ts b/src/features/swap/lib/hooks/use-swap-interface.ts index 4dba94c9b..7a9382c24 100644 --- a/src/features/swap/lib/hooks/use-swap-interface.ts +++ b/src/features/swap/lib/hooks/use-swap-interface.ts @@ -2,7 +2,7 @@ import { useCallback, useMemo } from 'react'; import { Keyboard } from 'react-native'; import { ethers } from 'ethers'; import { useSwapContextSelector } from '@features/swap/context'; -import { useSwapPriceImpact } from './use-swap-price-impact'; +import { AllowanceStatus } from '@features/swap/types'; import { SwapStringUtils, isETHtoWrapped, @@ -11,12 +11,12 @@ import { minimumAmountOut, realizedLPFee } from '@features/swap/utils'; -import { useSwapBottomSheetHandler } from './use-swap-bottom-sheet-handler'; import { useSwapActions } from './use-swap-actions'; +import { useSwapBottomSheetHandler } from './use-swap-bottom-sheet-handler'; +import { useSwapHelpers } from './use-swap-helpers'; +import { useSwapPriceImpact } from './use-swap-price-impact'; import { useSwapSettings } from './use-swap-settings'; import { useSwapTokens } from './use-swap-tokens'; -import { useSwapHelpers } from './use-swap-helpers'; -import { AllowanceStatus } from '@features/swap/types'; export function useSwapInterface() { const { setUiBottomSheetInformation, _refExactGetter } = diff --git a/src/features/swap/lib/hooks/use-swap-multiply-balance.ts b/src/features/swap/lib/hooks/use-swap-multiply-balance.ts index 4af46963f..6a65fe53a 100644 --- a/src/features/swap/lib/hooks/use-swap-multiply-balance.ts +++ b/src/features/swap/lib/hooks/use-swap-multiply-balance.ts @@ -1,7 +1,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; +import { useWalletStore } from '@entities/wallet'; import { useSwapContextSelector } from '@features/swap/context'; import { MultiplyBalancesStateType, SwapToken } from '@features/swap/types'; -import { useWalletStore } from '@entities/wallet'; import { erc20Contracts } from '@lib/erc20/erc20.contracts'; export function useSwapMultiplyBalance() { diff --git a/src/features/swap/lib/hooks/use-swap-price-impact.ts b/src/features/swap/lib/hooks/use-swap-price-impact.ts index 9ef7edbfd..ff25e366b 100644 --- a/src/features/swap/lib/hooks/use-swap-price-impact.ts +++ b/src/features/swap/lib/hooks/use-swap-price-impact.ts @@ -1,5 +1,8 @@ -import { ethers } from 'ethers'; import { useCallback } from 'react'; +import { ethers } from 'ethers'; +import { useSwapContextSelector } from '@features/swap/context'; +import { getAmountsOut } from '@features/swap/lib/contracts'; +import { FIELD, SwapToken } from '@features/swap/types'; import { subtractRealizedLPFeeFromInput, multiHopCumulativeImpact, @@ -7,13 +10,10 @@ import { isMultiHopSwapAvailable, extractArrayOfMiddleMultiHopAddresses } from '@features/swap/utils'; -import { getAmountsOut } from '@features/swap/lib/contracts'; -import { useSwapContextSelector } from '@features/swap/context'; import { useAllLiquidityPools } from './use-all-liquidity-pools'; -import { FIELD, SwapToken } from '@features/swap/types'; +import { useSwapHelpers } from './use-swap-helpers'; import { useSwapSettings } from './use-swap-settings'; import { useSwapTokens } from './use-swap-tokens'; -import { useSwapHelpers } from './use-swap-helpers'; export function useSwapPriceImpact() { const { isExactInRef } = useSwapContextSelector(); diff --git a/src/features/swap/types/balance.ts b/src/features/swap/types/balance.ts index 9dfb42249..9b37895d4 100644 --- a/src/features/swap/types/balance.ts +++ b/src/features/swap/types/balance.ts @@ -1,6 +1,6 @@ import { ethers } from 'ethers'; -import { SwapToken } from './token'; import { FIELD } from './field'; +import { SwapToken } from './token'; export interface BalanceGettersArgs { token: SwapToken; diff --git a/src/features/swap/utils/__tests__/wrap-native-address.spec.ts b/src/features/swap/utils/__tests__/wrap-native-address.spec.ts index 52ff76fee..535be5352 100644 --- a/src/features/swap/utils/__tests__/wrap-native-address.spec.ts +++ b/src/features/swap/utils/__tests__/wrap-native-address.spec.ts @@ -1,6 +1,6 @@ import { ethers } from 'ethers'; -import { isNativeWrapped, wrapNativeAddress } from '../wrap-native-address'; import { environment } from '@utils'; +import { isNativeWrapped, wrapNativeAddress } from '../wrap-native-address'; const isTestnet = environment === 'testnet'; diff --git a/src/features/swap/utils/balances.ts b/src/features/swap/utils/balances.ts index 5720e3232..acbcb73a5 100644 --- a/src/features/swap/utils/balances.ts +++ b/src/features/swap/utils/balances.ts @@ -1,5 +1,5 @@ -import Config from '@constants/config'; import { ethers } from 'ethers'; +import Config from '@constants/config'; import { SwapToken } from '../types'; const tokens = Config.SWAP_TOKENS as SwapToken[]; diff --git a/src/features/swap/utils/index.ts b/src/features/swap/utils/index.ts index 89005d7cb..b493493cb 100644 --- a/src/features/swap/utils/index.ts +++ b/src/features/swap/utils/index.ts @@ -8,4 +8,3 @@ export * from './token-plate'; export * from './timestamp'; export { dexValidators } from './validators'; export { SwapStringUtils } from './transformers'; -export { addresses } from './wrap-native-address'; diff --git a/src/features/swap/utils/multi-route.ts b/src/features/swap/utils/multi-route.ts index b15364659..9774502a6 100644 --- a/src/features/swap/utils/multi-route.ts +++ b/src/features/swap/utils/multi-route.ts @@ -1,8 +1,8 @@ -import { environment } from '@utils/environment'; import { SWAP_SUPPORTED_TOKENS, TOKEN_ADDRESSES } from '@features/swap/entities'; +import { environment } from '@utils/environment'; import { wrapNativeAddress } from './wrap-native-address'; export const addresses = TOKEN_ADDRESSES[environment]; diff --git a/src/features/swap/utils/wrap-native-address.ts b/src/features/swap/utils/wrap-native-address.ts index eb45ea773..ceb01bdf2 100644 --- a/src/features/swap/utils/wrap-native-address.ts +++ b/src/features/swap/utils/wrap-native-address.ts @@ -1,10 +1,7 @@ +import { ethers } from 'ethers'; import Config from '@constants/config'; import { SwapToken } from '@features/swap/types'; -import { ethers } from 'ethers'; -import { TOKEN_ADDRESSES } from '@features/swap/entities'; -import { environment } from '@utils/environment'; - -export const addresses = TOKEN_ADDRESSES[environment]; +import { addresses } from './multi-route'; export function isNativeWrapped(path: string[]) { const wrappedPath = Config.SWAP_TOKENS.find( diff --git a/src/features/wallet-assets/components/base/account-action-item/index.tsx b/src/features/wallet-assets/components/base/account-action-item/index.tsx index 6768f9244..9d69ba8f5 100644 --- a/src/features/wallet-assets/components/base/account-action-item/index.tsx +++ b/src/features/wallet-assets/components/base/account-action-item/index.tsx @@ -1,8 +1,8 @@ import React, { ReactNode } from 'react'; import { Pressable } from 'react-native'; -import { styles } from './styles'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { styles } from './styles'; interface AccountActionItemProps { action: () => void; diff --git a/src/features/wallet-assets/components/base/account-action-item/styles.ts b/src/features/wallet-assets/components/base/account-action-item/styles.ts index d248ea719..b0ce172c3 100644 --- a/src/features/wallet-assets/components/base/account-action-item/styles.ts +++ b/src/features/wallet-assets/components/base/account-action-item/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { verticalScale, scale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-assets/components/modular/assets-account-actions-list/index.tsx b/src/features/wallet-assets/components/modular/assets-account-actions-list/index.tsx index e35950692..1527221f6 100644 --- a/src/features/wallet-assets/components/modular/assets-account-actions-list/index.tsx +++ b/src/features/wallet-assets/components/modular/assets-account-actions-list/index.tsx @@ -1,23 +1,23 @@ import React, { useCallback, useRef } from 'react'; +import { View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import { styles } from './styles'; +import { useTranslation } from 'react-i18next'; +import { HomeNavigationProp } from '@appTypes'; import { Row } from '@components/base'; -import { AccountActionItem } from '../../base'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { QRCodeIcon } from '@components/svg/icons/v2'; import { SendAccountActionIcon } from '@components/svg/icons/v2/actions'; +import { ReceiveFunds } from '@components/templates'; +import { COLORS } from '@constants/colors'; +import { useSendFundsStore } from '@features/send-funds'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { COLORS } from '@constants/colors'; import { Token } from '@models'; -import { HomeNavigationProp } from '@appTypes'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { ReceiveFunds } from '@components/templates'; -import { View } from 'react-native'; -import { useTranslation } from 'react-i18next'; -import { useSendFundsStore } from '@features/send-funds'; +import { styles } from './styles'; +import { AccountActionItem } from '../../base'; interface AssetsAccountActionsListProps { address: string; diff --git a/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts b/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts index 1da194413..af32e74bb 100644 --- a/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts +++ b/src/features/wallet-assets/components/modular/assets-account-actions-list/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-assets/components/templates/header/index.tsx b/src/features/wallet-assets/components/templates/header/index.tsx index e1f7c4fac..1b7f283d2 100644 --- a/src/features/wallet-assets/components/templates/header/index.tsx +++ b/src/features/wallet-assets/components/templates/header/index.tsx @@ -8,31 +8,31 @@ import Animated, { useDerivedValue, withSpring } from 'react-native-reanimated'; -import { styles } from './styles'; -import { Header } from '@components/composite'; +import { HomeNavigationProp } from '@appTypes/navigation'; import { Button, Spacer, Text } from '@components/base'; +import { Header } from '@components/composite'; import { BarcodeScannerIcon, NotificationBellIcon } from '@components/svg/icons/v2'; -import { useNotificationsQuery } from '@hooks'; import { COLORS } from '@constants/colors'; +import { useWalletStore } from '@entities/wallet'; +import { + useBarcode, + useNewNotificationsCount +} from '@features/wallet-assets/lib/hooks'; import { WalletSessionsLabel } from '@features/wallet-connect/components/composite'; import { useWalletConnectContextSelector } from '@features/wallet-connect/lib/hooks'; +import { useNotificationsQuery } from '@hooks'; import { Cache, CacheKey } from '@lib/cache'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { HomeNavigationProp } from '@appTypes/navigation'; import { ExplorerAccount } from '@models'; import { NumberUtils, StringUtils, scale } from '@utils'; -import { - useBarcode, - useNewNotificationsCount -} from '@features/wallet-assets/lib/hooks'; -import { useWalletStore } from '@entities/wallet'; +import { styles } from './styles'; interface HomeHeaderProps { account: ExplorerAccount | null; diff --git a/src/features/wallet-assets/components/templates/header/styles.ts b/src/features/wallet-assets/components/templates/header/styles.ts index 2026ed396..d337e012c 100644 --- a/src/features/wallet-assets/components/templates/header/styles.ts +++ b/src/features/wallet-assets/components/templates/header/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, moderateScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, moderateScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-assets/lib/hooks/use-barcode.ts b/src/features/wallet-assets/lib/hooks/use-barcode.ts index 5d3227ec2..accd9491d 100644 --- a/src/features/wallet-assets/lib/hooks/use-barcode.ts +++ b/src/features/wallet-assets/lib/hooks/use-barcode.ts @@ -1,20 +1,20 @@ import { useCallback, useRef } from 'react'; import { Alert, InteractionManager } from 'react-native'; -import { useTranslation } from 'react-i18next'; +import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; import { CompositeNavigationProp, useNavigation } from '@react-navigation/native'; +import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { useTranslation } from 'react-i18next'; import { HomeParamsList, RootStackParamsList, TabsParamsList } from '@appTypes'; import { ethereumAddressRegex, walletConnectWsURL } from '@constants/regex'; -import { walletKit } from '@features/wallet-connect/lib/wc.core'; -import { CONNECT_VIEW_STEPS } from '@features/wallet-connect/types'; import { useHandleBottomSheetActions, useWalletConnectContextSelector } from '@features/wallet-connect/lib/hooks'; -import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; -import { NativeStackNavigationProp } from '@react-navigation/native-stack'; +import { walletKit } from '@features/wallet-connect/lib/wc.core'; +import { CONNECT_VIEW_STEPS } from '@features/wallet-connect/types'; type Navigation = CompositeNavigationProp< BottomTabNavigationProp, diff --git a/src/features/wallet-assets/lib/hooks/use-new-notifications-count.ts b/src/features/wallet-assets/lib/hooks/use-new-notifications-count.ts index 1444b1bb2..86a6e3c09 100644 --- a/src/features/wallet-assets/lib/hooks/use-new-notifications-count.ts +++ b/src/features/wallet-assets/lib/hooks/use-new-notifications-count.ts @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react'; +import { AirDAOEventType } from '@appTypes'; import { useNotificationsQuery } from '@hooks'; -import { Cache, CacheKey } from '@lib/cache'; import useAppFocus from '@hooks/useAppFocused'; -import { AirDAOEventType } from '@appTypes'; import { AirDAOEventDispatcher } from '@lib'; +import { Cache, CacheKey } from '@lib/cache'; export function useNewNotificationsCount(): number { const [newNotificationsCount, setNewNotificationsCount] = useState(0); diff --git a/src/features/wallet-assets/utils/balance-reducer.ts b/src/features/wallet-assets/utils/balance-reducer.ts index 99c411cd2..c33e397c1 100644 --- a/src/features/wallet-assets/utils/balance-reducer.ts +++ b/src/features/wallet-assets/utils/balance-reducer.ts @@ -1,5 +1,5 @@ -import { Token } from '@models'; import { ethers } from 'ethers'; +import { Token } from '@models'; export function balanceReducer(tokens: Token[], ambBalanceWei: string) { return tokens.reduce( diff --git a/src/features/wallet-connect/components/base/wallet-session-item/index.tsx b/src/features/wallet-connect/components/base/wallet-session-item/index.tsx index 0b80d7a19..1e01d3a55 100644 --- a/src/features/wallet-connect/components/base/wallet-session-item/index.tsx +++ b/src/features/wallet-connect/components/base/wallet-session-item/index.tsx @@ -1,16 +1,16 @@ import React, { useCallback, useState } from 'react'; import { Pressable } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { SessionTypes } from '@walletconnect/types'; import { getSdkError } from '@walletconnect/utils'; -import { styles } from './styles'; +import { useTranslation } from 'react-i18next'; import { Row, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { walletKit } from '@features/wallet-connect/utils'; import { useHandleBottomSheetActions, useWalletConnectContextSelector } from '@features/wallet-connect/lib/hooks'; +import { walletKit } from '@features/wallet-connect/utils'; +import { styles } from './styles'; interface WalletSessionItemProps { connection: SessionTypes.Struct; diff --git a/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx b/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx index bacfd4fd6..b47ba2bba 100644 --- a/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-approval-view/index.tsx @@ -2,31 +2,31 @@ import React, { useCallback, useMemo, useState } from 'react'; import { View } from 'react-native'; import { getSdkError, buildApprovedNamespaces } from '@walletconnect/utils'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Spacer, Spinner, Text } from '@components/base'; -import { - useWalletConnectContextSelector, - useHandleBottomSheetActions -} from '@features/wallet-connect/lib/hooks'; -import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils'; import { PrimaryButton, SecondaryButton, Toast, ToastType } from '@components/modular'; +import { COLORS } from '@constants/colors'; +import { useWalletStore } from '@entities/wallet'; +import { + useWalletConnectContextSelector, + useHandleBottomSheetActions +} from '@features/wallet-connect/lib/hooks'; +import { + CONNECT_VIEW_STEPS, + EIP155_SIGNING_METHODS +} from '@features/wallet-connect/types'; import { EIP155_CHAINS, extractHttpsPath, extractTrailingSlash, walletKit } from '@features/wallet-connect/utils'; -import { - CONNECT_VIEW_STEPS, - EIP155_SIGNING_METHODS -} from '@features/wallet-connect/types'; -import { useWalletStore } from '@entities/wallet'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; export const WalletConnectApprovalView = () => { const { t } = useTranslation(); diff --git a/src/features/wallet-connect/components/composite/wallet-connection-failed-view/index.tsx b/src/features/wallet-connect/components/composite/wallet-connection-failed-view/index.tsx index 875ef46f3..a2c08dcde 100644 --- a/src/features/wallet-connect/components/composite/wallet-connection-failed-view/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-connection-failed-view/index.tsx @@ -1,15 +1,15 @@ import React, { useCallback, useMemo } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { SecondaryButton } from '@components/modular'; import { Text } from '@components/base'; +import { SecondaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { useWalletConnectContextSelector, useHandleBottomSheetActions } from '@features/wallet-connect/lib/hooks'; -import { COLORS } from '@constants/colors'; import { CONNECT_VIEW_STEPS } from '@features/wallet-connect/types'; +import { styles } from './styles'; export const WalletConnectionFailedView = () => { const { t } = useTranslation(); diff --git a/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/index.tsx b/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/index.tsx index ebca5afae..980ea896a 100644 --- a/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-connection-wrong-chain-view/index.tsx @@ -1,14 +1,14 @@ import React, { useCallback } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; -import { SecondaryButton } from '@components/modular'; import { Text } from '@components/base'; +import { SecondaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { useHandleBottomSheetActions, useWalletConnectContextSelector } from '@features/wallet-connect/lib/hooks'; -import { COLORS } from '@constants/colors'; import { CONNECT_VIEW_STEPS } from '@features/wallet-connect/types'; +import { styles } from './styles'; export const WalletConnectionWrongChainView = () => { const { setWalletConnectStep } = useWalletConnectContextSelector(); diff --git a/src/features/wallet-connect/components/composite/wallet-sessions-label/index.tsx b/src/features/wallet-connect/components/composite/wallet-sessions-label/index.tsx index 90f59ec46..9c88c057d 100644 --- a/src/features/wallet-connect/components/composite/wallet-sessions-label/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-sessions-label/index.tsx @@ -1,13 +1,13 @@ import React, { useCallback } from 'react'; import { Pressable } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; import { ConnectionChainsIcon } from '@components/svg/icons/v2'; import { useWalletConnectContextSelector, useHandleBottomSheetActions } from '@features/wallet-connect/lib/hooks'; +import { styles } from './styles'; export const WalletSessionsLabel = () => { const { t } = useTranslation(); diff --git a/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx b/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx index 5977b6a20..ef61a72b6 100644 --- a/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx +++ b/src/features/wallet-connect/components/composite/wallet-sessions-list/index.tsx @@ -8,8 +8,8 @@ import { } from 'react-native'; import { SessionTypes } from '@walletconnect/types'; import { useWalletConnectContextSelector } from '@features/wallet-connect/lib/hooks'; -import { WalletSessionItem } from '../../base'; import { scale } from '@utils'; +import { WalletSessionItem } from '../../base'; export const WalletSessionsList = () => { const { activeSessions } = useWalletConnectContextSelector(); diff --git a/src/features/wallet-connect/components/templates/wallet-connect-modal/index.tsx b/src/features/wallet-connect/components/templates/wallet-connect-modal/index.tsx index f45bb79f0..0701910c1 100644 --- a/src/features/wallet-connect/components/templates/wallet-connect-modal/index.tsx +++ b/src/features/wallet-connect/components/templates/wallet-connect-modal/index.tsx @@ -1,14 +1,14 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; import { BottomSheet } from '@components/composite'; +import { WalletConnectIcon } from '@components/svg/icons'; +import { FailedIcon } from '@components/svg/icons/v2'; import { useWalletConnectContextSelector, useWalletKitEventsManager } from '@features/wallet-connect/lib/hooks'; -import { WalletConnectIcon } from '@components/svg/icons'; +import { styles } from './styles'; import { RenderModalViewByStep } from '../../modular'; -import { FailedIcon } from '@components/svg/icons/v2'; export const WalletConnectModal = () => { const { diff --git a/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts b/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts index 99b3b4ef0..0c569297c 100644 --- a/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts +++ b/src/features/wallet-connect/components/templates/wallet-connect-modal/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ bottomSheet: { diff --git a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx index 27f8ec6cc..0c2cf5151 100644 --- a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx +++ b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/index.tsx @@ -1,17 +1,17 @@ import React from 'react'; import { Pressable, View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { BottomSheet } from '@components/composite'; import { Row, Spacer, Text } from '@components/base'; +import { BottomSheet } from '@components/composite'; +import { CloseCircleIcon } from '@components/svg/icons/v2'; +import { COLORS } from '@constants/colors'; import { useWalletConnectContextSelector, useHandleBottomSheetActions } from '@features/wallet-connect/lib/hooks'; -import { COLORS } from '@constants/colors'; -import { CloseCircleIcon } from '@components/svg/icons/v2'; -import { WalletSessionsList } from '../../composite'; import { verticalScale } from '@utils'; +import { styles } from './styles'; +import { WalletSessionsList } from '../../composite'; export const WalletSessionsBottomSheet = () => { const { t } = useTranslation(); diff --git a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts index c4694f27a..82ad7e065 100644 --- a/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts +++ b/src/features/wallet-connect/components/templates/wallet-session-bottom-sheet/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/features/wallet-connect/context/wallet-connect.context.ts b/src/features/wallet-connect/context/wallet-connect.context.ts index e9f0df17d..dcbaa92fc 100644 --- a/src/features/wallet-connect/context/wallet-connect.context.ts +++ b/src/features/wallet-connect/context/wallet-connect.context.ts @@ -1,12 +1,12 @@ import { useCallback, useRef, useState } from 'react'; -import { createContextSelector } from '@utils'; import { SessionTypes } from '@walletconnect/types'; +import { BottomSheetRef } from '@components/composite'; +import { createContextSelector } from '@utils'; import { CONNECT_VIEW_STEPS, Proposal, WalletConnectViewValues } from '../types'; -import { BottomSheetRef } from '@components/composite'; type ProposalState = Proposal | null; diff --git a/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts b/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts index bc9b6d007..87307a29c 100644 --- a/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts +++ b/src/features/wallet-connect/lib/hooks/use-wallet-kit-events-manager.ts @@ -1,8 +1,8 @@ import { useCallback, useEffect } from 'react'; import { InteractionManager } from 'react-native'; -import { supportedChains, walletKit } from '@features/wallet-connect/utils'; +import { AirDAOEventType } from '@appTypes'; import { Toast, ToastType } from '@components/modular'; -import { useWalletConnectContextSelector } from './use-wallet-connect-context'; +import Config from '@constants/config'; import { CONNECT_VIEW_STEPS, SessionDeleteEvent, @@ -10,11 +10,11 @@ import { WALLET_CLIENT_EVENTS, WALLET_CORE_EVENTS } from '@features/wallet-connect/types'; -import { useHandleBottomSheetActions } from './use-handle-bottom-sheet-actions'; +import { supportedChains, walletKit } from '@features/wallet-connect/utils'; import { AirDAOEventDispatcher } from '@lib'; -import { AirDAOEventType } from '@appTypes'; -import Config from '@constants/config'; import { delay } from '@utils'; +import { useHandleBottomSheetActions } from './use-handle-bottom-sheet-actions'; +import { useWalletConnectContextSelector } from './use-wallet-connect-context'; export function useWalletKitEventsManager(isWalletKitInitiated: boolean) { const { onShowWalletConnectBottomSheet } = useHandleBottomSheetActions(); diff --git a/src/features/wallet-connect/lib/wc.core.ts b/src/features/wallet-connect/lib/wc.core.ts index 87620f763..f50b273ca 100644 --- a/src/features/wallet-connect/lib/wc.core.ts +++ b/src/features/wallet-connect/lib/wc.core.ts @@ -1,7 +1,7 @@ import { WalletKit, IWalletKit } from '@reown/walletkit'; import { Core } from '@walletconnect/core'; -import { getMetadata } from '../utils/misc/metadata'; import Constants from 'expo-constants'; +import { getMetadata } from '../utils/misc/metadata'; export let walletKit: IWalletKit; diff --git a/src/features/wallet-connect/utils/__tests__/helpers.test.ts b/src/features/wallet-connect/utils/__tests__/helpers.test.ts index 5ce2782a1..e93d5b86e 100644 --- a/src/features/wallet-connect/utils/__tests__/helpers.test.ts +++ b/src/features/wallet-connect/utils/__tests__/helpers.test.ts @@ -1,5 +1,5 @@ -import { supportedChains } from '../helpers'; import Config from '@constants/config'; +import { supportedChains } from '../helpers'; jest.mock('ethers', () => ({ ethers: { diff --git a/src/hooks/cache/useNotificationSettings.ts b/src/hooks/cache/useNotificationSettings.ts index 407ff7470..24fed9712 100644 --- a/src/hooks/cache/useNotificationSettings.ts +++ b/src/hooks/cache/useNotificationSettings.ts @@ -1,8 +1,8 @@ +import { useQuery } from '@tanstack/react-query'; import { API } from '@api/api'; -import { QueryResponse } from '@appTypes/QueryResponse'; import { NotificationSettings } from '@appTypes/notification'; +import { QueryResponse } from '@appTypes/QueryResponse'; import { DefaultNotificationSettings } from '@constants/variables'; -import { useQuery } from '@tanstack/react-query'; import { Cache, CacheKey } from '@lib/cache'; export const useNotificationSettings = diff --git a/src/hooks/cache/useWatchlist.ts b/src/hooks/cache/useWatchlist.ts index 0a5035992..404ef4afb 100644 --- a/src/hooks/cache/useWatchlist.ts +++ b/src/hooks/cache/useWatchlist.ts @@ -1,14 +1,13 @@ import { useMemo } from 'react'; -import { useAddressesActions } from '@features/addresses'; -import { useAddressesStore } from '@entities/addresses'; import { API } from '@api/api'; -import { ExplorerAccount } from '@models/Explorer'; -import { AddressUtils } from '@utils'; - +import { useAddressesStore } from '@entities/addresses'; +import { useAddressesActions } from '@features/addresses'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { ExplorerAccount } from '@models/Explorer'; +import { AddressUtils } from '@utils'; export const useWatchlist = () => { const { allAddresses } = useAddressesStore(); diff --git a/src/hooks/database/useWalletByHash.ts b/src/hooks/database/useWalletByHash.ts index c08b4da72..31b78c106 100644 --- a/src/hooks/database/useWalletByHash.ts +++ b/src/hooks/database/useWalletByHash.ts @@ -1,5 +1,5 @@ -import { useQuery } from '@tanstack/react-query'; import { Q } from '@nozbe/watermelondb'; +import { useQuery } from '@tanstack/react-query'; import { DatabaseTable, QueryResponse } from '@appTypes'; import { Database, WalletDBModel } from '@database'; diff --git a/src/hooks/query/useAMBPrice.ts b/src/hooks/query/useAMBPrice.ts index 25c6a1105..e8e700d31 100644 --- a/src/hooks/query/useAMBPrice.ts +++ b/src/hooks/query/useAMBPrice.ts @@ -1,13 +1,13 @@ import { useEffect } from 'react'; import { useQuery } from '@tanstack/react-query'; -import { QueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; -import { AMBToken, AMBTokenDTO } from '@models/index'; import { AirDAOEventType, AirDAONotificationReceiveEventPayload } from '@appTypes'; +import { QueryResponse } from '@appTypes/QueryResponse'; import { AirDAOEventDispatcher } from '@lib'; +import { AMBToken, AMBTokenDTO } from '@models/index'; export function useAMBPrice(): QueryResponse { const { data, isLoading, isRefetching, error, refetch } = diff --git a/src/hooks/query/useAMBPriceHistorical.ts b/src/hooks/query/useAMBPriceHistorical.ts index 96028e3f6..c4c87b3ab 100644 --- a/src/hooks/query/useAMBPriceHistorical.ts +++ b/src/hooks/query/useAMBPriceHistorical.ts @@ -1,7 +1,7 @@ +import { useQuery } from '@tanstack/react-query'; import { API } from '@api/api'; import { PriceSnapshotInterval, QueryResponse } from '@appTypes'; import { AMBToken } from '@models'; -import { useQuery } from '@tanstack/react-query'; export function useAMBPriceHistorical( interval: PriceSnapshotInterval diff --git a/src/hooks/query/useAmbrosusStakingPools.ts b/src/hooks/query/useAmbrosusStakingPools.ts index 62898ff32..b64d72897 100644 --- a/src/hooks/query/useAmbrosusStakingPools.ts +++ b/src/hooks/query/useAmbrosusStakingPools.ts @@ -1,6 +1,6 @@ +import { useQuery } from '@tanstack/react-query'; import { API } from '@api/api'; import { StakingPool, StakingPoolDTO } from '@models'; -import { useQuery } from '@tanstack/react-query'; import { TokenUtils } from '@utils'; export function useAmbrosusStakingPools() { diff --git a/src/hooks/query/useBalanceOfAddress.ts b/src/hooks/query/useBalanceOfAddress.ts index fc3eed9c7..075e07d2d 100644 --- a/src/hooks/query/useBalanceOfAddress.ts +++ b/src/hooks/query/useBalanceOfAddress.ts @@ -1,12 +1,12 @@ import { useEffect } from 'react'; import { useQuery } from '@tanstack/react-query'; -import { QueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; import { AirDAOEventType, AirDAOFundsSentFromAppEventPayload, AirDAONotificationReceiveEventPayload } from '@appTypes'; +import { QueryResponse } from '@appTypes/QueryResponse'; import { AirDAOEventDispatcher } from '@lib'; export function useBalanceOfAddress(address: string): QueryResponse { diff --git a/src/hooks/query/useBridgeHistory.tsx b/src/hooks/query/useBridgeHistory.tsx index 81d002d99..f77a17873 100644 --- a/src/hooks/query/useBridgeHistory.tsx +++ b/src/hooks/query/useBridgeHistory.tsx @@ -1,8 +1,8 @@ import { useQuery } from '@tanstack/react-query'; -import type { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; -import { QueryResponse } from '@appTypes'; import { API } from '@api/api'; +import { QueryResponse } from '@appTypes'; import { useWalletStore } from '@entities/wallet'; +import type { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; export function useBridgeHistory(): QueryResponse< BridgeTransactionHistoryDTO[] diff --git a/src/hooks/query/useCurrencyRate.ts b/src/hooks/query/useCurrencyRate.ts index b5d6dae7f..136d3721c 100644 --- a/src/hooks/query/useCurrencyRate.ts +++ b/src/hooks/query/useCurrencyRate.ts @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react'; -import { useAMBPrice } from './useAMBPrice'; -import { useAmbrosusStakingPools } from './useAmbrosusStakingPools'; import { CryptoCurrencyCode } from '@appTypes'; import { TOKEN_ADDRESSES } from '@constants/variables'; import { useAirbondPrice } from './useAirbondPrice'; +import { useAMBPrice } from './useAMBPrice'; +import { useAmbrosusStakingPools } from './useAmbrosusStakingPools'; export const useCurrencyRate = ( symbol: CryptoCurrencyCode | string = CryptoCurrencyCode.AMB diff --git a/src/hooks/query/useERC20Balance.ts b/src/hooks/query/useERC20Balance.ts index e740d9ed5..d6aa7a6ae 100644 --- a/src/hooks/query/useERC20Balance.ts +++ b/src/hooks/query/useERC20Balance.ts @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { erc20Contracts } from '@lib/erc20/erc20.contracts'; import { useWalletStore } from '@entities/wallet'; +import { erc20Contracts } from '@lib/erc20/erc20.contracts'; /** * A custom React Query hook to fetch ERC20 token balance. diff --git a/src/hooks/query/useEstimatedTransferFee.ts b/src/hooks/query/useEstimatedTransferFee.ts index 57c6b8d64..32e2108c7 100644 --- a/src/hooks/query/useEstimatedTransferFee.ts +++ b/src/hooks/query/useEstimatedTransferFee.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useState } from 'react'; -import { TransactionUtils } from '@utils'; import { Token } from '@models'; +import { TransactionUtils } from '@utils'; export const useEstimatedTransferFee = ( token: Token, diff --git a/src/hooks/query/useExplorerAccountFromHash.ts b/src/hooks/query/useExplorerAccountFromHash.ts index f89af7a7d..204f711e5 100644 --- a/src/hooks/query/useExplorerAccountFromHash.ts +++ b/src/hooks/query/useExplorerAccountFromHash.ts @@ -1,6 +1,6 @@ import { QueryResponse } from '@appTypes'; -import { ExplorerAccount } from '@models'; import { useAccountByWalletHash } from '@hooks/database'; +import { ExplorerAccount } from '@models'; import { useBalanceOfAddress } from './useBalanceOfAddress'; export const useExplorerAccountFromHash = ( diff --git a/src/hooks/query/useExplorerAccounts.ts b/src/hooks/query/useExplorerAccounts.ts index 86856e3df..ea123bcc0 100644 --- a/src/hooks/query/useExplorerAccounts.ts +++ b/src/hooks/query/useExplorerAccounts.ts @@ -1,10 +1,10 @@ import { useInfiniteQuery } from '@tanstack/react-query'; -import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; -import { ExplorerAccountDTO } from '@models/index'; +import { PaginatedResponseBody } from '@appTypes/Pagination'; +import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; import { ExplorerAccount } from '@models/Explorer'; +import { ExplorerAccountDTO } from '@models/index'; import { SearchSort } from '@screens/Settings/screens/Explore/Search.types'; -import { PaginatedResponseBody } from '@appTypes/Pagination'; const LIMIT = 20; diff --git a/src/hooks/query/useExplorerInfo.ts b/src/hooks/query/useExplorerInfo.ts index efb811d5a..da6926e55 100644 --- a/src/hooks/query/useExplorerInfo.ts +++ b/src/hooks/query/useExplorerInfo.ts @@ -1,8 +1,8 @@ import { useQuery } from '@tanstack/react-query'; -import { QueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; -import { ExplorerInfoDTO } from '@models/index'; +import { QueryResponse } from '@appTypes/QueryResponse'; import { ExplorerInfo } from '@models/Explorer'; +import { ExplorerInfoDTO } from '@models/index'; export function useExplorerInfo(): QueryResponse { const { data, isLoading, error, refetch } = useQuery( diff --git a/src/hooks/query/useNFTInfo.ts b/src/hooks/query/useNFTInfo.ts index fe32af193..cca0ab2fa 100644 --- a/src/hooks/query/useNFTInfo.ts +++ b/src/hooks/query/useNFTInfo.ts @@ -1,6 +1,6 @@ -import { QueryResponse } from '@appTypes/QueryResponse'; -import { nftContractService } from '@api/nft-contract-service'; import { useQuery } from '@tanstack/react-query'; +import { nftContractService } from '@api/nft-contract-service'; +import { QueryResponse } from '@appTypes/QueryResponse'; interface NftTokenModel { tokenId: string; diff --git a/src/hooks/query/useNotifications.ts b/src/hooks/query/useNotifications.ts index 8d0ba2946..ec195a515 100644 --- a/src/hooks/query/useNotifications.ts +++ b/src/hooks/query/useNotifications.ts @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { QueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; +import { QueryResponse } from '@appTypes/QueryResponse'; import { Notification, WatcherInfoDTO } from '@models/index'; export function useNotificationsQuery(): QueryResponse { diff --git a/src/hooks/query/useSearchAccount.ts b/src/hooks/query/useSearchAccount.ts index bed02ae69..180f594aa 100644 --- a/src/hooks/query/useSearchAccount.ts +++ b/src/hooks/query/useSearchAccount.ts @@ -1,8 +1,8 @@ import { useQuery } from '@tanstack/react-query'; -import { QueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; -import { ExplorerAccountDTO } from '@models/index'; +import { QueryResponse } from '@appTypes/QueryResponse'; import { ExplorerAccount } from '@models/Explorer'; +import { ExplorerAccountDTO } from '@models/index'; export function useSearchAccount( address: string, diff --git a/src/hooks/query/useTokensAndTransactions.ts b/src/hooks/query/useTokensAndTransactions.ts index 8ce7dbfae..e92eace47 100644 --- a/src/hooks/query/useTokensAndTransactions.ts +++ b/src/hooks/query/useTokensAndTransactions.ts @@ -1,15 +1,15 @@ +import { useEffect } from 'react'; import { useInfiniteQuery } from '@tanstack/react-query'; -import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; -import { Token, Transaction } from '@models'; -import { PaginatedResponseBody } from '@appTypes/Pagination'; -import { TransactionDTO } from '@models/dtos/TransactionDTO'; -import { useEffect } from 'react'; -import { AirDAOEventDispatcher } from '@lib'; import { AirDAOEventType, AirDAONotificationReceiveEventPayload } from '@appTypes'; +import { PaginatedResponseBody } from '@appTypes/Pagination'; +import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; +import { AirDAOEventDispatcher } from '@lib'; +import { Token, Transaction } from '@models'; +import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { TokenUtils } from '@utils'; export function useTokensAndTransactions( diff --git a/src/hooks/query/useTransactionDetails.ts b/src/hooks/query/useTransactionDetails.ts index a1fad86a4..38296994c 100644 --- a/src/hooks/query/useTransactionDetails.ts +++ b/src/hooks/query/useTransactionDetails.ts @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query'; -import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { explorerService } from '@api/explorer-service'; import { Transaction } from '@models'; +import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { TokenUtils } from '@utils'; export function useTransactionDetails(hash: string, enabled = true) { diff --git a/src/hooks/query/useTransactionsOfAddress.ts b/src/hooks/query/useTransactionsOfAddress.ts index ab17c7b03..1fd5f752a 100644 --- a/src/hooks/query/useTransactionsOfAddress.ts +++ b/src/hooks/query/useTransactionsOfAddress.ts @@ -1,10 +1,10 @@ import { useInfiniteQuery } from '@tanstack/react-query'; -import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; -import { Transaction } from '@models/index'; -import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { TransactionType } from '@appTypes/enums'; import { PaginatedResponseBody } from '@appTypes/Pagination'; +import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; +import { TransactionDTO } from '@models/dtos/TransactionDTO'; +import { Transaction } from '@models/index'; import { TokenUtils } from '@utils'; export function useTransactionsOfAccount( diff --git a/src/hooks/query/useTransactionsOfToken.ts b/src/hooks/query/useTransactionsOfToken.ts index 1d495e969..fa0e44433 100644 --- a/src/hooks/query/useTransactionsOfToken.ts +++ b/src/hooks/query/useTransactionsOfToken.ts @@ -1,9 +1,9 @@ import { useInfiniteQuery } from '@tanstack/react-query'; -import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; import { API } from '@api/api'; import { PaginatedResponseBody } from '@appTypes/Pagination'; -import { TransactionDTO } from '@models/dtos/TransactionDTO'; +import { PaginatedQueryResponse } from '@appTypes/QueryResponse'; import { Transaction } from '@models'; +import { TransactionDTO } from '@models/dtos/TransactionDTO'; import { TokenUtils } from '@utils'; export function useTransactionsOfToken( diff --git a/src/hooks/useAppFocused.ts b/src/hooks/useAppFocused.ts index acaced406..ef929ff5f 100644 --- a/src/hooks/useAppFocused.ts +++ b/src/hooks/useAppFocused.ts @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import { useIsFocused } from '@react-navigation/native'; import { useAppState } from './useAppState'; -const useAppFocus = () => { +export const useAppFocus = () => { const [isFocused, setIsFocused] = useState(false); const navigationIsFocused = useIsFocused(); const { appState } = useAppState(); @@ -13,5 +13,3 @@ const useAppFocus = () => { return isFocused; }; - -export default useAppFocus; diff --git a/src/hooks/useAppInit.ts b/src/hooks/useAppInit.ts index 3b8b40ad6..5989abde5 100644 --- a/src/hooks/useAppInit.ts +++ b/src/hooks/useAppInit.ts @@ -1,16 +1,14 @@ import { useEffect, useState } from 'react'; import * as Font from 'expo-font'; import * as SplashScreen from 'expo-splash-screen'; -import { NotificationService, PermissionService } from '@lib'; +import { API } from '@api/api'; import { CacheableAccount, CacheableAccountList, DatabaseTable, Permission } from '@appTypes'; -import { API } from '@api/api'; -import { Cache, CacheKey } from '@lib/cache'; import { AccountDBModel, Database, @@ -18,6 +16,8 @@ import { PublicAddressListDB } from '@database'; import { usePasscodeInit } from '@features/passcode/lib/hooks/use-passcode-init'; +import { NotificationService, PermissionService } from '@lib'; +import { Cache, CacheKey } from '@lib/cache'; import { useListsAndAddressesFetcher } from './useListsAndAddressesFetcher'; /* eslint camelcase: 0 */ diff --git a/src/hooks/useBarcodeScanner.ts b/src/hooks/useBarcodeScanner.ts index 04ed444e6..0df6af752 100644 --- a/src/hooks/useBarcodeScanner.ts +++ b/src/hooks/useBarcodeScanner.ts @@ -7,8 +7,8 @@ import { ViewStyle } from 'react-native'; import { Camera, PermissionStatus } from 'expo-camera'; -import { PermissionService } from '@lib'; import { Permission } from '@appTypes'; +import { PermissionService } from '@lib'; export function useBarcodeScanner() { const { width, height } = useWindowDimensions(); diff --git a/src/hooks/useListsAndAddressesFetcher.ts b/src/hooks/useListsAndAddressesFetcher.ts index 7c6f7f28d..b983976dc 100644 --- a/src/hooks/useListsAndAddressesFetcher.ts +++ b/src/hooks/useListsAndAddressesFetcher.ts @@ -1,7 +1,7 @@ -import { useListActions } from '@features/lists'; import { useFetchAddresses } from '@entities/addresses'; import { useFetchLists } from '@entities/lists/lib/hooks/use-fetch-lists'; import { useListNotifications } from '@features/addresses/lib/hooks/use-list-notifications'; +import { useListActions } from '@features/lists'; export function useListsAndAddressesFetcher() { const { onCreateList } = useListActions(); diff --git a/src/hooks/usePasscodeEntryRevealer.ts b/src/hooks/usePasscodeEntryRevealer.ts index 531d7ac52..296707e3c 100644 --- a/src/hooks/usePasscodeEntryRevealer.ts +++ b/src/hooks/usePasscodeEntryRevealer.ts @@ -2,10 +2,10 @@ import { useCallback, useEffect, useRef } from 'react'; import { AppState, AppStateStatus } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { AirDAOEventType, RootNavigationProp } from '@appTypes'; -import { Cache, CacheKey } from '@lib/cache'; -import { AirDAOEventDispatcher } from '@lib'; import { useCurrentRoute } from '@contexts'; import { usePasscodeStore } from '@features/passcode/model'; +import { AirDAOEventDispatcher } from '@lib'; +import { Cache, CacheKey } from '@lib/cache'; const APP_HIDDEN_STATES = ['inactive', 'background']; const REQUIRE_DELAY_IN_SECONDS = 2 * 60 * 1000; diff --git a/src/hooks/usePreventGoingBack.ts b/src/hooks/usePreventGoingBack.ts index 0b146a6e3..4814df8a3 100644 --- a/src/hooks/usePreventGoingBack.ts +++ b/src/hooks/usePreventGoingBack.ts @@ -1,5 +1,5 @@ -import { useNavigation } from '@react-navigation/native'; import { useEffect } from 'react'; +import { useNavigation } from '@react-navigation/native'; export const usePreventGoingBack = ( canGoBack: React.MutableRefObject, diff --git a/src/hooks/useSettingsWalletActions.ts b/src/hooks/useSettingsWalletActions.ts index 991fbcb4c..526c815e6 100644 --- a/src/hooks/useSettingsWalletActions.ts +++ b/src/hooks/useSettingsWalletActions.ts @@ -1,8 +1,8 @@ import { CommonActions, useNavigation } from '@react-navigation/native'; -import { DatabaseTable, SettingsTabNavigationProp } from '@appTypes'; -import { WalletUtils } from '@utils'; import { API } from '@api/api'; +import { DatabaseTable, SettingsTabNavigationProp } from '@appTypes'; import { Database, WalletDBModel } from '@database'; +import { WalletUtils } from '@utils'; export function useSettingsWalletActions() { const navigation: SettingsTabNavigationProp = useNavigation(); diff --git a/src/hooks/useSupportedBiometrics.ts b/src/hooks/useSupportedBiometrics.ts index b6cf50372..09453ed1c 100644 --- a/src/hooks/useSupportedBiometrics.ts +++ b/src/hooks/useSupportedBiometrics.ts @@ -1,5 +1,5 @@ -import * as LocalAuth from 'expo-local-authentication'; import { useEffect, useState } from 'react'; +import * as LocalAuth from 'expo-local-authentication'; export function useSupportedBiometrics() { const [supportedBiometrics, setSupportedBiometrics] = useState< diff --git a/src/hooks/useUpdateScreenData.ts b/src/hooks/useUpdateScreenData.ts index 20438fc2e..6d30036e6 100644 --- a/src/hooks/useUpdateScreenData.ts +++ b/src/hooks/useUpdateScreenData.ts @@ -1,5 +1,5 @@ -import { useAppState } from '@hooks/useAppState'; import { useEffect } from 'react'; +import { useAppState } from '@hooks/useAppState'; const APP_STATES = { inactive: 'inactive', diff --git a/src/lib/UID/index.ts b/src/lib/UID/index.ts index 132d6bb89..684e4c7a3 100644 --- a/src/lib/UID/index.ts +++ b/src/lib/UID/index.ts @@ -1,5 +1,5 @@ -import { getModel, getUniqueId } from 'react-native-device-info'; import { keccak256, toUtf8Bytes } from 'ethers/lib/utils'; +import { getModel, getUniqueId } from 'react-native-device-info'; const UID = async () => { const getUID = async () => diff --git a/src/lib/bridgeSDK/bridgeFunctions/calculateGazFee.ts b/src/lib/bridgeSDK/bridgeFunctions/calculateGazFee.ts index 4c6a864ec..f29e90fc8 100644 --- a/src/lib/bridgeSDK/bridgeFunctions/calculateGazFee.ts +++ b/src/lib/bridgeSDK/bridgeFunctions/calculateGazFee.ts @@ -1,9 +1,9 @@ -import { CalculateGasFee } from '@lib/bridgeSDK/models/types'; +import { ethers } from 'ethers'; import Config from '@constants/config'; +import { currentProvider } from '@lib'; +import { CalculateGasFee } from '@lib/bridgeSDK/models/types'; import { Cache, CacheKey } from '@lib/cache'; -import { ethers } from 'ethers'; import { MySdk } from '../sdk/index'; -import { currentProvider } from '@lib'; export async function bridgeWithdraw({ bridgeConfig, diff --git a/src/lib/bridgeSDK/bridgeFunctions/getAllBridgeTokenBalance.ts b/src/lib/bridgeSDK/bridgeFunctions/getAllBridgeTokenBalance.ts index 289741241..11f3678b1 100644 --- a/src/lib/bridgeSDK/bridgeFunctions/getAllBridgeTokenBalance.ts +++ b/src/lib/bridgeSDK/bridgeFunctions/getAllBridgeTokenBalance.ts @@ -1,5 +1,5 @@ -import { getTokenBridgeBalance } from './getTokenBridgeBalance'; import { Token } from '@lib/bridgeSDK/models/types'; +import { getTokenBridgeBalance } from './getTokenBridgeBalance'; export const getAllBridgeTokenBalance = async ( pairs: Token[][], diff --git a/src/lib/bridgeSDK/bridgeFunctions/getBridgeFeeData.ts b/src/lib/bridgeSDK/bridgeFunctions/getBridgeFeeData.ts index 1785734e4..ebd0bcfd0 100644 --- a/src/lib/bridgeSDK/bridgeFunctions/getBridgeFeeData.ts +++ b/src/lib/bridgeSDK/bridgeFunctions/getBridgeFeeData.ts @@ -1,5 +1,5 @@ -import { GetFeeDataModel } from '@lib/bridgeSDK/models/types'; import Config from '@constants/config'; +import { GetFeeDataModel } from '@lib/bridgeSDK/models/types'; import { MySdk } from '../sdk/index'; export async function getBridgeFeeData({ diff --git a/src/lib/bridgeSDK/bridgeFunctions/getBridgePars.ts b/src/lib/bridgeSDK/bridgeFunctions/getBridgePars.ts index cc29937a3..441f8f60c 100644 --- a/src/lib/bridgeSDK/bridgeFunctions/getBridgePars.ts +++ b/src/lib/bridgeSDK/bridgeFunctions/getBridgePars.ts @@ -1,8 +1,8 @@ -import { Config as BridgeConfig, Network } from '@lib/bridgeSDK/models/types'; import Config from '@constants/config'; +import { getAllBridgeTokenBalance } from '@lib/bridgeSDK/bridgeFunctions/getAllBridgeTokenBalance'; +import { Config as BridgeConfig, Network } from '@lib/bridgeSDK/models/types'; import { MySdk } from '../sdk'; import { currentProvider } from './currentProveder'; -import { getAllBridgeTokenBalance } from '@lib/bridgeSDK/bridgeFunctions/getAllBridgeTokenBalance'; export async function getBridgePairs({ from, diff --git a/src/lib/bridgeSDK/bridgeFunctions/getTokenBridgeBalance.ts b/src/lib/bridgeSDK/bridgeFunctions/getTokenBridgeBalance.ts index d10049e56..97cc2c770 100644 --- a/src/lib/bridgeSDK/bridgeFunctions/getTokenBridgeBalance.ts +++ b/src/lib/bridgeSDK/bridgeFunctions/getTokenBridgeBalance.ts @@ -1,7 +1,7 @@ import { ethers } from 'ethers'; +import { getBalanceABI } from '@lib/bridgeSDK/abi'; import { GetBalanceModel } from '@lib/bridgeSDK/models/types'; import { currentProvider } from './currentProveder'; -import { getBalanceABI } from '@lib/bridgeSDK/abi'; export async function getTokenBridgeBalance({ from, diff --git a/src/lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction.ts b/src/lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction.ts index b5a685d51..01e1d97da 100644 --- a/src/lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction.ts +++ b/src/lib/bridgeSDK/bridgeFunctions/parseBridgeTransaction.ts @@ -1,5 +1,5 @@ -import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; import { formatUnits } from 'ethers/lib/utils'; +import { BridgeTransactionHistoryDTO } from '@models/dtos/Bridge'; export const parseBridgeTransaction = ( transaction: BridgeTransactionHistoryDTO diff --git a/src/lib/bridgeSDK/models/types.ts b/src/lib/bridgeSDK/models/types.ts index a1cb2e62c..ef416d663 100644 --- a/src/lib/bridgeSDK/models/types.ts +++ b/src/lib/bridgeSDK/models/types.ts @@ -1,6 +1,6 @@ import { BigNumber, BigNumberish, ethers } from 'ethers'; -import { AccountDBModel } from '@database'; import { CryptoCurrencyCode } from '@appTypes'; +import { AccountDBModel } from '@database'; export type BridgeDataState = { from: string; diff --git a/src/lib/bridgeSDK/sdk/config.ts b/src/lib/bridgeSDK/sdk/config.ts index bd96e93cf..1fd276603 100644 --- a/src/lib/bridgeSDK/sdk/config.ts +++ b/src/lib/bridgeSDK/sdk/config.ts @@ -1,3 +1,4 @@ +import { isAddress } from 'ethers/lib/utils'; import { BridgeAddresses, BridgeNetwork, @@ -6,7 +7,6 @@ import { Network, Token } from '../models/types'; -import { isAddress } from 'ethers/lib/utils'; export function formatBridgeAddresses(config: Config): BridgeAddresses { const result: BridgeAddresses = {}; diff --git a/src/lib/bridgeSDK/sdk/index.ts b/src/lib/bridgeSDK/sdk/index.ts index 7140a06b2..bac9ffcee 100644 --- a/src/lib/bridgeSDK/sdk/index.ts +++ b/src/lib/bridgeSDK/sdk/index.ts @@ -1,8 +1,8 @@ -import { BridgeSDK } from '@lib/bridgeSDK/sdk/sdk'; -import { Network, Token } from '@lib/bridgeSDK/models/types'; import { CryptoCurrencyCode } from '@appTypes'; -import { bridgeTokensPairFilter } from '@lib/bridgeSDK/bridgeFunctions/bridgeTokensPairFilter'; import Config from '@constants/config'; +import { bridgeTokensPairFilter } from '@lib/bridgeSDK/bridgeFunctions/bridgeTokensPairFilter'; +import { Network, Token } from '@lib/bridgeSDK/models/types'; +import { BridgeSDK } from '@lib/bridgeSDK/sdk/sdk'; export class MySdk extends BridgeSDK { getPairs( diff --git a/src/lib/bridgeSDK/sdk/sdk.ts b/src/lib/bridgeSDK/sdk/sdk.ts index 84adcddd5..83ec29682 100644 --- a/src/lib/bridgeSDK/sdk/sdk.ts +++ b/src/lib/bridgeSDK/sdk/sdk.ts @@ -1,4 +1,7 @@ import { BigNumberish, ethers } from 'ethers'; +import { formatBridgeAddresses, getPairs } from './config'; +import { getFeeData, setAllowance, withdraw } from './withdraws'; +import { bridgeContract } from '../abi/sdkABI'; import { BridgeAddresses, Config, @@ -7,9 +10,6 @@ import { Network, Token } from '../models/types'; -import { formatBridgeAddresses, getPairs } from './config'; -import { getFeeData, setAllowance, withdraw } from './withdraws'; -import { bridgeContract } from '../abi/sdkABI'; export class BridgeSDK { config: Config; diff --git a/src/lib/bridgeSDK/sdk/withdraws.ts b/src/lib/bridgeSDK/sdk/withdraws.ts index 81d6e3eb4..b952a5410 100644 --- a/src/lib/bridgeSDK/sdk/withdraws.ts +++ b/src/lib/bridgeSDK/sdk/withdraws.ts @@ -1,6 +1,6 @@ -import { FeeData, RelayUrls, RunWithdrawModel, Token } from '../models/types'; import { BigNumber, BigNumberish, ethers } from 'ethers'; import { erc20Contract } from '../abi/sdkABI'; +import { FeeData, RelayUrls, RunWithdrawModel, Token } from '../models/types'; export async function getFeeData( tokenFrom: Token, diff --git a/src/lib/crypto/AirDAOKeysForRef.ts b/src/lib/crypto/AirDAOKeysForRef.ts index a52cc62cd..997a27465 100644 --- a/src/lib/crypto/AirDAOKeysForRef.ts +++ b/src/lib/crypto/AirDAOKeysForRef.ts @@ -1,8 +1,8 @@ import { ethers } from 'ethers'; -import AirDAOKeys from './AirDAOKeys'; -import { AddressUtils } from '@utils/address'; -import AddressProcessor from '@lib/crypto/AddressProcessor'; import Config from '@constants/config'; +import AddressProcessor from '@lib/crypto/AddressProcessor'; +import { AddressUtils } from '@utils/address'; +import AirDAOKeys from './AirDAOKeys'; const CACHE: { [key: string]: any } = {}; diff --git a/src/lib/crypto/AirDAOKeysStorage.ts b/src/lib/crypto/AirDAOKeysStorage.ts index f9ad0694f..154e69eb6 100644 --- a/src/lib/crypto/AirDAOKeysStorage.ts +++ b/src/lib/crypto/AirDAOKeysStorage.ts @@ -266,5 +266,4 @@ class AirDAOKeysStorage { } } -const singleAirDAOStorage = new AirDAOKeysStorage(); -export default singleAirDAOStorage; +export const singleAirDAOStorage = new AirDAOKeysStorage(); diff --git a/src/lib/crypto/TransferDispatcher.ts b/src/lib/crypto/TransferDispatcher.ts index 6f037b468..c62eeb77e 100644 --- a/src/lib/crypto/TransferDispatcher.ts +++ b/src/lib/crypto/TransferDispatcher.ts @@ -1,7 +1,7 @@ import Web3 from 'web3'; import { TransactionConfig } from 'web3-core'; -import erc20 from './erc20'; import Config from '@constants/config'; +import erc20 from './erc20'; class TransferDispatcher { private web3: Web3; diff --git a/src/lib/event-dispatcher.ts b/src/lib/event-dispatcher.ts index 850c68447..a5d4edaca 100644 --- a/src/lib/event-dispatcher.ts +++ b/src/lib/event-dispatcher.ts @@ -1,5 +1,5 @@ -import { AirDAOEventPayload, AirDAOEventType } from '@appTypes'; import { DeviceEventEmitter } from 'react-native'; +import { AirDAOEventPayload, AirDAOEventType } from '@appTypes'; export class AirDAOEventDispatcher { static dispatch(type: AirDAOEventType, payload: AirDAOEventPayload) { diff --git a/src/lib/firebaseEventAnalytics/sendFirebaseEvent.ts b/src/lib/firebaseEventAnalytics/sendFirebaseEvent.ts index f7553f823..7f8085ae5 100644 --- a/src/lib/firebaseEventAnalytics/sendFirebaseEvent.ts +++ b/src/lib/firebaseEventAnalytics/sendFirebaseEvent.ts @@ -1,5 +1,5 @@ -import { CustomAppEvents } from '@lib/firebaseEventAnalytics/constants/CustomAppEvents'; import analytics from '@react-native-firebase/analytics'; +import { CustomAppEvents } from '@lib/firebaseEventAnalytics/constants/CustomAppEvents'; export const sendFirebaseEvent = (event: CustomAppEvents, params?: object) => { if (!event || __DEV__) return; diff --git a/src/lib/index.ts b/src/lib/index.ts index a12ff09b4..f4e302eac 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,6 +1,6 @@ export * from './notification'; export * from './event-dispatcher'; -export * from './crypto/AirDAOKeysStorage'; +export { singleAirDAOStorage } from './crypto/AirDAOKeysStorage'; export * from './bridgeSDK'; export { default as PermissionService } from './permission'; export { default as UID } from './UID'; diff --git a/src/lib/notification.ts b/src/lib/notification.ts index 9c6109acb..cd2b213f4 100644 --- a/src/lib/notification.ts +++ b/src/lib/notification.ts @@ -3,11 +3,11 @@ import messaging, { } from '@react-native-firebase/messaging'; // import { NotificationType } from '@models'; // import { DatabaseService } from './database'; -import { AirDAOEventDispatcher } from './event-dispatcher'; import { AirDAOEventType, AirDAONotificationReceiveEventPayload } from '@appTypes'; +import { AirDAOEventDispatcher } from './event-dispatcher'; export class NotificationService { constructor(listener?: (newToken: string) => unknown) { diff --git a/src/lib/permission.ts b/src/lib/permission.ts index 2befbc195..64a74efe4 100644 --- a/src/lib/permission.ts +++ b/src/lib/permission.ts @@ -1,5 +1,5 @@ -import { Camera } from 'expo-camera'; import { Alert, Linking } from 'react-native'; +import { Camera } from 'expo-camera'; import * as Notifications from 'expo-notifications'; import { Permission, PermissionOptions } from '@appTypes'; diff --git a/src/lib/tests/cache.test.tsx b/src/lib/tests/cache.test.tsx index 83c911ff3..2c733a60b 100644 --- a/src/lib/tests/cache.test.tsx +++ b/src/lib/tests/cache.test.tsx @@ -1,6 +1,6 @@ -import { Cache, CacheKey } from '../cache'; import * as SecureStore from 'expo-secure-store'; import { DefaultNotificationSettings } from '@constants/variables'; +import { Cache, CacheKey } from '../cache'; jest.mock('expo-secure-store'); diff --git a/src/models/Bridge.ts b/src/models/Bridge.ts index de501fd98..92c243f36 100644 --- a/src/models/Bridge.ts +++ b/src/models/Bridge.ts @@ -1,10 +1,10 @@ +import { BigNumber, BigNumberish, ethers } from 'ethers'; +import { CryptoCurrencyCode } from '@appTypes'; import { FeeData, Network as BridgeNetwork, Token } from '@lib/bridgeSDK/models/types'; -import { BigNumber, BigNumberish, ethers } from 'ethers'; -import { CryptoCurrencyCode } from '@appTypes'; export interface Bridge { bridges: Bridges; diff --git a/src/models/Explorer.ts b/src/models/Explorer.ts index 905df5a2d..d1d40f086 100644 --- a/src/models/Explorer.ts +++ b/src/models/Explorer.ts @@ -1,6 +1,6 @@ import { CacheableAccount, ExplorerAccountType } from '@appTypes'; -import { ExplorerAccountDTO, ExplorerInfoDTO } from './dtos'; import { AccountDBModel } from '@database'; +import { ExplorerAccountDTO, ExplorerInfoDTO } from './dtos'; export class ExplorerInfo { totalAddresses: number; diff --git a/src/models/StakingPool.ts b/src/models/StakingPool.ts index 276959763..6ed155480 100644 --- a/src/models/StakingPool.ts +++ b/src/models/StakingPool.ts @@ -1,5 +1,5 @@ -import { Token } from './Token'; import { StakingPoolDTO } from './dtos'; +import { Token } from './Token'; export class StakingPool { token: Omit; diff --git a/src/models/Token.ts b/src/models/Token.ts index b7adf84fa..7ec32c29a 100644 --- a/src/models/Token.ts +++ b/src/models/Token.ts @@ -1,8 +1,8 @@ -import { CryptoCurrencyCode } from '@appTypes'; -import { TokenDTO } from './dtos'; import { formatUnits } from 'ethers/lib/utils'; +import { CryptoCurrencyCode } from '@appTypes'; import { AMB_DECIMALS } from '@constants/variables'; import { getTokenNameFromDatabase } from '@utils/get-token-name-from-db'; +import { TokenDTO } from './dtos'; export class Token { address: string; diff --git a/src/models/Transaction.ts b/src/models/Transaction.ts index 83cdf3da3..095141e57 100644 --- a/src/models/Transaction.ts +++ b/src/models/Transaction.ts @@ -1,6 +1,6 @@ +import { CryptoCurrencyCode } from '@appTypes'; import { TransactionType } from '@appTypes/enums'; import { TransactionDTO } from './dtos/TransactionDTO'; -import { CryptoCurrencyCode } from '@appTypes'; export interface TransactionTokenInfo { address: string; diff --git a/src/navigation/NavigationContainer.tsx b/src/navigation/NavigationContainer.tsx index 244c5e1ba..c598481c9 100644 --- a/src/navigation/NavigationContainer.tsx +++ b/src/navigation/NavigationContainer.tsx @@ -3,11 +3,11 @@ import { NavigationContainer, NavigationContainerRef } from '@react-navigation/native'; -import { RootStack } from './stacks/RootStack'; +import { RootStackParamsList } from '@appTypes'; +import { StatusBar } from '@components/templates'; import { navTheme } from '@constants/navTheme'; import { NavigationProvider } from '@contexts/Navigation'; -import { StatusBar } from '@components/templates'; -import { RootStackParamsList } from '@appTypes'; +import { RootStack } from './stacks/RootStack'; const Navigation = () => { const [currentRoute, setCurrentRoute] = useState('AppInit'); diff --git a/src/navigation/components/TabBar/index.tsx b/src/navigation/components/TabBar/index.tsx index aa5ec918e..7a68a5458 100644 --- a/src/navigation/components/TabBar/index.tsx +++ b/src/navigation/components/TabBar/index.tsx @@ -1,20 +1,20 @@ import React, { useLayoutEffect, useMemo, useState } from 'react'; import { Pressable, StyleProp, ViewStyle } from 'react-native'; import { BottomTabBarProps } from '@react-navigation/bottom-tabs'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useFocusEffect } from '@react-navigation/native'; import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated'; -import { useFocusEffect } from '@react-navigation/native'; -import { styles } from './styles'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useCurrentRoute } from '@contexts/Navigation/Navigation.context'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { scale, verticalScale, NavigationUtils } from '@utils'; import { MAIN_TABS } from '@navigation/constants'; -import { useCurrentRoute } from '@contexts/Navigation/Navigation.context'; +import { scale, verticalScale, NavigationUtils } from '@utils'; +import { styles } from './styles'; type LabelType = | 'Settings' diff --git a/src/navigation/constants.tsx b/src/navigation/constants.tsx index 744372631..37a850d77 100644 --- a/src/navigation/constants.tsx +++ b/src/navigation/constants.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import { ProductsActiveIcon, ProductsInactiveIcon, @@ -7,7 +8,6 @@ import { WalletsInactiveIcon } from '@components/svg/icons/v2/bottom-tabs-navigation'; import { COLORS } from '@constants/colors'; -import React from 'react'; export const MAIN_TABS = { Wallets: { diff --git a/src/navigation/stacks/AppInit.tsx b/src/navigation/stacks/AppInit.tsx index bc3c591eb..c08988cf7 100644 --- a/src/navigation/stacks/AppInit.tsx +++ b/src/navigation/stacks/AppInit.tsx @@ -1,15 +1,15 @@ import React, { useCallback, useEffect } from 'react'; import { Image, StyleSheet, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; +import { RootNavigationProp } from '@appTypes'; import { Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils'; -import { RootNavigationProp } from '@appTypes'; +import { usePasscodeStore } from '@features/passcode'; +import { useInitializeWalletKit } from '@features/wallet-connect/lib/hooks'; import { useAllWallets } from '@hooks/database'; import { Cache, CacheKey } from '@lib/cache'; -import { useInitializeWalletKit } from '@features/wallet-connect/lib/hooks'; -import { usePasscodeStore } from '@features/passcode'; +import { scale, verticalScale } from '@utils'; const AppInitialization = () => { const { t } = useTranslation(); diff --git a/src/navigation/stacks/CommonStack.tsx b/src/navigation/stacks/CommonStack.tsx index 32e51d9bc..290428d30 100644 --- a/src/navigation/stacks/CommonStack.tsx +++ b/src/navigation/stacks/CommonStack.tsx @@ -1,16 +1,16 @@ import React from 'react'; -import { - NativeStackNavigationEventMap, - NativeStackNavigationOptions -} from '@react-navigation/native-stack'; import { ParamListBase, StackNavigationState, TypedNavigator } from '@react-navigation/native'; +import { + NativeStackNavigationEventMap, + NativeStackNavigationOptions +} from '@react-navigation/native-stack'; import { NativeStackNavigatorProps } from '@react-navigation/native-stack/lib/typescript/src/types'; -import { AddressDetails } from '@screens/Address'; import { HomeParamsList, PortfolioParamsPortfolio } from '@appTypes'; +import { AddressDetails } from '@screens/Address'; import { Explore } from '@screens/Settings/screens/Explore'; export const getCommonStack = ( diff --git a/src/navigation/stacks/RootStack.tsx b/src/navigation/stacks/RootStack.tsx index e28a49f58..564341322 100644 --- a/src/navigation/stacks/RootStack.tsx +++ b/src/navigation/stacks/RootStack.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; -import { TabsNavigator } from './TabsNavigator'; -import AppInitialization from './AppInit'; import { RootStackParamsList } from '@appTypes'; +import { useCurrenciesQuery } from '@entities/currencies/lib'; +import { BarcodeScannerScreen } from '@screens/BarcodeScanner'; import { NoWalletScreen } from '@screens/NoWallet'; import { PasscodeEntry } from '@screens/PasscodeEntry'; -import { BarcodeScannerScreen } from '@screens/BarcodeScanner'; -import { useCurrenciesQuery } from '@entities/currencies/lib'; +import AppInitialization from './AppInit'; +import { TabsNavigator } from './TabsNavigator'; export const RootStack = () => { useCurrenciesQuery(); diff --git a/src/navigation/stacks/Tabs/HomeStack.tsx b/src/navigation/stacks/Tabs/HomeStack.tsx index 9f924bae9..9eefd140b 100644 --- a/src/navigation/stacks/Tabs/HomeStack.tsx +++ b/src/navigation/stacks/Tabs/HomeStack.tsx @@ -1,29 +1,29 @@ import React from 'react'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; -import { HomeScreen } from '@screens/Wallets'; +import { HomeParamsList } from '@appTypes/navigation/wallets'; +import { + WalletConnectModal, + WalletSessionsBottomSheet +} from '@features/wallet-connect/components/templates'; import { AMBMarket } from '@screens/AMBMarket'; -import { Notifications } from '@screens/Notifications'; import { AssetScreen } from '@screens/Asset'; +import { Bridge, BridgeTransferError } from '@screens/Bridge'; +import { BridgeHistory } from '@screens/BridgeHistory'; +import { KosmosScreen } from '@screens/Kosmos'; +import { KosmosMarketScreen } from '@screens/Kosmos/screens'; +import { NFTScreen } from '@screens/NFTScreen'; +import { Notifications } from '@screens/Notifications'; import { SendFunds } from '@screens/SendFunds'; -import { StakingPoolsScreen } from '@screens/StakingPools'; -import { HomeParamsList } from '@appTypes/navigation/wallets'; -import { getCommonStack } from '../CommonStack'; import { StakingPoolScreen } from '@screens/StakingPool'; import { StakeErrorScreen, StakeSuccessScreen } from '@screens/StakingPool/screens'; -import { NFTScreen } from '@screens/NFTScreen'; -import { Bridge, BridgeTransferError } from '@screens/Bridge'; -import { BridgeHistory } from '@screens/BridgeHistory'; +import { StakingPoolsScreen } from '@screens/StakingPools'; import { SwapScreen } from '@screens/Swap'; import { SwapSettingsScreen } from '@screens/Swap/screens'; -import { KosmosScreen } from '@screens/Kosmos'; -import { KosmosMarketScreen } from '@screens/Kosmos/screens'; -import { - WalletConnectModal, - WalletSessionsBottomSheet -} from '@features/wallet-connect/components/templates'; +import { HomeScreen } from '@screens/Wallets'; +import { getCommonStack } from '../CommonStack'; const Stack = createNativeStackNavigator(); export const HomeStack = () => { diff --git a/src/navigation/stacks/Tabs/ProductsStack.tsx b/src/navigation/stacks/Tabs/ProductsStack.tsx index 68ca60e32..0d7ec4668 100644 --- a/src/navigation/stacks/Tabs/ProductsStack.tsx +++ b/src/navigation/stacks/Tabs/ProductsStack.tsx @@ -1,21 +1,21 @@ import React from 'react'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; -import { getCommonStack } from '../CommonStack'; import { ProductsParams } from '@appTypes/navigation/products'; -import { ProductScreen } from '@screens/Products'; -import { SwapScreen } from '@screens/Swap'; -import { StakingPoolsScreen } from '@screens/StakingPools'; -import { KosmosScreen } from '@screens/Kosmos'; +import { HarborStacks } from '@navigation/stacks/HarborStacks/HarborStacks'; import { Bridge, BridgeTransferError } from '@screens/Bridge'; +import { BridgeHistory } from '@screens/BridgeHistory'; +import { KosmosScreen } from '@screens/Kosmos'; +import { KosmosMarketScreen } from '@screens/Kosmos/screens'; +import { ProductScreen } from '@screens/Products'; import { StakingPoolScreen } from '@screens/StakingPool'; import { StakeErrorScreen, StakeSuccessScreen } from '@screens/StakingPool/screens'; -import { KosmosMarketScreen } from '@screens/Kosmos/screens'; -import { BridgeHistory } from '@screens/BridgeHistory'; +import { StakingPoolsScreen } from '@screens/StakingPools'; +import { SwapScreen } from '@screens/Swap'; import { SwapSettingsScreen } from '@screens/Swap/screens'; -import { HarborStacks } from '@navigation/stacks/HarborStacks/HarborStacks'; +import { getCommonStack } from '../CommonStack'; const Stack = createNativeStackNavigator(); export const ProductsStack = () => { diff --git a/src/navigation/stacks/Tabs/SettingsStack.tsx b/src/navigation/stacks/Tabs/SettingsStack.tsx index a36ada3ec..3a1cdbbb3 100644 --- a/src/navigation/stacks/Tabs/SettingsStack.tsx +++ b/src/navigation/stacks/Tabs/SettingsStack.tsx @@ -1,5 +1,17 @@ import React from 'react'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; +import { SettingsTabParamsList } from '@appTypes'; +import { AddressDetails } from '@screens/Address'; +import { + CreateWalletStep0, + CreateWalletStep1, + CreateWalletStep2 +} from '@screens/CreateWallet'; +import { ImportWalletMethods } from '@screens/ImportWalletMethods'; +import { + ImportWallet, + ImportWalletPrivateKey +} from '@screens/ImportWalletMethods/screens'; import { AboutScreen, AccessKeysScreen, @@ -12,20 +24,8 @@ import { SettingsScreen, SingleWalletScreen } from '@screens/Settings'; -import { SettingsTabParamsList } from '@appTypes'; -import { - CreateWalletStep0, - CreateWalletStep1, - CreateWalletStep2 -} from '@screens/CreateWallet'; -import { Watchlist } from '@screens/Settings/screens/Watchlist'; import { Explore } from '@screens/Settings/screens/Explore'; -import { AddressDetails } from '@screens/Address'; -import { ImportWalletMethods } from '@screens/ImportWalletMethods'; -import { - ImportWallet, - ImportWalletPrivateKey -} from '@screens/ImportWalletMethods/screens'; +import { Watchlist } from '@screens/Settings/screens/Watchlist'; import { ConfirmPasscode, SetupPasscode, diff --git a/src/navigation/stacks/TabsNavigator.tsx b/src/navigation/stacks/TabsNavigator.tsx index 96c89a3b3..576293557 100644 --- a/src/navigation/stacks/TabsNavigator.tsx +++ b/src/navigation/stacks/TabsNavigator.tsx @@ -5,12 +5,12 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { TabsParamsList } from '@appTypes/navigation/tabs'; -import TabBar from '@navigation/components/TabBar'; import { useKeyboardHeight, usePasscodeEntryRevealer } from '@hooks'; -import SettingsStack from './Tabs/SettingsStack'; -import HomeStack from './Tabs/HomeStack'; +import TabBar from '@navigation/components/TabBar'; import { DeviceUtils } from '@utils'; +import HomeStack from './Tabs/HomeStack'; import ProductsStack from './Tabs/ProductsStack'; +import SettingsStack from './Tabs/SettingsStack'; const BottomTabs = createBottomTabNavigator(); diff --git a/src/screens/AMBMarket/components/About.tsx b/src/screens/AMBMarket/components/About.tsx index 450f7f241..5b2fa15a9 100644 --- a/src/screens/AMBMarket/components/About.tsx +++ b/src/screens/AMBMarket/components/About.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Linking, StyleSheet, View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { BrowserIcon, DiscordIcon, @@ -10,9 +10,9 @@ import { TelegramIcon, TwitterIcon } from '@components/svg/icons'; -import { scale, verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; +import { COLORS } from '@constants/colors'; import Config from '@constants/config'; +import { scale, verticalScale } from '@utils'; interface Link { title: string; diff --git a/src/screens/AMBMarket/components/DetailedInfo.tsx b/src/screens/AMBMarket/components/DetailedInfo.tsx index df7e55444..b8d51810e 100644 --- a/src/screens/AMBMarket/components/DetailedInfo.tsx +++ b/src/screens/AMBMarket/components/DetailedInfo.tsx @@ -1,15 +1,15 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { startCase, toLower } from 'lodash'; +import { useTranslation } from 'react-i18next'; +import { Row, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; +import { verticalScale } from '@utils'; import { AMBMarketItem, AMBMarketItemsInfo, InfoKey } from '../AMBMarket.constants'; -import { Row, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; -import { verticalScale } from '@utils'; type AMBDetailedInfoProps = { [key in InfoKey]: string; diff --git a/src/screens/AMBMarket/components/PriceInfo.tsx b/src/screens/AMBMarket/components/PriceInfo.tsx index c1fa505b1..82ded0442 100644 --- a/src/screens/AMBMarket/components/PriceInfo.tsx +++ b/src/screens/AMBMarket/components/PriceInfo.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { StyleSheet, View } from 'react-native'; +import { Spacer, Text } from '@components/base'; +import { LogoGradientCircular } from '@components/svg/icons'; import { AMBPriceHistory } from '@components/templates'; import { COLORS } from '@constants/colors'; import { moderateScale, verticalScale } from '@utils'; -import { LogoGradientCircular } from '@components/svg/icons'; -import { Spacer, Text } from '@components/base'; interface AMBPriceInfoProps { header?: string; diff --git a/src/screens/AMBMarket/index.tsx b/src/screens/AMBMarket/index.tsx index 77be302ca..da7f13786 100644 --- a/src/screens/AMBMarket/index.tsx +++ b/src/screens/AMBMarket/index.tsx @@ -1,19 +1,19 @@ import React, { useMemo } from 'react'; import { ScrollView, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { Row, Spacer, Text } from '@components/base'; +import { CenteredSpinner, Header } from '@components/composite'; +import { COLORS } from '@constants/colors'; +import { useAMBPrice } from '@hooks/query'; +import { scale, verticalScale, NumberUtils } from '@utils'; import { AMBAbout, AMBDetailedInfo, AMBMarket as AMBMarketsInfo, AMBPriceInfo } from './components'; -import { Row, Spacer, Text } from '@components/base'; -import { CenteredSpinner, Header } from '@components/composite'; -import { COLORS } from '@constants/colors'; -import { useAMBPrice } from '@hooks/query'; -import { scale, verticalScale, NumberUtils } from '@utils'; +import { styles } from './styles'; const BodyTitle = ({ title }: { title: string }) => ( diff --git a/src/screens/AMBMarket/styles.ts b/src/screens/AMBMarket/styles.ts index 4915a1752..d0a341adb 100644 --- a/src/screens/AMBMarket/styles.ts +++ b/src/screens/AMBMarket/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { moderateScale, scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Address/index.tsx b/src/screens/Address/index.tsx index 68a8d1b99..c1ea6724d 100644 --- a/src/screens/Address/index.tsx +++ b/src/screens/Address/index.tsx @@ -1,15 +1,20 @@ import React, { useRef } from 'react'; import { Platform, View } from 'react-native'; +import { RouteProp, useRoute } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import { SafeAreaView } from 'react-native-safe-area-context'; +import { CommonStackParamsList } from '@appTypes/navigation/common'; +import { Button, Row, Spacer, Spinner, Text } from '@components/base'; import { BottomSheetRef, Header } from '@components/composite'; -import { RouteProp, useRoute } from '@react-navigation/native'; +import { Toast, ToastPosition, ToastType } from '@components/modular'; import { EditIcon, OptionsIcon } from '@components/svg/icons'; -import { Button, Row, Spacer, Spinner, Text } from '@components/base'; import { AccountTransactions, ExplorerAccountView, SharePortfolio } from '@components/templates'; +import { BottomSheetEditWallet } from '@components/templates/BottomSheetEditWallet'; +import { COLORS } from '@constants/colors'; import { useAMBPrice, useExplorerInfo, @@ -17,13 +22,8 @@ import { useTransactionsOfAccount, useWatchlist } from '@hooks'; -import { CommonStackParamsList } from '@appTypes/navigation/common'; -import { BottomSheetEditWallet } from '@components/templates/BottomSheetEditWallet'; -import { Toast, ToastPosition, ToastType } from '@components/modular'; -import { styles } from './styles'; -import { COLORS } from '@constants/colors'; import { StringUtils, NumberUtils, scale, verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; +import { styles } from './styles'; const TRANSACTION_LIMIT = 50; export const AddressDetails = (): JSX.Element => { diff --git a/src/screens/Address/styles.ts b/src/screens/Address/styles.ts index 1b6593dc5..9641a3700 100644 --- a/src/screens/Address/styles.ts +++ b/src/screens/Address/styles.ts @@ -1,6 +1,6 @@ -import { moderateScale, scale } from '@utils'; import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale } from '@utils'; export const styles = StyleSheet.create({ container: { flex: 1 }, diff --git a/src/screens/Asset/index.tsx b/src/screens/Asset/index.tsx index f43588ba3..87e5b33a1 100644 --- a/src/screens/Asset/index.tsx +++ b/src/screens/Asset/index.tsx @@ -1,16 +1,17 @@ import React, { useCallback, useMemo } from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { View } from 'react-native'; -import { styles } from './styles'; -import { Button, Row, Spacer, Text } from '@components/base'; import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { HomeNavigationProp, HomeParamsList } from '@appTypes'; +import { Button, Row, Spacer, Text } from '@components/base'; import { Header } from '@components/composite'; +import { TokenLogo } from '@components/modular'; +import { ChartIcon } from '@components/svg/icons/v2'; +import { AccountTransactions } from '@components/templates'; import { COLORS } from '@constants/colors'; +import { AssetsAccountActionsList } from '@features/wallet-assets/components/modular'; import { useAMBPrice, useTokensAndTransactions, useUSDPrice } from '@hooks'; import { useTransactionsOfToken } from '@hooks/query/useTransactionsOfToken'; -import { TokenLogo } from '@components/modular'; -import { ChartIcon } from '@components/svg/icons/v2'; import { StringUtils, StringValidators, @@ -18,8 +19,7 @@ import { scale, verticalScale } from '@utils'; -import { AssetsAccountActionsList } from '@features/wallet-assets/components/modular'; -import { AccountTransactions } from '@components/templates'; +import { styles } from './styles'; export const AssetScreen = () => { const { diff --git a/src/screens/BarcodeScanner/index.tsx b/src/screens/BarcodeScanner/index.tsx index 883961ed2..b763747f0 100644 --- a/src/screens/BarcodeScanner/index.tsx +++ b/src/screens/BarcodeScanner/index.tsx @@ -1,19 +1,19 @@ import React, { useCallback, useEffect, useState } from 'react'; +import { View } from 'react-native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import { BarCodeScanningResult, Camera, CameraType } from 'expo-camera'; import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useBarcodeScanner } from '@hooks'; -import { BarCodeScanningResult, Camera, CameraType } from 'expo-camera'; +import { RootStackParamsList } from '@appTypes'; import { Button, Row, Text } from '@components/base'; -import { View } from 'react-native'; -import { styles } from '@components/templates/BarcodeScanner/styles'; import { Header } from '@components/composite'; import { CloseIcon } from '@components/svg/icons'; -import { COLORS } from '@constants/colors'; import { ScanSquare } from '@components/templates/BarcodeScanner/components/ScanSquare'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { RootStackParamsList } from '@appTypes'; +import { styles } from '@components/templates/BarcodeScanner/styles'; +import { COLORS } from '@constants/colors'; +import { useBarcodeScanner } from '@hooks'; type Props = NativeStackScreenProps< RootStackParamsList, diff --git a/src/screens/Bridge/Bridge.tsx b/src/screens/Bridge/Bridge.tsx index 9b36649ba..ebb5fa9a3 100644 --- a/src/screens/Bridge/Bridge.tsx +++ b/src/screens/Bridge/Bridge.tsx @@ -1,17 +1,17 @@ import React, { useCallback, useEffect, useMemo } from 'react'; import { TouchableOpacity } from 'react-native'; -import { styles } from './styles'; import { useFocusEffect, useNavigation } from '@react-navigation/native'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { CopyToClipboardButton, Header } from '@components/composite'; -import { HistoryIcon } from '@components/svg/icons'; import { HomeNavigationProp } from '@appTypes'; import { Spacer, Spinner } from '@components/base'; +import { CopyToClipboardButton, Header } from '@components/composite'; +import { HistoryIcon } from '@components/svg/icons'; +import { useWalletStore } from '@entities/wallet'; import { useBridgeContextData } from '@features/bridge/context'; -import { BridgeTemplate } from '@features/bridge/templates'; import { usePendingTransactions } from '@features/bridge/hooks/usePendingTransactions'; +import { BridgeTemplate } from '@features/bridge/templates'; import { StringUtils, scale } from '@utils'; -import { useWalletStore } from '@entities/wallet'; +import { styles } from './styles'; export const Bridge = () => { const navigation = useNavigation(); diff --git a/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx b/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx index 2b01a5725..c1edc7584 100644 --- a/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx +++ b/src/screens/Bridge/BridgeTransferError/BridgeTransferError.tsx @@ -1,15 +1,15 @@ +import React from 'react'; +import { useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { styles } from './BridgeTransferError.styles'; +import { HomeNavigationProp } from '@appTypes'; +import { Spacer, Text } from '@components/base'; import { PrimaryButton, SecondaryButton } from '@components/modular'; import { InfoIcon } from '@components/svg/icons'; -import { Spacer, Text } from '@components/base'; -import { verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; -import { useNavigation } from '@react-navigation/native'; -import { HomeNavigationProp } from '@appTypes'; import { useBridgeContextData } from '@features/bridge/context'; +import { verticalScale } from '@utils'; +import { styles } from './BridgeTransferError.styles'; import { DEFAULT_AMB_NETWORK } from '../../../features/bridge/constants'; export const BridgeTransferError = ({}) => { diff --git a/src/screens/BridgeHistory/BridgeHistory.tsx b/src/screens/BridgeHistory/BridgeHistory.tsx index a564e821e..67a3bbb66 100644 --- a/src/screens/BridgeHistory/BridgeHistory.tsx +++ b/src/screens/BridgeHistory/BridgeHistory.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { Header } from '@components/composite'; import { COLORS } from '@constants/colors'; import { BridgeHistoryTransactions } from '@features/bridge/templates/BridgeHistory/BridgeHistory.Transactions'; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx b/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx index c3ac777f4..af97c453e 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep0/index.tsx @@ -1,20 +1,20 @@ import React, { useState } from 'react'; import { View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useNavigation, useRoute } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { SettingsTabNavigationProp } from '@appTypes'; +import { Button, Row, Spacer, Text } from '@components/base'; import { BottomAwareSafeAreaView, CheckBox, Header } from '@components/composite'; -import { Button, Row, Spacer, Text } from '@components/base'; +import { NewWalletPageIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils'; import { styles } from '@screens/CreateWallet/styles'; +import { scale, verticalScale } from '@utils'; import { stylesStep0 } from './Step0.styles'; -import { SettingsTabNavigationProp } from '@appTypes'; -import { NewWalletPageIcon } from '@components/svg/icons/v2'; export const CreateWalletStep0 = () => { const { params } = useRoute(); diff --git a/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts b/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts index 1bd38dc13..b1bdc41bb 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts +++ b/src/screens/CreateWallet/screens/CreateWalletStep1/Step1.styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx b/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx index 4cc14567c..36fbc5faf 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep1/index.tsx @@ -7,17 +7,17 @@ import { ViewStyle } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './Step1.styles'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeNavigationProp } from '@appTypes'; import { Spacer, Spinner, Text } from '@components/base'; import { BottomAwareSafeAreaView, Header } from '@components/composite'; -import { scale, verticalScale, MnemonicUtils } from '@utils'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { HomeNavigationProp } from '@appTypes'; import { useAddWalletStore } from '@features/add-wallet'; +import { scale, verticalScale, MnemonicUtils } from '@utils'; +import { styles } from './Step1.styles'; const LIST_COLUMNS = 2; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx index 7a018f369..5e18746bc 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicRandom.tsx @@ -1,8 +1,8 @@ +import React from 'react'; +import { StyleSheet } from 'react-native'; import { Button, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; -import React from 'react'; -import { StyleSheet } from 'react-native'; interface MnemonicRandomProps { word: string; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx index 453ae3d2c..6ab7978c0 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/MnemonicSelected.tsx @@ -1,8 +1,8 @@ +import React from 'react'; +import { StyleSheet } from 'react-native'; import { Button, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import React from 'react'; -import { StyleSheet } from 'react-native'; interface MnemonicSelectedProps { word: string; diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx index 1b6addeed..c0fda63a2 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/Step2.styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ main: { flex: 1 }, diff --git a/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx b/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx index 84ce6d8e7..60f666229 100644 --- a/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx +++ b/src/screens/CreateWallet/screens/CreateWalletStep2/index.tsx @@ -1,19 +1,19 @@ import React, { useCallback, useMemo, useState } from 'react'; import { View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { CommonActions, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { BottomAwareSafeAreaView, Header } from '@components/composite'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeNavigationProp } from '@appTypes'; import { Button, Row, Spacer, Text, Spinner } from '@components/base'; -import { scale, verticalScale, WalletUtils } from '@utils'; +import { BottomAwareSafeAreaView, Header } from '@components/composite'; +import { Toast, ToastPosition, ToastType } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { HomeNavigationProp } from '@appTypes'; +import { useAddWalletStore } from '@features/add-wallet'; +import { usePasscodeStore } from '@features/passcode'; +import { scale, verticalScale, WalletUtils } from '@utils'; import { MnemonicRandom } from './MnemonicRandom'; import { MnemonicSelected } from './MnemonicSelected'; import { styles } from './Step2.styles'; -import { Toast, ToastPosition, ToastType } from '@components/modular'; -import { usePasscodeStore } from '@features/passcode'; -import { useAddWalletStore } from '@features/add-wallet'; export const CreateWalletStep2 = () => { const navigation = useNavigation(); diff --git a/src/screens/CreateWallet/styles.ts b/src/screens/CreateWallet/styles.ts index 9a5e8a5e2..6ecf89bef 100644 --- a/src/screens/CreateWallet/styles.ts +++ b/src/screens/CreateWallet/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Harbor/ProcessStake/ProcessStake.tsx b/src/screens/Harbor/ProcessStake/ProcessStake.tsx index 7ccb810bb..7adf71856 100644 --- a/src/screens/Harbor/ProcessStake/ProcessStake.tsx +++ b/src/screens/Harbor/ProcessStake/ProcessStake.tsx @@ -6,31 +6,31 @@ import React, { useState } from 'react'; import { RefreshControl, ScrollView, View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; import { ethers } from 'ethers'; import { formatEther, parseEther } from 'ethers/lib/utils'; +import { useTranslation } from 'react-i18next'; import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import { BottomSheetRef, Header } from '@components/composite'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { CryptoCurrencyCode } from '@appTypes'; import { Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; -import { HarborTitle, RateInfo, StakedBalanceInfo } from './components'; -import { styles } from './styles'; -import { useWalletStore } from '@entities/wallet'; -import { useBalanceOfAddress, useKeyboardHeight } from '@hooks'; +import { BottomSheetRef, Header } from '@components/composite'; +import { PrimaryButton } from '@components/modular'; import { InputWithoutTokenSelect } from '@components/templates'; -import { ExplorerAccount, Token } from '@models'; +import { COLORS } from '@constants/colors'; import { AMB_DECIMALS, DEVICE_HEIGHT } from '@constants/variables'; -import { CryptoCurrencyCode } from '@appTypes'; -import { PrimaryButton } from '@components/modular'; -import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { DEFAULT_STAKE_PREVIEW } from '@entities/harbor/constants'; +import { useHarborStore } from '@entities/harbor/model/harbor-store'; +import { useWalletStore } from '@entities/wallet'; import { BottomSheetHarborPreView } from '@features/harbor/components/harbor-preview'; +import { useBalanceOfAddress, useKeyboardHeight } from '@hooks'; +import { ExplorerAccount, Token } from '@models'; import { isSmallScreen, scale, NumberUtils, TokenUtils } from '@utils'; +import { HarborTitle, RateInfo, StakedBalanceInfo } from './components'; +import { styles } from './styles'; export const ProcessStake = () => { const { top } = useSafeAreaInsets(); diff --git a/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx b/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx index 4cfce34c6..7e17d8aba 100644 --- a/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx +++ b/src/screens/Harbor/ProcessStake/components/HarborTitle/index.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { StakeHeaderIcon } from '../StakedHeaderIcon'; import { scale } from '@utils'; +import { StakeHeaderIcon } from '../StakedHeaderIcon'; export const HarborTitle = ({ harborAPR }: { harborAPR: string }) => { const { t } = useTranslation(); diff --git a/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx b/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx index 847f42661..fa1dc9b67 100644 --- a/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx +++ b/src/screens/Harbor/ProcessStake/components/RateInfo/RateInfo.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import { Row, Spacer, Text } from '@components/base'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { scale, NumberUtils } from '@utils'; -import { COLORS } from '@constants/colors'; import { CryptoCurrencyCode } from '@appTypes'; +import { Row, Spacer, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; +import { scale, NumberUtils } from '@utils'; +import { styles } from './styles'; interface RateInfoModel { availableToStake: string; diff --git a/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx b/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx index df0e0539e..42a593817 100644 --- a/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx +++ b/src/screens/Harbor/ProcessStake/components/RateInfo/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { COLORS } from '@constants/colors'; import { contentBox } from '@components/styles'; +import { COLORS } from '@constants/colors'; import { scale } from '@utils'; export const styles = StyleSheet.create({ diff --git a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx index 65c7389d8..bddba7cdf 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/StakedBalanceInfo.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Row, Spacer, Text } from '@components/base'; -import { StakedBalanceIcon } from '@components/svg/icons/v2/harbor'; import { TokenLogo } from '@components/modular'; -import { styles } from './styles'; +import { StakedBalanceIcon } from '@components/svg/icons/v2/harbor'; import { NumberUtils, scale } from '@utils'; +import { styles } from './styles'; interface StakedBalanceInfoModel { stakedValue: string; diff --git a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx index df69ff80c..b8d1c139a 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedBalanceInfo/styles.tsx @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { COLORS } from '@constants/colors'; import { contentBox } from '@components/styles'; +import { COLORS } from '@constants/colors'; import { scale } from '@utils'; export const styles = StyleSheet.create({ diff --git a/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx b/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx index 77b486cd1..a8322969a 100644 --- a/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx +++ b/src/screens/Harbor/ProcessStake/components/StakedHeaderIcon/StakeHeaderIcon.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { Row, Spacer, Text } from '@components/base'; +import { APYHeaderIcon } from '@components/svg/icons/v2/harbor'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { APYHeaderIcon } from '@components/svg/icons/v2/harbor'; import { styles } from './styles'; interface StakeHeaderIconModel { diff --git a/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx b/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx index cd3fb8175..21b440411 100644 --- a/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx +++ b/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx @@ -1,17 +1,17 @@ import React from 'react'; import { View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; import { useNavigation } from '@react-navigation/native'; -import { Header } from '@components/composite'; +import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { Button } from '@components/base'; +import { Header } from '@components/composite'; import { WithdrawIcon } from '@components/svg/icons/v2/harbor'; -import { HarborNavigationProp } from '@appTypes/navigation/harbor'; -import { styles } from './styles'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; -import { useEffectOnce } from '@hooks'; import { useWalletStore } from '@entities/wallet'; import { HarborStakeTabs } from '@features/harbor/components/tabs'; +import { useEffectOnce } from '@hooks'; +import { styles } from './styles'; export const StakeHarborScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx b/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx index b2cce47eb..9423e7aa1 100644 --- a/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx +++ b/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx @@ -1,18 +1,18 @@ import React, { useEffect, useRef } from 'react'; import { RefreshControl, ScrollView, View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { Header } from '@components/composite'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { Button } from '@components/base'; +import { Header } from '@components/composite'; import { NoteIcon } from '@components/svg/icons/v2/harbor'; -import { useNavigation } from '@react-navigation/native'; -import { HarborNavigationProp } from '@appTypes/navigation/harbor'; -import { useEffectOnce, useKeyboardHeight } from '@hooks'; +import { DEVICE_HEIGHT } from '@constants/variables'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { useWalletStore } from '@entities/wallet'; import { HarborWithdrawTabs } from '@features/harbor/components/tabs'; +import { useEffectOnce, useKeyboardHeight } from '@hooks'; import { isSmallScreen, scale } from '@utils'; -import { DEVICE_HEIGHT } from '@constants/variables'; import { styles } from './styles'; export const WithdrawHarborScreen = () => { diff --git a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx index af5573149..8e4786670 100644 --- a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx +++ b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx @@ -5,21 +5,21 @@ import { RefreshControl, View } from 'react-native'; +import { useFocusEffect } from '@react-navigation/native'; import { formatEther } from 'ethers/lib/utils'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { CryptoCurrencyCode } from '@appTypes'; +import { Row, Spacer, Text } from '@components/base'; import { Header } from '@components/composite'; -import { useWalletStore } from '@entities/wallet'; +import { TokenLogo } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { ILogs } from '@entities/harbor/model/types'; -import { Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; -import { TokenLogo } from '@components/modular'; -import { CryptoCurrencyCode } from '@appTypes'; +import { useWalletStore } from '@entities/wallet'; +import { useEffectOnce } from '@hooks'; import { NumberUtils, scale } from '@utils'; import { styles } from './WithdrawRequests.style'; -import { useEffectOnce } from '@hooks'; -import { useFocusEffect } from '@react-navigation/native'; export const WithdrawRequests = () => { const { t } = useTranslation(); diff --git a/src/screens/ImportWalletMethods/index.tsx b/src/screens/ImportWalletMethods/index.tsx index 6fda2e3ba..abee760aa 100644 --- a/src/screens/ImportWalletMethods/index.tsx +++ b/src/screens/ImportWalletMethods/index.tsx @@ -1,16 +1,16 @@ import React, { useCallback } from 'react'; import { FlatList, ListRenderItemInfo, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { useRoute } from '@react-navigation/native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { Header } from '@components/composite'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeParamsList } from '@appTypes'; import { Button, Row, Spacer, Text } from '@components/base'; +import { Header } from '@components/composite'; +import { Edit, Key } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { HomeParamsList } from '@appTypes'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { Edit, Key } from '@components/svg/icons/v2'; -import { useRoute } from '@react-navigation/native'; +import { styles } from './styles'; type ImportWalletMethod = { label: string; diff --git a/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx b/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx index 8b9d2259d..ae0ceede0 100644 --- a/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx +++ b/src/screens/ImportWalletMethods/screens/ImportWallet/ImportWallet.tsx @@ -7,12 +7,11 @@ import React, { useCallback } from 'react'; import { Alert, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; import { CommonActions, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { Header } from '@components/composite'; +import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeNavigationProp } from '@appTypes'; import { Button, InputRef, @@ -21,8 +20,12 @@ import { Spinner, Text } from '@components/base'; +import { Header } from '@components/composite'; +import { Toast, ToastType } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { HomeNavigationProp } from '@appTypes'; +import { usePasscodeStore } from '@features/passcode'; +import { useAllAccounts } from '@hooks/database'; +import { RenderWords } from '@screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord'; import { WalletUtils, StringUtils, @@ -30,10 +33,7 @@ import { scale, verticalScale } from '@utils'; -import { Toast, ToastType } from '@components/modular'; -import { usePasscodeStore } from '@features/passcode'; -import { RenderWords } from '@screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord'; -import { useAllAccounts } from '@hooks/database'; +import { styles } from './styles'; const INITIAL_ARRAY = Array(12).fill(''); diff --git a/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx b/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx index 2124b53ca..830d5c80f 100644 --- a/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx +++ b/src/screens/ImportWalletMethods/screens/ImportWallet/component/RenderWord/index.tsx @@ -1,10 +1,10 @@ import React, { MutableRefObject, RefObject, useCallback } from 'react'; import { View, FlatList } from 'react-native'; -import { styles } from './style'; -import { scale } from '@utils'; import { InputRef, Text } from '@components/base'; import { InputWithIcon } from '@components/composite'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; +import { styles } from './style'; interface RenderWordsModel { inputs: MutableRefObject[]>; diff --git a/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx b/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx index e0e230a4d..694d9bd9e 100644 --- a/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx +++ b/src/screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey.tsx @@ -6,10 +6,9 @@ import { View } from 'react-native'; import { CommonActions, useNavigation } from '@react-navigation/native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { Header } from '@components/composite'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeNavigationProp } from '@appTypes'; import { Button, InputRef, @@ -19,12 +18,12 @@ import { Spinner, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; -import { LeadEyeEmptyMiddleIcon, LeadEyeOffIcon } from '@components/svg/icons'; +import { Header } from '@components/composite'; import { PrivateKeyMaskedInput, Toast, ToastType } from '@components/modular'; -import { useAllAccounts } from '@hooks/database'; +import { LeadEyeEmptyMiddleIcon, LeadEyeOffIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; import { usePasscodeStore } from '@features/passcode'; -import { HomeNavigationProp } from '@appTypes'; +import { useAllAccounts } from '@hooks/database'; import { StringUtils, isIos, @@ -33,6 +32,7 @@ import { delay, WalletUtils } from '@utils'; +import { styles } from './styles'; const KEYBOARD_BEHAVIOR: KeyboardAvoidingViewProps['behavior'] = isIos ? 'padding' diff --git a/src/screens/ImportWalletMethods/screens/index.ts b/src/screens/ImportWalletMethods/screens/index.ts index 0f5c5eeb6..e82a67396 100644 --- a/src/screens/ImportWalletMethods/screens/index.ts +++ b/src/screens/ImportWalletMethods/screens/index.ts @@ -1,4 +1,4 @@ -import { ImportWalletPrivateKey } from '@screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey'; import { ImportWallet } from '@screens/ImportWalletMethods/screens/ImportWallet/ImportWallet'; +import { ImportWalletPrivateKey } from '@screens/ImportWalletMethods/screens/PrivateKey/ImportWallet.PrivateKey'; export { ImportWallet, ImportWalletPrivateKey }; diff --git a/src/screens/ImportWalletMethods/styles.ts b/src/screens/ImportWalletMethods/styles.ts index bc791086f..f816e7515 100644 --- a/src/screens/ImportWalletMethods/styles.ts +++ b/src/screens/ImportWalletMethods/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ main: { diff --git a/src/screens/Kosmos/index.tsx b/src/screens/Kosmos/index.tsx index 1473a7f66..309bb3ad7 100644 --- a/src/screens/Kosmos/index.tsx +++ b/src/screens/Kosmos/index.tsx @@ -1,8 +1,8 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; -import { styles } from './styles'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { BottomSheetRef, Header } from '@components/composite'; +import { FiltersState } from '@entities/kosmos'; import { FiltersSelector } from '@features/kosmos/components/modular'; import { BottomSheetFilters, @@ -10,7 +10,7 @@ import { } from '@features/kosmos/components/templates'; import { INITIAL_FILTERS } from '@features/kosmos/utils'; -import { FiltersState } from '@entities/kosmos'; +import { styles } from './styles'; export const KosmosScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Kosmos/screens/KosmosMarket/index.tsx b/src/screens/Kosmos/screens/KosmosMarket/index.tsx index 15ae0cb73..0f2ee322d 100644 --- a/src/screens/Kosmos/screens/KosmosMarket/index.tsx +++ b/src/screens/Kosmos/screens/KosmosMarket/index.tsx @@ -11,34 +11,34 @@ import { RefreshControl, View } from 'react-native'; -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useFocusEffect } from '@react-navigation/native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; +import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; +import { isIOS } from 'react-native-popover-view/dist/Constants'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { styles } from './styles'; +import { HomeParamsList } from '@appTypes'; +import { Spacer } from '@components/base'; import { Header } from '@components/composite'; +import { DEVICE_HEIGHT } from '@constants/variables'; +import { + useMarketByIdQuery, + useMarketTransactions, + useToken +} from '@entities/kosmos'; +import { useChartStore } from '@features/kosmos'; import { MarketHeaderDetails, ScreenLoader } from '@features/kosmos/components/base'; -import { useBalance, useResetStore } from '@features/kosmos/lib/hooks'; -import { HomeParamsList } from '@appTypes'; import { MarketTableDetails } from '@features/kosmos/components/composite'; import { ExactMarketTokenTabs, MarketChartsWithTimeframes } from '@features/kosmos/components/templates'; -import { isIOS } from 'react-native-popover-view/dist/Constants'; -import { isAndroid, verticalScale } from '@utils'; +import { useBalance, useResetStore } from '@features/kosmos/lib/hooks'; import { useUpdateScreenData } from '@hooks/useUpdateScreenData'; -import { DEVICE_HEIGHT } from '@constants/variables'; -import { - useMarketByIdQuery, - useMarketTransactions, - useToken -} from '@entities/kosmos'; -import { useChartStore } from '@features/kosmos'; -import { Spacer } from '@components/base'; +import { isAndroid, verticalScale } from '@utils'; +import { styles } from './styles'; type KosmosMarketScreenProps = NativeStackScreenProps< HomeParamsList, diff --git a/src/screens/NFTScreen/index.tsx b/src/screens/NFTScreen/index.tsx index b1e2c5434..71fa1aede 100644 --- a/src/screens/NFTScreen/index.tsx +++ b/src/screens/NFTScreen/index.tsx @@ -1,15 +1,15 @@ +import React from 'react'; +import { Image, View } from 'react-native'; import { RouteProp, useRoute } from '@react-navigation/native'; -import { HomeParamsList } from '@appTypes'; +import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { Image, View } from 'react-native'; -import { Header } from '@components/composite'; +import { HomeParamsList } from '@appTypes'; import { Row, Spacer, Spinner, Text } from '@components/base'; +import { Header } from '@components/composite'; +import NFTPlaceholder from '@components/svg/icons/NFTPlaceholder'; import { COLORS } from '@constants/colors'; -import React from 'react'; import { useNFTInfo } from '@hooks/query/useNFTInfo'; import { styles } from './styles'; -import NFTPlaceholder from '@components/svg/icons/NFTPlaceholder'; -import { useTranslation } from 'react-i18next'; export const NFTScreen = () => { const { diff --git a/src/screens/NoWallet/index.tsx b/src/screens/NoWallet/index.tsx index cfdc3c20c..501e8c8b6 100644 --- a/src/screens/NoWallet/index.tsx +++ b/src/screens/NoWallet/index.tsx @@ -4,14 +4,14 @@ import { useNavigation } from '@react-navigation/native'; import { LinearGradient } from 'expo-linear-gradient'; import LottieView from 'lottie-react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { PrimaryButton, SecondaryButton } from '@components/modular'; -import { BottomAwareSafeAreaView } from '@components/composite'; -import { Spacer, Text } from '@components/base'; import { RootNavigationProp } from '@appTypes'; +import { Spacer, Text } from '@components/base'; +import { BottomAwareSafeAreaView } from '@components/composite'; +import { PrimaryButton, SecondaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils'; import { useAddWalletStore } from '@features/add-wallet'; +import { scale, verticalScale } from '@utils'; +import { styles } from './styles'; export const NoWalletScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/NoWallet/styles.ts b/src/screens/NoWallet/styles.ts index 06141da11..eba15b0cc 100644 --- a/src/screens/NoWallet/styles.ts +++ b/src/screens/NoWallet/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Notifications/components/Header.tsx b/src/screens/Notifications/components/Header.tsx index 6e8a33764..72927f469 100644 --- a/src/screens/Notifications/components/Header.tsx +++ b/src/screens/Notifications/components/Header.tsx @@ -1,11 +1,11 @@ import React, { useMemo } from 'react'; import { StyleSheet } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Button, Row, Spacer } from '@components/base'; import { Header } from '@components/composite'; +import { SettingsOutlineIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { moderateScale } from '@utils'; -import { useTranslation } from 'react-i18next'; -import { SettingsOutlineIcon } from '@components/svg/icons/v2'; interface NotificationsHeaderProps { onSettingsPress: () => unknown; diff --git a/src/screens/Notifications/components/__tests__/NotificationBox.test.tsx b/src/screens/Notifications/components/__tests__/NotificationBox.test.tsx index 30909a6e2..d73cc6fe8 100644 --- a/src/screens/Notifications/components/__tests__/NotificationBox.test.tsx +++ b/src/screens/Notifications/components/__tests__/NotificationBox.test.tsx @@ -1,10 +1,10 @@ import React from 'react'; import '@testing-library/jest-native/extend-expect'; import { screen, render } from '@testing-library/react-native'; -import { NotificationBox } from '../notification-box'; -import type { Notification } from '@models'; import { NotificationType } from '@appTypes'; import { COLORS } from '@constants/colors'; +import { NotificationBox } from '../notification-box'; +import type { Notification } from '@models'; type OmitNotification = Omit; diff --git a/src/screens/Notifications/components/notification-box/index.tsx b/src/screens/Notifications/components/notification-box/index.tsx index ed88ecd43..2bf5d2ad6 100644 --- a/src/screens/Notifications/components/notification-box/index.tsx +++ b/src/screens/Notifications/components/notification-box/index.tsx @@ -2,14 +2,14 @@ import React, { useCallback } from 'react'; import { Text as RNText, View } from 'react-native'; import moment from 'moment'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Row, Spacer, Text } from '@components/base'; +import { COLORS } from '@constants/colors'; import { Notification, NotificationWithPriceChange } from '@models/Notification'; import { scale, verticalScale, NumberUtils } from '@utils'; -import { COLORS } from '@constants/colors'; +import { styles } from './styles'; interface NotificationBoxProps { notification: Notification; diff --git a/src/screens/Notifications/components/notification-box/styles.ts b/src/screens/Notifications/components/notification-box/styles.ts index 6f0b614c6..0761a2595 100644 --- a/src/screens/Notifications/components/notification-box/styles.ts +++ b/src/screens/Notifications/components/notification-box/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Notifications/index.tsx b/src/screens/Notifications/index.tsx index 3fe8b94f6..0928fcb21 100644 --- a/src/screens/Notifications/index.tsx +++ b/src/screens/Notifications/index.tsx @@ -5,19 +5,19 @@ import { SectionListRenderItemInfo, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import moment from 'moment'; +import { useTranslation } from 'react-i18next'; import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'; -import { NotificationSettingsView } from '@components/templates'; -import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; import { Spacer, Text } from '@components/base'; -import { Notification } from '@models/Notification'; -import { COLORS } from '@constants/colors'; +import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; import { BellIcon } from '@components/svg/icons'; +import { NotificationSettingsView } from '@components/templates'; +import { COLORS } from '@constants/colors'; import { useNotificationsQuery } from '@hooks/query'; +import { Notification } from '@models/Notification'; import { DeviceUtils, verticalScale } from '@utils'; import { NotificationBox, NotificationsHeader } from './components'; import { styles } from './styles'; diff --git a/src/screens/Notifications/styles.ts b/src/screens/Notifications/styles.ts index 603c499f0..caa9f81d6 100644 --- a/src/screens/Notifications/styles.ts +++ b/src/screens/Notifications/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/PasscodeEntry/index.tsx b/src/screens/PasscodeEntry/index.tsx index 330b652df..c5a4a3f6d 100644 --- a/src/screens/PasscodeEntry/index.tsx +++ b/src/screens/PasscodeEntry/index.tsx @@ -1,18 +1,18 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import { Alert, Keyboard, TextInput, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; -import * as LocalAuthentication from 'expo-local-authentication'; import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; -import { Passcode } from '@components/modular'; +import * as LocalAuthentication from 'expo-local-authentication'; +import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { CommonStackParamsList, RootNavigationProp } from '@appTypes'; import { Spacer, Text } from '@components/base'; -import { useAppState, usePreventGoingBack } from '@hooks'; +import { Header } from '@components/composite'; +import { Passcode } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { CommonStackParamsList, RootNavigationProp } from '@appTypes'; +import { usePasscodeStore } from '@features/passcode'; +import { useAppState, usePreventGoingBack } from '@hooks'; import { Cache, CacheKey } from '@lib/cache'; import { DeviceUtils, PasscodeUtils, verticalScale } from '@utils'; -import { Header } from '@components/composite'; -import { usePasscodeStore } from '@features/passcode'; export const PasscodeEntry = () => { const { t } = useTranslation(); diff --git a/src/screens/Products/index.tsx b/src/screens/Products/index.tsx index b51007dab..36ffa7a43 100644 --- a/src/screens/Products/index.tsx +++ b/src/screens/Products/index.tsx @@ -1,10 +1,10 @@ import React, { useMemo } from 'react'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { styles } from './styles'; import { Text } from '@components/base'; import { Header } from '@components/composite'; import { COLORS } from '@constants/colors'; import { ProductsList } from '@features/products/components/templates'; +import { styles } from './styles'; export const ProductScreen = () => { const renderLeftHeaderComponent = useMemo( diff --git a/src/screens/SendFunds/components/address-input/index.tsx b/src/screens/SendFunds/components/address-input/index.tsx index 3f93dfcac..35a6c7278 100644 --- a/src/screens/SendFunds/components/address-input/index.tsx +++ b/src/screens/SendFunds/components/address-input/index.tsx @@ -8,11 +8,11 @@ import { Keyboard } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Input, InputRef, Text } from '@components/base'; -import { DEVICE_WIDTH } from '@constants/variables'; import { COLORS } from '@constants/colors'; +import { DEVICE_WIDTH } from '@constants/variables'; import { isAndroid, StringUtils } from '@utils'; +import { styles } from './styles'; interface AddressInputProps { address: string; diff --git a/src/screens/SendFunds/components/address-input/styles.ts b/src/screens/SendFunds/components/address-input/styles.ts index 6c3a25787..88b6ce16c 100644 --- a/src/screens/SendFunds/components/address-input/styles.ts +++ b/src/screens/SendFunds/components/address-input/styles.ts @@ -1,5 +1,5 @@ -import { verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/SendFunds/components/confirm-tx/index.tsx b/src/screens/SendFunds/components/confirm-tx/index.tsx index ca64201de..01d36156e 100644 --- a/src/screens/SendFunds/components/confirm-tx/index.tsx +++ b/src/screens/SendFunds/components/confirm-tx/index.tsx @@ -1,25 +1,25 @@ import React, { PropsWithChildren, useMemo } from 'react'; -import { useTranslation } from 'react-i18next'; import { StyleProp, View, ViewStyle } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { CommonActions, useNavigation } from '@react-navigation/native'; -import { styles } from './styles'; +import { useTranslation } from 'react-i18next'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { HomeNavigationProp } from '@appTypes'; import { Row, Spacer, Spinner, Text } from '@components/base'; +import { + BottomSheetErrorView, + BottomSheetSuccessView +} from '@components/base/BottomSheetStatusView'; import { PrimaryButton, SecondaryButton, TokenLogo } from '@components/modular'; -import { COLORS } from '@constants/colors'; import { AddressRowWithAction } from '@components/templates/ExplorerAccount/components'; +import { COLORS } from '@constants/colors'; +import { useSendFundsStore } from '@features/send-funds'; import { cssShadowToNative, verticalScale, NumberUtils, _delayNavigation } from '@utils'; -import { - BottomSheetErrorView, - BottomSheetSuccessView -} from '@components/base/BottomSheetStatusView'; -import { useSendFundsStore } from '@features/send-funds'; -import { HomeNavigationProp } from '@appTypes'; +import { styles } from './styles'; interface ConfirmTransactionProps { from: string; diff --git a/src/screens/SendFunds/components/confirm-tx/styles.ts b/src/screens/SendFunds/components/confirm-tx/styles.ts index 88eb3bf75..8f30d6ce1 100644 --- a/src/screens/SendFunds/components/confirm-tx/styles.ts +++ b/src/screens/SendFunds/components/confirm-tx/styles.ts @@ -1,6 +1,6 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/SendFunds/components/estimated-fee/index.tsx b/src/screens/SendFunds/components/estimated-fee/index.tsx index 43d64ce24..7f29c85f4 100644 --- a/src/screens/SendFunds/components/estimated-fee/index.tsx +++ b/src/screens/SendFunds/components/estimated-fee/index.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { scale } from '@utils'; import { LogoGradientCircular } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; interface EstimatedFeeProps { fee: number; diff --git a/src/screens/SendFunds/components/use-max-button/index.tsx b/src/screens/SendFunds/components/use-max-button/index.tsx index 6be202113..0117c9441 100644 --- a/src/screens/SendFunds/components/use-max-button/index.tsx +++ b/src/screens/SendFunds/components/use-max-button/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useTranslation } from 'react-i18next'; import { StyleSheet, View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; diff --git a/src/screens/SendFunds/index.tsx b/src/screens/SendFunds/index.tsx index 1a568d74e..85e144c26 100644 --- a/src/screens/SendFunds/index.tsx +++ b/src/screens/SendFunds/index.tsx @@ -6,20 +6,33 @@ import React, { useState } from 'react'; import { Keyboard, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { CommonActions, useFocusEffect } from '@react-navigation/native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; import * as Clipboard from 'expo-clipboard'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; +import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { AirDAOEventType, CryptoCurrencyCode, HomeParamsList } from '@appTypes'; import { KeyboardDismissingView, Spacer, Text } from '@components/base'; +import { BottomSheet, BottomSheetRef } from '@components/composite'; import { PrimaryButton } from '@components/modular'; +import { InputWithTokenSelect } from '@components/templates'; import { COLORS } from '@constants/colors'; -import { useEstimatedTransferFee, useTokensAndTransactions } from '@hooks'; -import { AirDAOEventType, CryptoCurrencyCode, HomeParamsList } from '@appTypes'; import { ethereumAddressRegex } from '@constants/regex'; -import { AddressInput, ConfirmTransaction } from './components'; +import { useWalletStore } from '@entities/wallet'; +import { useSendFundsStore } from '@features/send-funds'; +import { TokensList } from '@features/send-funds/components/composite'; +import { AmountSelectionKeyboardExtend } from '@features/send-funds/components/modular'; +import { FundsHeader } from '@features/send-funds/components/templates'; +import { + useAMBEntity, + useAmountChangeHandler +} from '@features/send-funds/lib/hooks'; +import { useEstimatedTransferFee, useTokensAndTransactions } from '@hooks'; import { AirDAOEventDispatcher } from '@lib'; +import { + CustomAppEvents, + sendFirebaseEvent +} from '@lib/firebaseEventAnalytics'; import { Token } from '@models'; import { NumberUtils, @@ -27,23 +40,9 @@ import { verticalScale, _delayNavigation } from '@utils'; +import { AddressInput, ConfirmTransaction } from './components'; import { styles } from './styles'; -import { - CustomAppEvents, - sendFirebaseEvent -} from '@lib/firebaseEventAnalytics'; -import { - useAMBEntity, - useAmountChangeHandler -} from '@features/send-funds/lib/hooks'; -import { InputWithTokenSelect } from '@components/templates'; -import { TokensList } from '@features/send-funds/components/composite'; -import { AmountSelectionKeyboardExtend } from '@features/send-funds/components/modular'; -import { FundsHeader } from '@features/send-funds/components/templates'; -import { useWalletStore } from '@entities/wallet'; -import { useSendFundsStore } from '@features/send-funds'; - type Props = NativeStackScreenProps; export const SendFunds = ({ navigation, route }: Props) => { diff --git a/src/screens/Settings/Settings.constants.tsx b/src/screens/Settings/Settings.constants.tsx index 41ce7f1c4..48d3a04d7 100644 --- a/src/screens/Settings/Settings.constants.tsx +++ b/src/screens/Settings/Settings.constants.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { COLORS } from '@constants/colors'; +import { TelegramSettingsIcon } from '@components/svg/icons'; +import MediumIcon from '@components/svg/icons/MediumIcon'; import { AboutIcon, CompassIcon, @@ -10,8 +11,7 @@ import { WatchListIcon } from '@components/svg/icons/v2/settings'; import XTwitterIcon from '@components/svg/icons/XTwitterIcon'; -import { TelegramSettingsIcon } from '@components/svg/icons'; -import MediumIcon from '@components/svg/icons/MediumIcon'; +import { COLORS } from '@constants/colors'; import { SettingsMenuItem } from '@screens/Settings/Settings.types'; export const SETTINGS_MENU_ITEMS: SettingsMenuItem[] = [ diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx index 8ac9248e1..10e04b0e8 100644 --- a/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { Linking, SafeAreaView, TouchableOpacity, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { useNavigation } from '@react-navigation/native'; -import { Button, Row, Spacer, Text } from '@components/base'; +import { useTranslation } from 'react-i18next'; import { SettingsTabNavigationProp } from '@appTypes'; +import { Button, Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils'; import Config from '@constants/config'; +import { scale, verticalScale } from '@utils'; import { SETTINGS_MENU_ITEMS, SOCIAL_GROUPS } from './Settings.constants'; import { SettingsMenuItem } from './Settings.types'; import { styles } from './styles'; diff --git a/src/screens/Settings/screens/About/index.tsx b/src/screens/Settings/screens/About/index.tsx index 407f97725..55cbe6fa6 100644 --- a/src/screens/Settings/screens/About/index.tsx +++ b/src/screens/Settings/screens/About/index.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { Linking, View } from 'react-native'; +import Constants from 'expo-constants'; +import * as Updates from 'expo-updates'; import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { Button, Spacer, Text } from '@components/base'; import { Header } from '@components/composite'; +import { scale, PlatformSpecificUtils } from '@utils'; import { AboutMenutItem } from './About.MenuItem'; -import { Button, Spacer, Text } from '@components/base'; import { styles } from './styles'; -import { Linking, View } from 'react-native'; -import { scale, PlatformSpecificUtils } from '@utils'; -import * as Updates from 'expo-updates'; -import Constants from 'expo-constants'; // TODO add privacy policy and terms links export const AboutScreen = () => { diff --git a/src/screens/Settings/screens/About/styles.ts b/src/screens/Settings/screens/About/styles.ts index c61a5f56c..05495acab 100644 --- a/src/screens/Settings/screens/About/styles.ts +++ b/src/screens/Settings/screens/About/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { moderateScale, scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/AccessKeys/index.tsx b/src/screens/Settings/screens/AccessKeys/index.tsx index a1a8dc97e..a9f7aebb8 100644 --- a/src/screens/Settings/screens/AccessKeys/index.tsx +++ b/src/screens/Settings/screens/AccessKeys/index.tsx @@ -1,14 +1,14 @@ import React, { useEffect, useState } from 'react'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useTranslation } from 'react-i18next'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { styles } from './styles'; import { SettingsTabParamsList } from '@appTypes'; -import { AccessKeysMnemonicTab } from '@screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic'; -import { AccessKeysPrivateTab } from '@screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private'; -import AirDAOKeysStorage from '@lib/crypto/AirDAOKeysStorage'; import { Header } from '@components/composite'; import { AnimatedTabs } from '@components/modular'; +import { singleAirDAOStorage } from '@lib'; +import { AccessKeysMnemonicTab } from '@screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic'; +import { AccessKeysPrivateTab } from '@screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private'; +import { styles } from './styles'; type Props = NativeStackScreenProps; @@ -20,7 +20,7 @@ export const AccessKeysScreen = ({ route }: Props) => { (async () => { setIsMnemonicAvailable( ( - await AirDAOKeysStorage.getWalletMnemonic(route.params.walletHash) + await singleAirDAOStorage.getWalletMnemonic(route.params.walletHash) ).split(' ').length > 1 ); })(); diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx b/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx index 01f4e163e..ed5395978 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx +++ b/src/screens/Settings/screens/AccessKeys/tabs/Mnemonic/AccessKeys.Mnemonic.tsx @@ -7,11 +7,11 @@ import { ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; import { Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { singleAirDAOStorage } from '@lib'; import { scale } from '@utils'; -import AirDAOKeysStorage from '@lib/crypto/AirDAOKeysStorage'; +import { styles } from './styles'; interface AccessKeysMnemonicProps { walletHash: string; @@ -27,7 +27,7 @@ export const AccessKeysMnemonicTab = ({ if (walletHash) { (async () => { const mnemonic = ( - await AirDAOKeysStorage.getWalletMnemonic(walletHash) + await singleAirDAOStorage.getWalletMnemonic(walletHash) ).split(' '); setMnemonicPhrase(mnemonic); })(); diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx b/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx index 692e21f8e..e0d80a2d0 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx +++ b/src/screens/Settings/screens/AccessKeys/tabs/Private/AccessKeys.Private.tsx @@ -1,12 +1,12 @@ import React, { useEffect, useState } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; -import { Cache, CacheKey } from '@lib/cache'; import { Spacer, Text } from '@components/base'; +import { CopyToClipboardButton } from '@components/composite'; import { COLORS } from '@constants/colors'; +import { Cache, CacheKey } from '@lib/cache'; import { scale } from '@utils'; -import { CopyToClipboardButton } from '@components/composite'; +import { styles } from './styles'; interface AccessKeysPrivateProps { walletHash: string; diff --git a/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts b/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts index d168f0c99..c9727c88b 100644 --- a/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts +++ b/src/screens/Settings/screens/AccessKeys/tabs/Private/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx b/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx index 69872a05b..219ca4313 100644 --- a/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/PrefrencesMenuItem.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { AppPreference } from '../AppPrefrences.types'; -import { Row, Spacer, Text } from '@components/base'; import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; +import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; +import { AppPreference } from '../AppPrefrences.types'; export const AppPreferencesMenuItem = (props: AppPreference) => { const { title, value } = props; diff --git a/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx b/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx index 61b6f41a1..5a722b769 100644 --- a/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/SettingsModalItem.tsx @@ -1,10 +1,10 @@ import React, { FC } from 'react'; import { StyleSheet, TouchableOpacity, View } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { Currency, Language } from '@appTypes'; import { Row, Text } from '@components/base'; import { RadioButton } from '@components/base/RadioButton'; import { COLORS } from '@constants/colors'; -import { Currency, Language } from '@appTypes'; import { scale } from '@utils'; type Props = { diff --git a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx index 82a66ac08..7f5a56fea 100644 --- a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetBaseCurrency/index.tsx @@ -1,14 +1,14 @@ import React, { ForwardedRef, forwardRef, RefObject, useState } from 'react'; -import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; -import { Spacer, Text } from '@components/base'; import { FlatList, Platform } from 'react-native'; -import { useForwardedRef } from '@hooks/useForwardedRef'; -import { SettingsModalItem } from '@screens/Settings/screens/AppPreferences/components/SettingsModalItem'; +import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { Currency } from '@appTypes'; +import { Spacer, Text } from '@components/base'; +import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; import { COLORS } from '@constants/colors'; +import { useForwardedRef } from '@hooks/useForwardedRef'; +import { SettingsModalItem } from '@screens/Settings/screens/AppPreferences/components/SettingsModalItem'; import { scale } from '@utils'; -import { useTranslation } from 'react-i18next'; -import { Currency } from '@appTypes'; import { styles } from '../style'; type Props = { diff --git a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx index f79d21d20..9b5f2cd71 100644 --- a/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx +++ b/src/screens/Settings/screens/AppPreferences/components/modals/BottomSheetSelectLanguage/index.tsx @@ -1,14 +1,14 @@ import React, { ForwardedRef, forwardRef, RefObject, useState } from 'react'; import { FlatList, Platform } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { Language } from '@appTypes'; import { Spacer, Text } from '@components/base'; -import { useForwardedRef } from '@hooks/useForwardedRef'; -import { SettingsModalItem } from '@screens/Settings/screens/AppPreferences/components/SettingsModalItem'; +import { BottomSheet, BottomSheetRef, Header } from '@components/composite'; import { COLORS } from '@constants/colors'; import useLocalization from '@contexts/Localizations'; -import { Language } from '@appTypes'; +import { useForwardedRef } from '@hooks/useForwardedRef'; +import { SettingsModalItem } from '@screens/Settings/screens/AppPreferences/components/SettingsModalItem'; import { LocalizationUtils, scale } from '@utils'; import { styles } from '../style'; diff --git a/src/screens/Settings/screens/AppPreferences/components/modals/style.ts b/src/screens/Settings/screens/AppPreferences/components/modals/style.ts index aaf908304..0811a59cb 100644 --- a/src/screens/Settings/screens/AppPreferences/components/modals/style.ts +++ b/src/screens/Settings/screens/AppPreferences/components/modals/style.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { scale } from '@utils'; import { COLORS } from '@constants/colors'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/AppPreferences/index.tsx b/src/screens/Settings/screens/AppPreferences/index.tsx index 26b5f05e2..0a6593442 100644 --- a/src/screens/Settings/screens/AppPreferences/index.tsx +++ b/src/screens/Settings/screens/AppPreferences/index.tsx @@ -1,17 +1,17 @@ import React, { useCallback, useRef, useState } from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { BottomSheetRef, Header } from '@components/composite'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { Currency, Language } from '@appTypes'; import { Button, Spacer } from '@components/base'; +import { BottomSheetRef, Header } from '@components/composite'; +import useLocalization from '@contexts/Localizations'; +import { LocalizationUtils, verticalScale } from '@utils'; import { AppPreferencesMenuItem, BottomSheetSelectLanguage } from './components'; -import { Currency, Language } from '@appTypes'; import { styles } from './styles'; -import useLocalization from '@contexts/Localizations'; -import { LocalizationUtils, verticalScale } from '@utils'; -import { View } from 'react-native'; export const AppPreferencesScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Settings/screens/AppPreferences/styles.ts b/src/screens/Settings/screens/AppPreferences/styles.ts index 009ce9264..c70786c12 100644 --- a/src/screens/Settings/screens/AppPreferences/styles.ts +++ b/src/screens/Settings/screens/AppPreferences/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/ChangePasscode/index.tsx b/src/screens/Settings/screens/ChangePasscode/index.tsx index 397709dea..305403862 100644 --- a/src/screens/Settings/screens/ChangePasscode/index.tsx +++ b/src/screens/Settings/screens/ChangePasscode/index.tsx @@ -1,17 +1,17 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { Button, Spacer, Text } from '@components/base'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useNavigation } from '@react-navigation/native'; -import { verticalScale } from '@utils'; import { Alert, View } from 'react-native'; -import { SettingsTabNavigationProp } from '@appTypes'; -import { Passcode, Toast, ToastPosition, ToastType } from '@components/modular'; +import { useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { SettingsTabNavigationProp } from '@appTypes'; +import { Button, Spacer, Text } from '@components/base'; import { Header } from '@components/composite'; -import { usePasscodeStore } from '@features/passcode'; +import { Passcode, Toast, ToastPosition, ToastType } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { styles } from './styles'; +import { usePasscodeStore } from '@features/passcode'; import { usePasscodeActions } from '@features/passcode/lib/hooks'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; export const ChangePasscode = () => { const { t } = useTranslation(); diff --git a/src/screens/Settings/screens/Explore/components/WalletItem.tsx b/src/screens/Settings/screens/Explore/components/WalletItem.tsx index 1624fab85..1a52e8563 100644 --- a/src/screens/Settings/screens/Explore/components/WalletItem.tsx +++ b/src/screens/Settings/screens/Explore/components/WalletItem.tsx @@ -2,12 +2,12 @@ import React, { useMemo } from 'react'; import { View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { ExplorerAccount } from '@models/Explorer'; -import { verticalScale, StringUtils, NumberUtils } from '@utils'; -import { COLORS } from '@constants/colors'; -import { useWatchlist } from '@hooks'; import { AddressIndicator } from '@components/templates'; +import { COLORS } from '@constants/colors'; import { useListsSelector } from '@entities/lists'; +import { useWatchlist } from '@hooks'; +import { ExplorerAccount } from '@models/Explorer'; +import { verticalScale, StringUtils, NumberUtils } from '@utils'; interface ExplorerWalletItemProps { item: ExplorerAccount; diff --git a/src/screens/Settings/screens/Explore/index.tsx b/src/screens/Settings/screens/Explore/index.tsx index f2b0ad53b..ccb5a4745 100644 --- a/src/screens/Settings/screens/Explore/index.tsx +++ b/src/screens/Settings/screens/Explore/index.tsx @@ -15,6 +15,7 @@ import { ViewStyle } from 'react-native'; import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; import Animated, { Easing, Extrapolation, @@ -28,8 +29,10 @@ import Animated, { withTiming } from 'react-native-reanimated'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { + SearchTabNavigationProp, + SearchTabParamsList +} from '@appTypes/navigation'; import { Button, KeyboardDismissingView, @@ -37,27 +40,23 @@ import { Spinner, Text } from '@components/base'; +import { Header } from '@components/composite'; +import { ScannerIcon, SearchLargeIcon } from '@components/svg/icons'; import { SearchAddress, SearchAddressRef } from '@components/templates'; -import { useExplorerAccounts, useExplorerInfo } from '@hooks/query'; -import { scale, verticalScale } from '@utils'; -import { ExplorerAccount } from '@models/Explorer'; -import { - SearchTabNavigationProp, - SearchTabParamsList -} from '@appTypes/navigation'; import { COLORS } from '@constants/colors'; -import { ScannerIcon, SearchLargeIcon } from '@components/svg/icons'; -import { ExplorerWalletItem } from './components'; -import { SearchSort } from './Search.types'; import { DEVICE_HEIGHT } from '@constants/variables'; +import { useAddressesStore, useFetchAddresses } from '@entities/addresses'; import { useWatchlist } from '@hooks'; - +import { useExplorerAccounts, useExplorerInfo } from '@hooks/query'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; -import { Header } from '@components/composite'; -import { useAddressesStore, useFetchAddresses } from '@entities/addresses'; +import { ExplorerAccount } from '@models/Explorer'; +import { scale, verticalScale } from '@utils'; +import { ExplorerWalletItem } from './components'; +import { SearchSort } from './Search.types'; +import { styles } from './styles'; export const Explore = () => { const navigation = useNavigation(); diff --git a/src/screens/Settings/screens/Explore/styles.ts b/src/screens/Settings/screens/Explore/styles.ts index e2bfb4edb..9b86e17e3 100644 --- a/src/screens/Settings/screens/Explore/styles.ts +++ b/src/screens/Settings/screens/Explore/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { scale, verticalScale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ main: { flex: 1 }, diff --git a/src/screens/Settings/screens/ManageWallets/ManageWallets.styles.ts b/src/screens/Settings/screens/ManageWallets/ManageWallets.styles.ts index 67e59c9f8..d67a91ca4 100644 --- a/src/screens/Settings/screens/ManageWallets/ManageWallets.styles.ts +++ b/src/screens/Settings/screens/ManageWallets/ManageWallets.styles.ts @@ -1,5 +1,5 @@ -import { COLORS } from '@constants/colors'; import { StyleSheet } from 'react-native'; +import { COLORS } from '@constants/colors'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx b/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx index 4857b3600..b81c4392d 100644 --- a/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx +++ b/src/screens/Settings/screens/ManageWallets/ManageWallets.tsx @@ -1,14 +1,14 @@ import React, { useCallback, useRef } from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './ManageWallets.styles'; -import { BottomSheetRef, Header } from '@components/composite'; -import { COLORS } from '@constants/colors'; -import { AllWallets } from './components'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { Button } from '@components/base'; +import { BottomSheetRef, Header } from '@components/composite'; import { AddIcon } from '@components/svg/icons'; import { BottomSheetWalletCreateOrImport } from '@components/templates'; +import { COLORS } from '@constants/colors'; import { scale } from '@utils'; +import { AllWallets } from './components'; +import { styles } from './ManageWallets.styles'; export const ManageWalletsScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx b/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx index 9e670a80d..5c0c6fc9d 100644 --- a/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx +++ b/src/screens/Settings/screens/ManageWallets/components/AllWallets.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { FlatList, ListRenderItemInfo } from 'react-native'; import { useFocusEffect, useNavigation } from '@react-navigation/native'; +import { SettingsTabNavigationProp } from '@appTypes'; +import { Button } from '@components/base'; import { WalletDBModel } from '@database'; import { useAllAccounts, useAllWallets } from '@hooks/database'; -import { Button } from '@components/base'; import { scale, verticalScale } from '@utils'; -import { SettingsTabNavigationProp } from '@appTypes'; import { WalletItem } from './Wallet'; export const AllWallets = () => { diff --git a/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx b/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx index 758e89b0e..61558ea89 100644 --- a/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx +++ b/src/screens/Settings/screens/ManageWallets/components/Wallet.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Image, StyleSheet } from 'react-native'; import { Row, Spacer, Text } from '@components/base'; +import { WalletIcon } from '@components/svg/icons/v2'; import { COLORS, CreditCardBg } from '@constants/colors'; import { WalletDBModel } from '@database'; -import { WalletIcon } from '@components/svg/icons/v2'; import { StringUtils, moderateScale, scale, verticalScale } from '@utils'; interface WalletItemProps { diff --git a/src/screens/Settings/screens/NotificationSettings/index.tsx b/src/screens/Settings/screens/NotificationSettings/index.tsx index e6f81ce0e..84d00e18a 100644 --- a/src/screens/Settings/screens/NotificationSettings/index.tsx +++ b/src/screens/Settings/screens/NotificationSettings/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { Header } from '@components/composite'; import { NotificationSettingsView } from '@components/templates'; diff --git a/src/screens/Settings/screens/SecuritySettings/index.tsx b/src/screens/Settings/screens/SecuritySettings/index.tsx index 7ddbe803f..c5fe5f26d 100644 --- a/src/screens/Settings/screens/SecuritySettings/index.tsx +++ b/src/screens/Settings/screens/SecuritySettings/index.tsx @@ -1,18 +1,18 @@ import React, { useCallback } from 'react'; import { StyleSheet, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; +import { useNavigation } from '@react-navigation/native'; import * as LocalAuthentication from 'expo-local-authentication'; import { useTranslation } from 'react-i18next'; -import { useNavigation } from '@react-navigation/native'; +import { SafeAreaView } from 'react-native-safe-area-context'; -import { Header } from '@components/composite'; +import { SettingsTabNavigationProp } from '@appTypes'; import { Button, Row, Spacer, Switch, Text } from '@components/base'; -import { moderateScale, scale, verticalScale } from '@utils'; +import { Header } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { SettingsTabNavigationProp } from '@appTypes'; -import { useSupportedBiometrics } from '@hooks'; import { usePasscodeStore } from '@features/passcode'; import { usePasscodeActions } from '@features/passcode/lib/hooks'; +import { useSupportedBiometrics } from '@hooks'; +import { moderateScale, scale, verticalScale } from '@utils'; export const SecuritySettingsScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx b/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx index f30eb7c08..e553bb0f7 100644 --- a/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx +++ b/src/screens/Settings/screens/SingleWallet/SingleWallet.tsx @@ -1,23 +1,23 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; import { Alert, TouchableOpacity, View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { SettingsTabParamsList } from '@appTypes'; +import { Button, Input, Spacer, Text } from '@components/base'; import { BottomAwareSafeAreaView, CopyToClipboardButton, Header } from '@components/composite'; -import { Button, Input, Spacer, Text } from '@components/base'; -import { scale, verticalScale } from '@utils'; import { QRCodeWithLogo } from '@components/modular'; -import { SettingsTabParamsList } from '@appTypes'; -import { useExplorerAccountFromHash, useSettingsWalletActions } from '@hooks'; -import { COLORS } from '@constants/colors'; import { TrashIcon } from '@components/svg/icons'; import { KeyIcon } from '@components/svg/icons/v2/settings'; import { BottomSheetViewAccessKey } from '@components/templates/BottomSheetViewAccessKey/BottomSheetViewAccessKey'; +import { COLORS } from '@constants/colors'; +import { useExplorerAccountFromHash, useSettingsWalletActions } from '@hooks'; +import { scale, verticalScale } from '@utils'; +import { styles } from './styles'; type Props = NativeStackScreenProps; diff --git a/src/screens/Settings/screens/SingleWallet/styles.ts b/src/screens/Settings/screens/SingleWallet/styles.ts index a97805db9..7692a0a78 100644 --- a/src/screens/Settings/screens/SingleWallet/styles.ts +++ b/src/screens/Settings/screens/SingleWallet/styles.ts @@ -1,6 +1,6 @@ import { StyleSheet } from 'react-native'; -import { moderateScale, scale, verticalScale } from '@utils'; import { COLORS } from '@constants/colors'; +import { moderateScale, scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx b/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx index a8c75456d..9e0567486 100644 --- a/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup/index.tsx @@ -1,10 +1,10 @@ import React, { ForwardedRef, forwardRef, RefObject } from 'react'; -import { BottomSheetRef } from '@components/composite'; import { Button, Spacer, Text } from '@components/base'; -import { useForwardedRef } from '@hooks'; +import { BottomSheetRef } from '@components/composite'; +import { BottomSheetFloat } from '@components/modular'; import { COLORS } from '@constants/colors'; +import { useForwardedRef } from '@hooks'; import { AccountList } from '@models'; -import { BottomSheetFloat } from '@components/modular'; import { verticalScale, StringUtils } from '@utils'; import { styles } from './styles'; diff --git a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/index.tsx b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/index.tsx index db638453c..b3450a2ca 100644 --- a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/components/GroupItem/index.tsx @@ -7,25 +7,25 @@ import React, { useState } from 'react'; import { Dimensions, Pressable, ViewStyle } from 'react-native'; +import { useNavigation } from '@react-navigation/native'; import { Swipeable } from 'react-native-gesture-handler'; import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import { useNavigation } from '@react-navigation/native'; -import { BottomSheetRef } from '@components/composite/BottomSheet/BottomSheet.types'; -import { BottomSheetCreateRenameGroup } from '@components/templates/BottomSheetCreateRenameGroup'; -import { AccountList } from '@models/AccountList'; +import { AirDAOEventType } from '@appTypes'; import { PortfolioNavigationProp } from '@appTypes/navigation'; -import { SwipeAction } from '@components/templates/AddressList/components/SwipeAction'; +import { BottomSheetRef } from '@components/composite/BottomSheet/BottomSheet.types'; import { CollectionItem } from '@components/modular'; +import { SwipeAction } from '@components/templates/AddressList/components/SwipeAction'; +import { BottomSheetCreateRenameGroup } from '@components/templates/BottomSheetCreateRenameGroup'; +import { useListActions } from '@features/lists'; import { useSwipeableDismissListener } from '@hooks'; import { AirDAOEventDispatcher } from '@lib'; -import { AirDAOEventType } from '@appTypes'; -import { styles } from './styles'; +import { AccountList } from '@models/AccountList'; import { BottomSheetConfirmRemoveGroup } from '@screens/Settings/screens/Watchlist/components/BottomSheetConfirmRemoveGroup'; -import { useListActions } from '@features/lists'; +import { styles } from './styles'; type Props = { group: AccountList; diff --git a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx index f6d2549d2..34257544d 100644 --- a/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/ListsOfAddressGroup/index.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { FlatList, View } from 'react-native'; -import { AccountList } from '@models/AccountList'; import { LocalizedRenderEmpty } from '@components/templates'; +import { AccountList } from '@models/AccountList'; import { verticalScale } from '@utils'; -import { GroupItem } from '../ListsOfAddressGroup/components/GroupItem'; import { styles } from './styles'; +import { GroupItem } from '../ListsOfAddressGroup/components/GroupItem'; type Props = { listsOfAddressGroup: AccountList[]; diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx index be19b85ac..9fc27c625 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections/index.tsx @@ -1,11 +1,11 @@ -import { View } from 'react-native'; import React from 'react'; -import { styles } from './styles'; +import { View } from 'react-native'; import { Spinner } from '@components/base'; -import { sortListByKey } from '@utils'; -import { ListsGroups } from '@screens/Settings/screens/Watchlist/components/ListsOfAddressGroup'; import { useAddressesStore, useFetchAddresses } from '@entities/addresses'; import { useListsSelector } from '@entities/lists'; +import { ListsGroups } from '@screens/Settings/screens/Watchlist/components/ListsOfAddressGroup'; +import { sortListByKey } from '@utils'; +import { styles } from './styles'; export const Collections = () => { const { refetch } = useFetchAddresses(); diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/PortfolioScreenTabItem/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/PortfolioScreenTabItem/index.tsx index b5c27164a..946820f68 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/PortfolioScreenTabItem/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/PortfolioScreenTabItem/index.tsx @@ -1,7 +1,7 @@ import React, { forwardRef, useCallback } from 'react'; import { Animated, TouchableOpacity, View } from 'react-native'; -import { styles } from './styles'; import { COLORS } from '@constants/colors'; +import { styles } from './styles'; type Props = { onPress: (index: number) => void; diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx index 890926388..2409a932d 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; +import { Spinner } from '@components/base'; +import { AddressList } from '@components/templates'; import { useAddressesStore, useFetchAddresses } from '@entities/addresses'; import { useWatchlist } from '@hooks'; -import { AddressList } from '@components/templates'; -import { Spinner } from '@components/base'; import { sortListByKey } from '@utils'; +import { styles } from './styles'; export const WatchList = () => { const { watchlist } = useWatchlist(); diff --git a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx index 17143f366..254d45b02 100644 --- a/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx +++ b/src/screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/index.tsx @@ -7,25 +7,25 @@ import React, { } from 'react'; import { View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import { Route, TabViewProps } from 'react-native-tab-view'; import { useTranslation } from 'react-i18next'; import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import { styles } from './styles'; -import { useListActions } from '@features/lists'; +import { Route, TabViewProps } from 'react-native-tab-view'; +import { SearchTabNavigationProp } from '@appTypes'; import { Button, Row, Spacer, Text } from '@components/base'; +import { BottomSheetRef, Header } from '@components/composite'; +import { BottomSheetCreateRenameGroup } from '@components/templates'; import { COLORS } from '@constants/colors'; +import { DEVICE_WIDTH } from '@constants/variables'; +import { useListActions } from '@features/lists'; import { scale, verticalScale } from '@utils'; -import { PortfolioScreenTabItem } from './components/PortfolioScreenTabItem'; import { PortfolioScreenTabIndicator } from './components/PortfolioScreenTabIndicator'; +import { PortfolioScreenTabItem } from './components/PortfolioScreenTabItem'; import { Measure } from './components/types'; -import { BottomSheetCreateRenameGroup } from '@components/templates'; -import { SearchTabNavigationProp } from '@appTypes'; -import { DEVICE_WIDTH } from '@constants/variables'; -import { BottomSheetRef, Header } from '@components/composite'; +import { styles } from './styles'; type Props = Parameters< NonNullable['renderTabBar']> diff --git a/src/screens/Settings/screens/Watchlist/index.tsx b/src/screens/Settings/screens/Watchlist/index.tsx index 277cde3fb..a62d20747 100644 --- a/src/screens/Settings/screens/Watchlist/index.tsx +++ b/src/screens/Settings/screens/Watchlist/index.tsx @@ -1,11 +1,11 @@ import React, { useState } from 'react'; -import { TabView } from 'react-native-tab-view'; -import type { Props as TabViewProps } from 'react-native-tab-view/lib/typescript/src/TabView'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { View } from 'react-native'; -import { WatchList } from '@screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists'; -import { Collections } from '@screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { TabView } from 'react-native-tab-view'; import { PortfolioScreenTabs } from '@screens/Settings/screens/Watchlist/components/PortfolioScreenTabs'; +import { Collections } from '@screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Collections'; +import { WatchList } from '@screens/Settings/screens/Watchlist/components/PortfolioScreenTabs/components/Watchlists'; +import type { Props as TabViewProps } from 'react-native-tab-view/lib/typescript/src/TabView'; export const Watchlist = () => { const portfolioTabRoutes = [ diff --git a/src/screens/Settings/styles.ts b/src/screens/Settings/styles.ts index aad1a05ea..2e6baaa5b 100644 --- a/src/screens/Settings/styles.ts +++ b/src/screens/Settings/styles.ts @@ -1,6 +1,6 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: {}, diff --git a/src/screens/SetupPasscode/SetupPasscode.tsx b/src/screens/SetupPasscode/SetupPasscode.tsx index 5a9835e6c..b83962d06 100644 --- a/src/screens/SetupPasscode/SetupPasscode.tsx +++ b/src/screens/SetupPasscode/SetupPasscode.tsx @@ -2,13 +2,13 @@ import React, { useEffect, useState } from 'react'; import { BackHandler, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { Header } from '@components/composite'; -import { Button, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { SettingsTabNavigationProp } from '@appTypes'; +import { Button, Text } from '@components/base'; +import { Header } from '@components/composite'; import { Passcode } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { styles } from './SetupPasscode.styles'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; export const SetupPasscode = () => { const { t } = useTranslation(); diff --git a/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx b/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx index a11fafb1d..4805ac816 100644 --- a/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx +++ b/src/screens/SetupPasscode/screens/ConfirmPasscode.tsx @@ -2,14 +2,14 @@ import React, { useState } from 'react'; import { Alert, View } from 'react-native'; import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { Header } from '@components/composite'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { HomeParamsList, SettingsTabNavigationProp } from '@appTypes'; import { Button, Spacer, Text } from '@components/base'; +import { Header } from '@components/composite'; import { Passcode } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { HomeParamsList, SettingsTabNavigationProp } from '@appTypes'; import { usePasscodeStore } from '@features/passcode'; import { scale, verticalScale, PasscodeUtils } from '@utils'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { styles } from '../SetupPasscode.styles'; export const ConfirmPasscode = () => { diff --git a/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx b/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx index 85d654a3d..015584b4e 100644 --- a/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx +++ b/src/screens/SetupPasscode/screens/SuccessSetupSecurity.tsx @@ -1,17 +1,17 @@ import React, { useEffect } from 'react'; -import { useTranslation } from 'react-i18next'; -import { CommonActions, useNavigation } from '@react-navigation/native'; import { SafeAreaView, StyleSheet, View } from 'react-native'; +import { CommonActions, useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; +import { HomeNavigationProp } from '@appTypes'; +import { Spacer, Text } from '@components/base'; import { BottomAwareSafeAreaView } from '@components/composite'; import { PrimaryButton } from '@components/modular'; -import { Spacer, Text } from '@components/base'; import { SuccessIcon } from '@components/svg/icons'; import { COLORS } from '@constants/colors'; -import { scale, verticalScale } from '@utils'; -import { HomeNavigationProp } from '@appTypes'; import { usePasscodeStore } from '@features/passcode'; import { usePasscodeActions } from '@features/passcode/lib/hooks'; +import { scale, verticalScale } from '@utils'; export const SuccessSetupSecurity = () => { const navigation = useNavigation(); diff --git a/src/screens/SingleCollection/index.tsx b/src/screens/SingleCollection/index.tsx index 2b014d543..d6919d65b 100644 --- a/src/screens/SingleCollection/index.tsx +++ b/src/screens/SingleCollection/index.tsx @@ -1,26 +1,26 @@ import React, { useCallback, useMemo, useRef } from 'react'; import { View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { CommonStackNavigationProp, CommonStackParamsList } from '@appTypes'; import { Button, Spacer, Text } from '@components/base'; +import { BottomSheetRef, Header } from '@components/composite'; +import { TokenLogo } from '@components/modular'; +import { AddIcon, EditIcon } from '@components/svg/icons'; import { AddressList, BottomSheetCreateRenameGroup, BottomSheetEditCollection } from '@components/templates'; -import { AddIcon, EditIcon } from '@components/svg/icons'; -import { BottomSheetRef, Header } from '@components/composite'; import { COLORS } from '@constants/colors'; -import { CommonStackNavigationProp, CommonStackParamsList } from '@appTypes'; -import { useUSDPrice } from '@hooks'; -import { BottomSheetAddNewAddressToGroup } from './modals/BottomSheetAddNewAddressToGroup'; -import { sortListByKey, NumberUtils, scale, verticalScale } from '@utils'; -import { TokenLogo } from '@components/modular'; +import { useFetchAddresses } from '@entities/addresses'; import { useListsSelector } from '@entities/lists'; import { useListActions } from '@features/lists'; -import { useFetchAddresses } from '@entities/addresses'; +import { useUSDPrice } from '@hooks'; +import { sortListByKey, NumberUtils, scale, verticalScale } from '@utils'; +import { BottomSheetAddNewAddressToGroup } from './modals/BottomSheetAddNewAddressToGroup'; +import { styles } from './styles'; export const SingleGroupScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/components/AddressItemWithCheckbox/index.tsx b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/components/AddressItemWithCheckbox/index.tsx index 48c6d3806..4d50fbb69 100644 --- a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/components/AddressItemWithCheckbox/index.tsx +++ b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/components/AddressItemWithCheckbox/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import { Spacer } from '@components/base'; import { View } from 'react-native'; -import { styles } from '../../styles'; +import { Spacer } from '@components/base'; import { CheckBox } from '@components/composite'; -import { ExplorerAccount } from '@models/Explorer'; import { WalletItem } from '@components/templates'; import { COLORS } from '@constants/colors'; +import { ExplorerAccount } from '@models/Explorer'; +import { styles } from '../../styles'; type Props = { item: ExplorerAccount; diff --git a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx index 5c1f351d6..aadb5e9d9 100644 --- a/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx +++ b/src/screens/SingleCollection/modals/BottomSheetAddNewAddressToGroup/index.tsx @@ -16,7 +16,7 @@ import { } from 'react-native'; import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { SearchAddressNoResult } from '@components/templates/SearchAddress/SearchAddress.NoMatch'; +import { Button, InputRef, Row, Spacer, Spinner, Text } from '@components/base'; import { BottomSheet, BottomSheetRef, @@ -27,25 +27,25 @@ import { SegmentedPicker } from '@components/composite'; import { PrimaryButton } from '@components/modular'; -import { Button, InputRef, Row, Spacer, Spinner, Text } from '@components/base'; -import { useForwardedRef } from '@hooks/useForwardedRef'; import { CloseIcon, ScannerQRIcon, SearchIcon } from '@components/svg/icons'; -import { COLORS } from '@constants/colors'; -import { useExplorerAccounts, useSearchAccount, useWatchlist } from '@hooks'; -import { moderateScale, scale, verticalScale } from '@utils'; import { BarcodeScanner } from '@components/templates'; -import { AccountList, ExplorerAccount } from '@models'; -import { SearchSort } from '@screens/Settings/screens/Explore/Search.types'; -import { ExplorerWalletItem } from '../../../Settings/screens/Explore/components'; +import { SearchAddressNoResult } from '@components/templates/SearchAddress/SearchAddress.NoMatch'; +import { COLORS } from '@constants/colors'; import { ethereumAddressRegex } from '@constants/regex'; -import { styles } from './styles'; -import i18n from '@localization/i18n'; import { useListActions } from '@features/lists'; +import { useExplorerAccounts, useSearchAccount, useWatchlist } from '@hooks'; +import { useForwardedRef } from '@hooks/useForwardedRef'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import i18n from '@localization/i18n'; +import { AccountList, ExplorerAccount } from '@models'; +import { SearchSort } from '@screens/Settings/screens/Explore/Search.types'; +import { moderateScale, scale, verticalScale } from '@utils'; +import { styles } from './styles'; +import { ExplorerWalletItem } from '../../../Settings/screens/Explore/components'; const AddressSources: Segment[] = [ { diff --git a/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx b/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx index 7856edbd0..098e430da 100644 --- a/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx +++ b/src/screens/SingleCollection/modals/BottomSheetRenameAddress/index.tsx @@ -1,14 +1,14 @@ import React, { ForwardedRef, forwardRef, RefObject, useState } from 'react'; import { View } from 'react-native'; -import { Spacer } from '@components/base/Spacer'; +import { useTranslation } from 'react-i18next'; import { Button, Input, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; +import { Spacer } from '@components/base/Spacer'; import { BottomSheetRef } from '@components/composite/BottomSheet/BottomSheet.types'; +import { BottomSheetFloat, PrimaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { useForwardedRef } from '@hooks/useForwardedRef'; import { styles } from '@screens/SingleCollection/modals/BottomSheetRenameAddress/styles'; -import { BottomSheetFloat, PrimaryButton } from '@components/modular'; import { scale, verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; type Props = { ref: RefObject; diff --git a/src/screens/StakingPool/components/Pending/index.tsx b/src/screens/StakingPool/components/Pending/index.tsx index 2fc9cae8b..c7c20f53e 100644 --- a/src/screens/StakingPool/components/Pending/index.tsx +++ b/src/screens/StakingPool/components/Pending/index.tsx @@ -1,9 +1,9 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; import Animated from 'react-native-reanimated'; import { Spacer, Spinner, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; export const StakePending = () => { const { t } = useTranslation(); diff --git a/src/screens/StakingPool/components/Stake/Stake.Preview.tsx b/src/screens/StakingPool/components/Stake/Stake.Preview.tsx index 9590d5517..9fc762282 100644 --- a/src/screens/StakingPool/components/Stake/Stake.Preview.tsx +++ b/src/screens/StakingPool/components/Stake/Stake.Preview.tsx @@ -1,11 +1,11 @@ +import React from 'react'; +import { StyleSheet, View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; import { useUSDPrice } from '@hooks'; import { StringUtils, NumberUtils, scale, verticalScale } from '@utils'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; -import { StyleSheet, View } from 'react-native'; interface StakePreviewProps { walletAddress: string; diff --git a/src/screens/StakingPool/components/Stake/Stake.tsx b/src/screens/StakingPool/components/Stake/Stake.tsx index ebda80f54..a7ee1e647 100644 --- a/src/screens/StakingPool/components/Stake/Stake.tsx +++ b/src/screens/StakingPool/components/Stake/Stake.tsx @@ -1,29 +1,28 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; import { StyleSheet, View } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { NavigationProp, useNavigation } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; +import { staking } from '@api/staking/staking-service'; +import { ReturnedPoolDetails } from '@api/staking/types'; +import { HomeParamsList } from '@appTypes'; import { InputRef, Row, Spacer, Text } from '@components/base'; -import { PrimaryButton } from '@components/modular'; -import { COLORS } from '@constants/colors'; import { BottomSheet, BottomSheetRef, InputWithIcon } from '@components/composite'; -import { useBalanceOfAddress, useUSDPrice } from '@hooks'; -import { AccountDBModel } from '@database'; -import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; -import { StakePreview } from './Stake.Preview'; -import { staking } from '@api/staking/staking-service'; -import { ReturnedPoolDetails } from '@api/staking/types'; -import { HomeParamsList } from '@appTypes'; -import { StakePending } from '@screens/StakingPool/components'; import { PercentageBox } from '@components/composite/PercentageBox'; - +import { PrimaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; +import { AccountDBModel } from '@database'; +import { useBalanceOfAddress, useUSDPrice } from '@hooks'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { StakePending } from '@screens/StakingPool/components'; +import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; +import { StakePreview } from './Stake.Preview'; const WITHDRAW_PERCENTAGES = [25, 50, 75, 100]; diff --git a/src/screens/StakingPool/components/StakingInfo.tsx b/src/screens/StakingPool/components/StakingInfo.tsx index 4aab75c4c..ce960a054 100644 --- a/src/screens/StakingPool/components/StakingInfo.tsx +++ b/src/screens/StakingPool/components/StakingInfo.tsx @@ -1,12 +1,12 @@ +import React, { PropsWithChildren, ReactNode } from 'react'; +import { StyleSheet, View } from 'react-native'; +import { BigNumber, ethers } from 'ethers'; +import { useTranslation } from 'react-i18next'; import { CryptoCurrencyCode } from '@appTypes'; import { Row, Spacer, Text } from '@components/base'; import { COLORS } from '@constants/colors'; import { useCurrencyRate } from '@hooks'; import { moderateScale, scale, verticalScale, NumberUtils } from '@utils'; -import React, { PropsWithChildren, ReactNode } from 'react'; -import { useTranslation } from 'react-i18next'; -import { StyleSheet, View } from 'react-native'; -import { BigNumber, ethers } from 'ethers'; interface StakingInfoProps { totalStake: number; diff --git a/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx b/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx index 423bf1468..475bf7f21 100644 --- a/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx +++ b/src/screens/StakingPool/components/Withdraw/BottomSheet/Withdraw.Preview.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { View } from 'react-native'; +import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; -import { styles } from './styles'; +import { PrimaryButton } from '@components/modular'; import { COLORS } from '@constants/colors'; -import { useTranslation } from 'react-i18next'; -import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; import { useUSDPrice } from '@hooks'; -import { PrimaryButton } from '@components/modular'; +import { NumberUtils, StringUtils, scale, verticalScale } from '@utils'; +import { styles } from './styles'; interface WithdrawTokenPreviewProps { wallet: string; diff --git a/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts b/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts index 5b5cf8a61..e3aa4a356 100644 --- a/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts +++ b/src/screens/StakingPool/components/Withdraw/BottomSheet/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/StakingPool/components/Withdraw/Withdraw.tsx b/src/screens/StakingPool/components/Withdraw/Withdraw.tsx index 159fde789..0604c7a1d 100644 --- a/src/screens/StakingPool/components/Withdraw/Withdraw.tsx +++ b/src/screens/StakingPool/components/Withdraw/Withdraw.tsx @@ -2,28 +2,28 @@ import React, { useCallback, useMemo, useRef, useState } from 'react'; import { View } from 'react-native'; import { NavigationProp, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; +import { staking } from '@api/staking/staking-service'; +import { ReturnedPoolDetails } from '@api/staking/types'; +import { HomeParamsList } from '@appTypes'; import { InputRef, Row, Spacer, Text } from '@components/base'; import { BottomSheet, BottomSheetRef, InputWithIcon } from '@components/composite'; -import { styles } from './styles'; -import { COLORS } from '@constants/colors'; import { PercentageBox } from '@components/composite/PercentageBox'; -import { NumberUtils, StringUtils, verticalScale } from '@utils'; import { PrimaryButton } from '@components/modular'; +import { COLORS } from '@constants/colors'; import { AccountDBModel } from '@database'; -import { WithdrawTokenPreview } from './BottomSheet/Withdraw.Preview'; -import { ReturnedPoolDetails } from '@api/staking/types'; -import { staking } from '@api/staking/staking-service'; -import { HomeParamsList } from '@appTypes'; -import { StakePending } from '@screens/StakingPool/components'; - import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { StakePending } from '@screens/StakingPool/components'; + +import { NumberUtils, StringUtils, verticalScale } from '@utils'; +import { WithdrawTokenPreview } from './BottomSheet/Withdraw.Preview'; +import { styles } from './styles'; const WITHDRAW_PERCENTAGES = [25, 50, 75, 100]; diff --git a/src/screens/StakingPool/components/Withdraw/styles.ts b/src/screens/StakingPool/components/Withdraw/styles.ts index 1ff966354..fc95104b3 100644 --- a/src/screens/StakingPool/components/Withdraw/styles.ts +++ b/src/screens/StakingPool/components/Withdraw/styles.ts @@ -1,6 +1,6 @@ +import { StyleSheet } from 'react-native'; import { COLORS } from '@constants/colors'; import { scale } from '@utils'; -import { StyleSheet } from 'react-native'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/StakingPool/index.tsx b/src/screens/StakingPool/index.tsx index c94072c36..dfafd0cd3 100644 --- a/src/screens/StakingPool/index.tsx +++ b/src/screens/StakingPool/index.tsx @@ -1,25 +1,25 @@ import React, { useEffect, useRef, useState } from 'react'; import { Keyboard, ScrollView, View } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; import { RouteProp, useRoute } from '@react-navigation/native'; import { BigNumber } from 'ethers'; -import { styles } from './style'; +import { useTranslation } from 'react-i18next'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { CryptoCurrencyCode, HomeParamsList } from '@appTypes'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { Header } from '@components/composite'; import { AnimatedTabs, TokenLogo } from '@components/modular'; +import { WalletPicker } from '@components/templates'; import { COLORS } from '@constants/colors'; import { shadow } from '@constants/shadow'; -import { CryptoCurrencyCode, HomeParamsList } from '@appTypes'; -import { StakingInfo } from './components'; -import { WalletPicker } from '@components/templates'; -import { useAllAccounts } from '@hooks/database'; -import { WithdrawToken } from './components/Withdraw'; -import { TokenUtils, scale, verticalScale } from '@utils'; -import { useWalletStore } from '@entities/wallet'; +import { DEVICE_HEIGHT } from '@constants/variables'; import { useStakingPoolDetails, useStakingPoolsStore } from '@entities/staking'; +import { useWalletStore } from '@entities/wallet'; +import { useAllAccounts } from '@hooks/database'; import { StakeToken } from '@screens/StakingPool/components/Stake/Stake'; -import { DEVICE_HEIGHT } from '@constants/variables'; +import { TokenUtils, scale, verticalScale } from '@utils'; +import { StakingInfo } from './components'; +import { WithdrawToken } from './components/Withdraw'; +import { styles } from './style'; const CURRENCY = CryptoCurrencyCode.AMB; diff --git a/src/screens/StakingPool/screens/Stake.Error.tsx b/src/screens/StakingPool/screens/Stake.Error.tsx index a4faa169e..875ac2b7b 100644 --- a/src/screens/StakingPool/screens/Stake.Error.tsx +++ b/src/screens/StakingPool/screens/Stake.Error.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; import { NavigationProp, useNavigation } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; +import { HomeParamsList } from '@appTypes'; import { Spacer, Text } from '@components/base'; import { PrimaryButton } from '@components/modular'; -import { COLORS } from '@constants/colors'; -import { HomeParamsList } from '@appTypes'; import { FailedIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; import { verticalScale } from '@utils'; +import { styles } from './styles'; export const StakeErrorScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/StakingPool/screens/Stake.Success.tsx b/src/screens/StakingPool/screens/Stake.Success.tsx index 527cd7f3f..a6d0561d9 100644 --- a/src/screens/StakingPool/screens/Stake.Success.tsx +++ b/src/screens/StakingPool/screens/Stake.Success.tsx @@ -1,22 +1,22 @@ import React, { useMemo, useState } from 'react'; import { View } from 'react-native'; -import { styles } from './styles'; -import { Spacer, Spinner, Text } from '@components/base'; -import { PrimaryButton } from '@components/modular'; -import { COLORS } from '@constants/colors'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { NavigationProp, RouteProp, useNavigation, useRoute } from '@react-navigation/native'; +import { useTranslation } from 'react-i18next'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { HomeParamsList } from '@appTypes'; +import { Spacer, Spinner, Text } from '@components/base'; +import { PrimaryButton } from '@components/modular'; import { SuccessIcon } from '@components/svg/icons'; -import { verticalScale } from '@utils'; -import { useTranslation } from 'react-i18next'; -import { useBalanceOfAddress, useTokensAndTransactions } from '@hooks'; +import { COLORS } from '@constants/colors'; import { useStakingPoolsStore } from '@entities/staking'; +import { useBalanceOfAddress, useTokensAndTransactions } from '@hooks'; +import { verticalScale } from '@utils'; +import { styles } from './styles'; export const StakeSuccessScreen = () => { const route = useRoute>(); diff --git a/src/screens/StakingPool/style.ts b/src/screens/StakingPool/style.ts index 519574826..d70a6a03f 100644 --- a/src/screens/StakingPool/style.ts +++ b/src/screens/StakingPool/style.ts @@ -1,7 +1,7 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; -import { DEVICE_WIDTH } from '@constants/variables'; import { COLORS } from '@constants/colors'; +import { DEVICE_WIDTH } from '@constants/variables'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/StakingPools/index.tsx b/src/screens/StakingPools/index.tsx index 21051b360..9b557ef80 100644 --- a/src/screens/StakingPools/index.tsx +++ b/src/screens/StakingPools/index.tsx @@ -1,21 +1,21 @@ import React, { useEffect, useMemo } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; +import { useNavigation } from '@react-navigation/native'; import * as Updates from 'expo-updates'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { useNavigation } from '@react-navigation/native'; -import { styles } from './styles'; -import { Header } from '@components/composite'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeNavigationProp } from '@appTypes'; import { Row, Spacer, Spinner, Text } from '@components/base'; -import { scale, verticalScale } from '@utils'; -import { COLORS } from '@constants/colors'; +import { Header } from '@components/composite'; import { StakingPoolList } from '@components/templates'; -import { HomeNavigationProp } from '@appTypes'; -import { StakingPool } from '@models'; -import { useAmbrosusStakingPools } from '@hooks'; +import { COLORS } from '@constants/colors'; -import { useWalletStore } from '@entities/wallet'; import { useStakingPoolsStore } from '@entities/staking'; +import { useWalletStore } from '@entities/wallet'; +import { useAmbrosusStakingPools } from '@hooks'; +import { StakingPool } from '@models'; +import { scale, verticalScale } from '@utils'; +import { styles } from './styles'; export const StakingPoolsScreen = () => { const navigation = useNavigation(); diff --git a/src/screens/Swap/index.tsx b/src/screens/Swap/index.tsx index 87b50224b..f139aa158 100644 --- a/src/screens/Swap/index.tsx +++ b/src/screens/Swap/index.tsx @@ -1,23 +1,23 @@ import React, { useCallback, useMemo } from 'react'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useFocusEffect } from '@react-navigation/native'; +import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { HomeParamsList } from '@appTypes'; +import { Button } from '@components/base'; import { Header } from '@components/composite'; +import { SettingsFilledIcon } from '@components/svg/icons'; +import { COLORS } from '@constants/colors'; import { BottomSheetPreviewSwap, BottomSheetTokensList, SwapForm } from '@features/swap/components/templates'; import { useSwapContextSelector } from '@features/swap/context'; -import { FIELD } from '@features/swap/types'; -import { SettingsFilledIcon } from '@components/svg/icons'; -import { COLORS } from '@constants/colors'; -import { Button } from '@components/base'; import { useAllLiquidityPools } from '@features/swap/lib/hooks'; -import { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { HomeParamsList } from '@appTypes'; import { useSwapAllBalances } from '@features/swap/lib/hooks/use-swap-all-balances'; +import { FIELD } from '@features/swap/types'; +import { styles } from './styles'; type Props = NativeStackScreenProps; diff --git a/src/screens/Swap/screens/settings/settings.tsx b/src/screens/Swap/screens/settings/settings.tsx index f11044fe5..1a96e1123 100644 --- a/src/screens/Swap/screens/settings/settings.tsx +++ b/src/screens/Swap/screens/settings/settings.tsx @@ -1,8 +1,7 @@ import React from 'react'; import { View } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; import { useTranslation } from 'react-i18next'; -import { styles } from './styles'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { KeyboardDismissingView, Spacer } from '@components/base'; import { Header } from '@components/composite'; import { @@ -12,6 +11,7 @@ import { SettingsMultiHopForm } from '@features/swap/components/composite'; import { scale } from '@utils'; +import { styles } from './styles'; export const SwapSettingsScreen = () => { const { t } = useTranslation(); diff --git a/src/screens/Swap/screens/settings/styles.ts b/src/screens/Swap/screens/settings/styles.ts index bcb00ff6f..e4caf2af9 100644 --- a/src/screens/Swap/screens/settings/styles.ts +++ b/src/screens/Swap/screens/settings/styles.ts @@ -1,5 +1,5 @@ -import { scale, verticalScale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale, verticalScale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Swap/styles.ts b/src/screens/Swap/styles.ts index 87de847a9..b9b8cfa25 100644 --- a/src/screens/Swap/styles.ts +++ b/src/screens/Swap/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ container: { diff --git a/src/screens/Wallets/index.tsx b/src/screens/Wallets/index.tsx index 47564c23a..2c548b049 100644 --- a/src/screens/Wallets/index.tsx +++ b/src/screens/Wallets/index.tsx @@ -1,8 +1,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { LayoutChangeEvent } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import { ethers } from 'ethers'; import { useFocusEffect } from '@react-navigation/native'; +import { ethers } from 'ethers'; import Animated, { Easing, useAnimatedScrollHandler, @@ -13,21 +12,22 @@ import Animated, { withTiming, cancelAnimation } from 'react-native-reanimated'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { Spacer } from '@components/base'; +import { WalletCardHeight } from '@components/modular/WalletCard/styles'; import { AccountActions, PaginatedAccountList, WalletTransactionsAndAssets } from '@components/templates'; -import { Spacer } from '@components/base'; +import { useCurrenciesQuery } from '@entities/currencies/lib'; +import { useWalletStore } from '@entities/wallet'; +import { useSendFundsStore } from '@features/send-funds'; +import { HomeHeader } from '@features/wallet-assets/components/templates'; import { useBalanceOfAddress } from '@hooks'; import { useAllAccounts } from '@hooks/database'; import { ExplorerAccount } from '@models'; import { WalletUtils, scale, SCREEN_HEIGHT, verticalScale } from '@utils'; -import { WalletCardHeight } from '@components/modular/WalletCard/styles'; -import { HomeHeader } from '@features/wallet-assets/components/templates'; -import { useWalletStore } from '@entities/wallet'; -import { useSendFundsStore } from '@features/send-funds'; -import { useCurrenciesQuery } from '@entities/currencies/lib'; const SPRING_CONFIG = { damping: 20, diff --git a/src/screens/Wallets/styles.ts b/src/screens/Wallets/styles.ts index 569c28d96..dcdea19f6 100644 --- a/src/screens/Wallets/styles.ts +++ b/src/screens/Wallets/styles.ts @@ -1,5 +1,5 @@ -import { scale } from '@utils'; import { StyleSheet } from 'react-native'; +import { scale } from '@utils'; export const styles = StyleSheet.create({ accountCard: { diff --git a/src/utils/__tests__/share.test.tsx b/src/utils/__tests__/share.test.tsx index 2cae75187..83f9fb35e 100644 --- a/src/utils/__tests__/share.test.tsx +++ b/src/utils/__tests__/share.test.tsx @@ -1,6 +1,6 @@ -import Share from 'react-native-share'; -import * as ExpoSharing from 'expo-sharing'; import { Platform } from 'react-native'; +import * as ExpoSharing from 'expo-sharing'; +import Share from 'react-native-share'; import { ShareUtils } from '@utils/share'; jest.mock('react-native-share', () => ({ diff --git a/src/utils/bridge.ts b/src/utils/bridge.ts index c89fcae1c..e61b1e000 100644 --- a/src/utils/bridge.ts +++ b/src/utils/bridge.ts @@ -1,5 +1,5 @@ -import { StringUtils } from '@utils/string'; import moment from 'moment/moment'; +import { StringUtils } from '@utils/string'; export enum NETWORK { eth = 'Ethereum', diff --git a/src/utils/cashback.ts b/src/utils/cashback.ts index cbf9ecadf..cd3062e98 100644 --- a/src/utils/cashback.ts +++ b/src/utils/cashback.ts @@ -1,6 +1,6 @@ -import AirDAOKeysStorage from '@lib/crypto/AirDAOKeysStorage'; -import AirDAOKeysForRefStorage from '@lib/crypto/AirDAOKeysForRefStorage'; import AirDAOKeysForRef from '@lib/crypto/AirDAOKeysForRef'; +import AirDAOKeysForRefStorage from '@lib/crypto/AirDAOKeysForRefStorage'; +import { singleAirDAOStorage } from '@lib/crypto/AirDAOKeysStorage'; const getByHash = async (tmpHash: string) => { let tmpPublicAndPrivateResult = @@ -12,7 +12,7 @@ const getByHash = async (tmpHash: string) => { ) { return tmpPublicAndPrivateResult; } - const mnemonic = await AirDAOKeysStorage.getWalletMnemonic(tmpHash); + const mnemonic = await singleAirDAOStorage.getWalletMnemonic(tmpHash); if (!mnemonic) { return false; diff --git a/src/utils/createContextSelector.tsx b/src/utils/createContextSelector.tsx index 927a227bb..c52ec84eb 100644 --- a/src/utils/createContextSelector.tsx +++ b/src/utils/createContextSelector.tsx @@ -1,5 +1,5 @@ -import { createContext, useContextSelector } from 'use-context-selector'; import { FC, Context } from 'react'; +import { createContext, useContextSelector } from 'use-context-selector'; type CreateContextSelectorTuple = [ FC, diff --git a/src/utils/device.ts b/src/utils/device.ts index 685af482b..71931c916 100644 --- a/src/utils/device.ts +++ b/src/utils/device.ts @@ -1,6 +1,6 @@ import { Platform } from 'react-native'; -import * as Updates from 'expo-updates'; import * as LocalAuthentication from 'expo-local-authentication'; +import * as Updates from 'expo-updates'; const isIOS = Platform.OS === 'ios'; const isAndroid = Platform.OS === 'android'; diff --git a/src/utils/index.ts b/src/utils/index.ts index 9e5551b5d..5e611bf6c 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -21,7 +21,6 @@ export * from './number'; export * from './object'; export * from './passcode'; export * from './platform'; -export * from './safe-types'; export * from './scaling'; export * from './share'; export * from './sort'; diff --git a/src/utils/keys.ts b/src/utils/keys.ts index b14c1929d..22220bcf0 100644 --- a/src/utils/keys.ts +++ b/src/utils/keys.ts @@ -1,9 +1,8 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -import * as Crypto from 'expo-crypto'; -import { DEFAULT_WORDS } from '@constants/words'; +import bip39 from 'bip39'; // @ts-ignore import createHmac from 'create-hmac'; -const bip39 = require('bip39'); +import * as Crypto from 'expo-crypto'; +import { DEFAULT_WORDS } from '@constants/words'; interface CreateHmacPDFK2Sizes { [key: string]: number; diff --git a/src/utils/mnemonics.ts b/src/utils/mnemonics.ts index a318095a4..322aa9d95 100644 --- a/src/utils/mnemonics.ts +++ b/src/utils/mnemonics.ts @@ -1,5 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires -const bip39 = require('bip39'); +import bip39 from 'bip39'; import { DEFAULT_WORDS } from '@constants/words'; import { CryptoUtils } from './crypto'; diff --git a/src/utils/share.ts b/src/utils/share.ts index 1883f8eb7..20046b986 100644 --- a/src/utils/share.ts +++ b/src/utils/share.ts @@ -1,7 +1,7 @@ -import Share from 'react-native-share'; +import { Platform } from 'react-native'; import * as ExpoSharing from 'expo-sharing'; +import Share from 'react-native-share'; import { Social, SharingOptionsWithMedia } from '@appTypes'; -import { Platform } from 'react-native'; const shareImage = async (options: SharingOptionsWithMedia) => { return await ExpoSharing.shareAsync(options.uri, { diff --git a/src/utils/token.ts b/src/utils/token.ts index 31cba7392..93392707c 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -1,6 +1,6 @@ import { CryptoCurrencyCode } from '@appTypes'; -import { SwapStringUtils } from '@features/swap/utils'; import Config from '@constants/config'; +import { SwapStringUtils } from '@features/swap/utils'; export interface TokenInfo { address?: string; diff --git a/src/utils/wallet.ts b/src/utils/wallet.ts index 0b573edd5..6e959860e 100644 --- a/src/utils/wallet.ts +++ b/src/utils/wallet.ts @@ -1,6 +1,5 @@ -import { Wallet } from '@models/Wallet'; +import { API } from '@api/api'; import { CryptoCurrencyCode, DatabaseTable, WalletMetadata } from '@appTypes'; -import AirDAOKeysStorage from '@lib/crypto/AirDAOKeysStorage'; import { AccountDB, AccountDBModel, @@ -9,17 +8,17 @@ import { WalletDBModel } from '@database'; import AirDAOKeysForRef from '@lib/crypto/AirDAOKeysForRef'; -import { MnemonicUtils } from './mnemonics'; -import { CashBackUtils } from './cashback'; -import { Cache, CacheKey } from '../lib/cache'; -import { AccountUtils } from './account'; -import { CryptoUtils } from './crypto'; -import { API } from '@api/api'; - +import { singleAirDAOStorage } from '@lib/crypto/AirDAOKeysStorage'; import { CustomAppEvents, sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { Wallet } from '@models/Wallet'; +import { AccountUtils } from './account'; +import { CashBackUtils } from './cashback'; +import { CryptoUtils } from './crypto'; +import { MnemonicUtils } from './mnemonics'; +import { Cache, CacheKey } from '../lib/cache'; const _saveWallet = async ( wallet: Pick & { @@ -41,11 +40,11 @@ const _saveWallet = async ( : MnemonicUtils.recheckMnemonic(prepared.mnemonic); prepared.hash = await CryptoUtils.hashMnemonic(prepared.mnemonic); - const checkKey = await AirDAOKeysStorage.isMnemonicAlreadySaved(prepared); + const checkKey = await singleAirDAOStorage.isMnemonicAlreadySaved(prepared); if (checkKey) { // TODO } - storedKey = await AirDAOKeysStorage.saveMnemonic(prepared); + storedKey = await singleAirDAOStorage.saveMnemonic(prepared); } catch (e) {} return storedKey; }; diff --git a/tsconfig.json b/tsconfig.json index 6c3916eb7..bd1cf8fd1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,22 +11,25 @@ "jsx": "react", "allowJs": true, "experimentalDecorators": true, + "baseUrl": "./", "paths": { - "@*": ["./src/*"], - "@api/*": ["./src/api/*"], - "@appTypes/*": ["./src/appTypes/*"], - "@assets/*": ["./src/assets/*"], - "@components/*": ["./src/components/*"], - "@constants/*": ["./src/constants/*"], - "@contexts/*": ["./src/contexts/*"], - "@crypto/*": ["./crypto/*"], - "@database/*": ["./src/database/*"], - "@hooks/*": ["./src/hooks/*"], - "@lib/*": ["./src/lib/*"], - "@models/*": ["./src/models/*"], - "@navigation/*": ["./src/navigation/*"], - "@screens/*": ["./src/screens/*"], - "@utils/*": ["./src/utils/*"] + "@*": ["src/*"], + "@api/*": ["src/api/*"], + "@appTypes/*": ["src/appTypes/*"], + "@assets/*": ["src/assets/*"], + "@components/*": ["src/components/*"], + "@constants/*": ["src/constants/*"], + "@contexts/*": ["src/contexts/*"], + "@features/*": ["src/features/*"], + "@entities/*": ["src/entities/*"], + "@crypto/*": ["crypto/*"], + "@database/*": ["src/database/*"], + "@hooks/*": ["src/hooks/*"], + "@lib/*": ["src/lib/*"], + "@models/*": ["src/models/*"], + "@navigation/*": ["src/navigation/*"], + "@screens/*": ["src/screens/*"], + "@utils/*": ["src/utils/*"] } } } diff --git a/yarn.lock b/yarn.lock index ebb45afee..818a89d69 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3468,6 +3468,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nolyfill/is-core-module@1.0.39": + version "1.0.39" + resolved "https://registry.yarnpkg.com/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz#3dc35ba0f1e66b403c00b39344f870298ebb1c8e" + integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA== + "@nozbe/simdjson@3.1.0-wmelon1": version "3.1.0-wmelon1" resolved "https://registry.yarnpkg.com/@nozbe/simdjson/-/simdjson-3.1.0-wmelon1.tgz#e02048b41d2b3662ddf1dc8c979a3a36fd389dfb" @@ -4068,6 +4073,11 @@ "@walletconnect/types" "2.17.1" "@walletconnect/utils" "2.17.1" +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@segment/loosely-validate-event@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz" @@ -5367,6 +5377,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -5383,20 +5401,44 @@ array-includes@^3.1.5, array-includes@^3.1.6: get-intrinsic "^1.1.3" is-string "^1.0.7" +array-includes@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== +array.prototype.findlastindex@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.flat@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz#534aaf9e6e8dd79fb6b9a9917f839ef1ec63afe5" + integrity sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" array.prototype.flatmap@^1.3.1: version "1.3.1" @@ -5408,6 +5450,16 @@ array.prototype.flatmap@^1.3.1: es-abstract "^1.20.4" es-shim-unscopables "^1.0.0" +array.prototype.flatmap@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz#712cc792ae70370ae40586264629e33aab5dd38b" + integrity sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-shim-unscopables "^1.0.2" + array.prototype.tosorted@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz" @@ -5419,6 +5471,19 @@ array.prototype.tosorted@^1.1.1: es-shim-unscopables "^1.0.0" get-intrinsic "^1.1.3" +arraybuffer.prototype.slice@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" + integrity sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.8" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + is-array-buffer "^3.0.4" + asap@~2.0.3, asap@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" @@ -5498,6 +5563,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -6264,6 +6336,14 @@ cacheable-request@^7.0.2: normalize-url "^6.0.1" responselike "^2.0.0" +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" @@ -6272,6 +6352,24 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7, call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== + dependencies: + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz" @@ -6998,6 +7096,33 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz#068307f9b71ab76dbbe10291389e020856606191" + integrity sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-data-view "^1.0.1" + dayjs@^1.8.15: version "1.11.7" resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz" @@ -7024,6 +7149,13 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.7: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + decamelize@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" @@ -7122,6 +7254,15 @@ defer-to-connect@^2.0.0: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" @@ -7135,6 +7276,15 @@ define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + defu@^6.1.4: version "6.1.4" resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" @@ -7342,6 +7492,15 @@ dotenv@~16.0.3: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== +dunder-proto@^1.0.0, dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexer3@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" @@ -7478,6 +7637,14 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" +enhanced-resolve@^5.15.0: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + entities@^4.2.0: version "4.4.0" resolved "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz" @@ -7565,6 +7732,70 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.9" +es-abstract@^1.23.2, es-abstract@^1.23.5, es-abstract@^1.23.6: + version "1.23.6" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.6.tgz#55f0e1ce7128995cc04ace0a57d7dca348345108" + integrity sha512-Ifco6n3yj2tMZDWNLyloZrytt9lqqlwvS83P3HtaETR0NUOYnIULGGHpktqYGObGy+8wc1okO25p8TjemhImvA== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.3" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.7" + get-intrinsic "^1.2.6" + get-symbol-description "^1.0.2" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-negative-zero "^2.0.3" + is-regex "^1.2.1" + is-shared-array-buffer "^1.0.3" + is-string "^1.1.1" + is-typed-array "^1.1.13" + is-weakref "^1.1.0" + math-intrinsics "^1.0.0" + object-inspect "^1.13.3" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.3" + safe-array-concat "^1.1.3" + safe-regex-test "^1.1.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.3" + typed-array-length "^1.0.7" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.16" + +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-get-iterator@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -7580,6 +7811,13 @@ es-get-iterator@^1.1.3: isarray "^2.0.5" stop-iteration-iterator "^1.0.0" +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz" @@ -7589,6 +7827,15 @@ es-set-tostringtag@^2.0.1: has "^1.0.3" has-tostringtag "^1.0.0" +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" @@ -7596,6 +7843,13 @@ es-shim-unscopables@^1.0.0: dependencies: has "^1.0.3" +es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" @@ -7605,6 +7859,15 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es-to-primitive@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.3.0.tgz#96c89c82cc49fd8794a24835ba3e1ff87f214e18" + integrity sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g== + dependencies: + is-callable "^1.2.7" + is-date-object "^1.0.5" + is-symbol "^1.0.4" + es5-ext@^0.10.35, es5-ext@^0.10.50: version "0.10.62" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" @@ -7703,19 +7966,33 @@ eslint-config-standard@17.0.0: resolved "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz" integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== +eslint-import-resolver-typescript@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz#e69925936a771a9cb2de418ccebc4cdf6c0818aa" + integrity sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow== + dependencies: + "@nolyfill/is-core-module" "1.0.39" + debug "^4.3.7" + enhanced-resolve "^5.15.0" + fast-glob "^3.3.2" + get-tsconfig "^4.7.5" + is-bun-module "^1.0.2" + is-glob "^4.0.3" + stable-hash "^0.0.4" + +eslint-module-utils@^2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz#fe4cfb948d61f49203d7b08871982b65b9af0b0b" + integrity sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg== dependencies: debug "^3.2.7" @@ -7727,26 +8004,30 @@ eslint-plugin-es@^4.1.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@^2.27.5: - version "2.27.5" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== +eslint-plugin-import@^2.31.0: + version "2.31.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz#310ce7e720ca1d9c0bb3f69adfd1c6bdd7d9e0e7" + integrity sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A== dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" - has "^1.0.3" - is-core-module "^2.11.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.12.0" + hasown "^2.0.2" + is-core-module "^2.15.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" + semver "^6.3.1" + string.prototype.trimend "^1.0.8" + tsconfig-paths "^3.15.0" eslint-plugin-n@^15.6.1: version "15.7.0" @@ -8637,6 +8918,17 @@ fast-glob@^3.2.5, fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" @@ -9073,6 +9365,17 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" +function.prototype.name@^1.1.6, function.prototype.name@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.7.tgz#9df48ea5f746bf577d7e15b5da89df8952a98e7b" + integrity sha512-2g4x+HqTJKM9zcJqBSpjoRmdcPFtJM60J3xJisTQSXBWka5XqyBN/2tNUgma1mztTXyDuUsEtYe5qcs7xYzYQA== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + functions-have-names "^1.2.3" + hasown "^2.0.2" + is-callable "^1.2.7" + functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" @@ -9097,6 +9400,22 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" + integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== + dependencies: + call-bind-apply-helpers "^1.0.1" + dunder-proto "^1.0.0" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + function-bind "^1.1.2" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.0.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -9144,6 +9463,22 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-symbol-description@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.1.0.tgz#7bdd54e0befe8ffc9f3b4e203220d9f1e881b6ee" + integrity sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + +get-tsconfig@^4.7.5: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + getenv@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/getenv/-/getenv-1.0.0.tgz" @@ -9243,6 +9578,14 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" +globalthis@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== + dependencies: + define-properties "^1.2.1" + gopd "^1.0.1" + globby@^11.0.1, globby@^11.1.0: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" @@ -9262,6 +9605,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + got@9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -9374,16 +9722,35 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.2.0.tgz#5de5a6eabd95fdffd9818b43055e8065e39fe9d5" + integrity sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ== + dependencies: + dunder-proto "^1.0.0" + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" @@ -9391,6 +9758,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" @@ -9423,7 +9797,7 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.0: +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -9745,6 +10119,15 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: has "^1.0.3" side-channel "^1.0.4" +internal-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.1.0.tgz#1eac91762947d2f7056bc838d93e13b2e9604961" + integrity sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.2" + side-channel "^1.1.0" + invariant@*, invariant@^2.2.4: version "2.2.4" resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" @@ -9784,6 +10167,15 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" +is-array-buffer@^3.0.4: + version "3.0.5" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280" + integrity sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -9794,6 +10186,13 @@ is-arrayish@^0.3.1: resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== +is-async-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" + integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA== + dependencies: + has-tostringtag "^1.0.0" + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" @@ -9801,6 +10200,13 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" +is-bigint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.1.0.tgz#dda7a3445df57a42583db4228682eba7c4170672" + integrity sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ== + dependencies: + has-bigints "^1.0.2" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -9816,11 +10222,26 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-boolean-object@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.2.1.tgz#c20d0c654be05da4fbc23c562635c019e93daf89" + integrity sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + is-buffer@~1.1.1, is-buffer@~1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-bun-module@^1.0.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-bun-module/-/is-bun-module-1.3.0.tgz#ea4d24fdebfcecc98e81bcbcb506827fee288760" + integrity sha512-DgXeu5UWI0IsMQundYb5UAOzm6G2eVnarJ0byP6Tm55iZNKceD59LNPA2L4VvsScTtHcw0yEkVwSf7PC+QoLSA== + dependencies: + semver "^7.6.3" + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" @@ -9840,6 +10261,22 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.0" +is-core-module@^2.15.1, is-core-module@^2.16.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.0.tgz#6c01ffdd5e33c49c1d2abfa93334a85cb56bd81c" + integrity sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g== + dependencies: + hasown "^2.0.2" + +is-data-view@^1.0.1, is-data-view@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.2.tgz#bae0a41b9688986c2188dda6657e56b8f9e63b8e" + integrity sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw== + dependencies: + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + is-typed-array "^1.1.13" + is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" @@ -9847,6 +10284,14 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" +is-date-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.1.0.tgz#ad85541996fc7aa8b2729701d27b7319f95d82f7" + integrity sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + is-directory@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz" @@ -9877,6 +10322,13 @@ is-extglob@^2.1.1: resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== +is-finalizationregistry@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz#eefdcdc6c94ddd0674d9c85887bf93f944a97c90" + integrity sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg== + dependencies: + call-bound "^1.0.3" + is-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" @@ -9907,7 +10359,7 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-generator-function@^1.0.7: +is-generator-function@^1.0.10, is-generator-function@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== @@ -9957,6 +10409,11 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== + is-nan@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" @@ -9970,6 +10427,11 @@ is-negative-zero@^2.0.2: resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" @@ -9977,6 +10439,14 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number-object@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.1.1.tgz#144b21e95a1bc148205dcc2814a9134ec41b2541" + integrity sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" @@ -10017,11 +10487,26 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== +is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" @@ -10029,6 +10514,13 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" +is-shared-array-buffer@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz#9b67844bd9b7f246ba0708c3a93e34269c774f6f" + integrity sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A== + dependencies: + call-bound "^1.0.3" + is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" @@ -10051,6 +10543,14 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" +is-string@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.1.1.tgz#92ea3f3d5c5b6e039ca8677e5ac8d07ea773cbb9" + integrity sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA== + dependencies: + call-bound "^1.0.3" + has-tostringtag "^1.0.2" + is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" @@ -10058,6 +10558,15 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-symbol@^1.0.4, is-symbol@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.1.1.tgz#f47761279f532e2b05a7024a7506dbbedacd0634" + integrity sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w== + dependencies: + call-bound "^1.0.2" + has-symbols "^1.1.0" + safe-regex-test "^1.1.0" + is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: version "1.1.10" resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz" @@ -10069,6 +10578,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.13, is-typed-array@^1.1.14, is-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -10091,6 +10607,11 @@ is-weakmap@^2.0.1: resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== + is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" @@ -10098,6 +10619,13 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-weakref@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.1.0.tgz#47e3472ae95a63fa9cf25660bcf0c181c39770ef" + integrity sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q== + dependencies: + call-bound "^1.0.2" + is-weakset@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" @@ -10106,6 +10634,14 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" +is-weakset@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.4.tgz#c9f5deb0bc1906c6d6f1027f284ddf459249daca" + integrity sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ== + dependencies: + call-bound "^1.0.3" + get-intrinsic "^1.2.6" + is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz" @@ -11382,6 +11918,11 @@ marky@^1.2.2: resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.5.tgz#55796b688cbd72390d2d399eaaf1832c9413e3c0" integrity sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q== +math-intrinsics@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + md5-file@^3.2.3: version "3.2.3" resolved "https://registry.npmjs.org/md5-file/-/md5-file-3.2.3.tgz" @@ -11889,7 +12430,7 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -12174,6 +12715,11 @@ object-inspect@^1.12.3, object-inspect@^1.9.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.3.tgz#f14c183de51130243d6d18ae149375ff50ea488a" + integrity sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA== + object-is@^1.0.1, object-is@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" @@ -12197,6 +12743,18 @@ object.assign@^4.1.3, object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.assign@^4.1.5: + version "4.1.7" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.7.tgz#8c14ca1a424c6a561b0bb2a22f66f5049a945d3d" + integrity sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + has-symbols "^1.1.0" + object-keys "^1.1.1" + object.entries@^1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz" @@ -12215,6 +12773,25 @@ object.fromentries@^2.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.groupby@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + object.hasown@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz" @@ -12232,6 +12809,16 @@ object.values@^1.1.6: define-properties "^1.1.4" es-abstract "^1.20.4" +object.values@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.1.tgz#deed520a50809ff7f75a7cfd4bc64c7a038c6216" + integrity sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + oboe@2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" @@ -12742,6 +13329,11 @@ point-in-polygon@^1.0.1: resolved "https://registry.yarnpkg.com/point-in-polygon/-/point-in-polygon-1.1.0.tgz#b0af2616c01bdee341cbf2894df643387ca03357" integrity sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + postcss@~8.4.32: version "8.4.38" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" @@ -13517,6 +14109,20 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.9.tgz#c905f3386008de95a62315f3ea8630404be19e2f" + integrity sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q== + dependencies: + call-bind "^1.0.8" + define-properties "^1.2.1" + dunder-proto "^1.0.1" + es-abstract "^1.23.6" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + gopd "^1.2.0" + which-builtin-type "^1.2.1" + regenerate-unicode-properties@^10.1.0: version "10.1.0" resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz" @@ -13569,6 +14175,16 @@ regexp.prototype.flags@^1.5.0: define-properties "^1.2.0" functions-have-names "^1.2.3" +regexp.prototype.flags@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz#b3ae40b1d2499b8350ab2c3fe6ef3845d3a96f42" + integrity sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.2" + regexpp@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" @@ -13690,6 +14306,11 @@ resolve-from@^5.0.0: resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve.exports@^2.0.0, resolve.exports@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" @@ -13722,6 +14343,15 @@ resolve@^1.22.2: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.22.4: + version "1.22.9" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.9.tgz#6da76e4cdc57181fa4471231400e8851d0a924f3" + integrity sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A== + dependencies: + is-core-module "^2.16.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^2.0.0-next.4: version "2.0.0-next.4" resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz" @@ -13909,6 +14539,17 @@ rxjs@^7.8.0: dependencies: tslib "^2.1.0" +safe-array-concat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz#c9e54ec4f603b0bbb8e7e5007a5ee7aecd1538c3" + integrity sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + get-intrinsic "^1.2.6" + has-symbols "^1.1.0" + isarray "^2.0.5" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" @@ -13933,6 +14574,15 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + safe-stable-stringify@^2.1.0: version "2.5.0" resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" @@ -14046,6 +14696,11 @@ semver@^7.5.2, semver@^7.5.3: dependencies: lru-cache "^6.0.0" +semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0, send@^0.18.0: version "0.18.0" resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" @@ -14096,6 +14751,28 @@ set-blocking@^2.0.0: resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" @@ -14169,6 +14846,35 @@ shell-quote@^1.6.1, shell-quote@^1.7.3: resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.0.tgz" integrity sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ== +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" @@ -14178,6 +14884,17 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" @@ -14394,6 +15111,11 @@ ssri@^8.0.1: dependencies: minipass "^3.1.1" +stable-hash@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stable-hash/-/stable-hash-0.0.4.tgz#55ae7dadc13e4b3faed13601587cec41859b42f7" + integrity sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g== + stack-generator@^2.0.5: version "2.0.10" resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.10.tgz#8ae171e985ed62287d4f1ed55a1633b3fb53bb4d" @@ -14584,6 +15306,19 @@ string.prototype.matchall@^4.0.8: regexp.prototype.flags "^1.4.3" side-channel "^1.0.4" +string.prototype.trim@^1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz#40b2dd5ee94c959b4dcfb1d65ce72e90da480c81" + integrity sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-data-property "^1.1.4" + define-properties "^1.2.1" + es-abstract "^1.23.5" + es-object-atoms "^1.0.0" + has-property-descriptors "^1.0.2" + string.prototype.trim@^1.2.7: version "1.2.7" resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz" @@ -14602,6 +15337,16 @@ string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimend@^1.0.8, string.prototype.trimend@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz#62e2731272cd285041b36596054e9f66569b6942" + integrity sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.2" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz" @@ -14611,6 +15356,15 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" @@ -14812,6 +15566,11 @@ system-architecture@^0.1.0: resolved "https://registry.yarnpkg.com/system-architecture/-/system-architecture-0.1.0.tgz#71012b3ac141427d97c67c56bc7921af6bff122d" integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + tar@^4.0.2: version "4.4.19" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" @@ -15096,10 +15855,10 @@ ts-object-utils@0.0.5: resolved "https://registry.npmjs.org/ts-object-utils/-/ts-object-utils-0.0.5.tgz" integrity sha512-iV0GvHqOmilbIKJsfyfJY9/dNHCs969z3so90dQWsO1eMMozvTpnB1MEaUbb3FYtZTGjv5sIy/xmslEz0Rg2TA== -tsconfig-paths@^3.14.1: - version "3.14.2" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== +tsconfig-paths@^3.15.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.2" @@ -15248,6 +16007,39 @@ type@^2.7.2: resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== +typed-array-buffer@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536" + integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw== + dependencies: + call-bound "^1.0.3" + es-errors "^1.3.0" + is-typed-array "^1.1.14" + +typed-array-byte-length@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz#8407a04f7d78684f3d252aa1a143d2b77b4160ce" + integrity sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg== + dependencies: + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.14" + +typed-array-byte-offset@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz#ae3698b8ec91a8ab945016108aef00d5bff12355" + integrity sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + for-each "^0.3.3" + gopd "^1.2.0" + has-proto "^1.2.0" + is-typed-array "^1.1.15" + reflect.getprototypeof "^1.0.9" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -15257,6 +16049,18 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typed-array-length@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.7.tgz#ee4deff984b64be1e118b0de8c9c877d5ce73d3d" + integrity sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + reflect.getprototypeof "^1.0.6" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -16010,6 +16814,36 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-boxed-primitive@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e" + integrity sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA== + dependencies: + is-bigint "^1.1.0" + is-boolean-object "^1.2.1" + is-number-object "^1.1.1" + is-string "^1.1.1" + is-symbol "^1.1.1" + +which-builtin-type@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.2.1.tgz#89183da1b4907ab089a6b02029cc5d8d6574270e" + integrity sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q== + dependencies: + call-bound "^1.0.2" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" + is-async-function "^2.0.0" + is-date-object "^1.1.0" + is-finalizationregistry "^1.1.0" + is-generator-function "^1.0.10" + is-regex "^1.2.1" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.1.0" + which-collection "^1.0.2" + which-typed-array "^1.1.16" + which-collection@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" @@ -16020,11 +16854,33 @@ which-collection@^1.0.1: is-weakmap "^2.0.1" is-weakset "^2.0.1" +which-collection@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== + dependencies: + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== +which-typed-array@^1.1.16: + version "1.1.18" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.18.tgz#df2389ebf3fbb246a71390e90730a9edb6ce17ad" + integrity sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.3" + for-each "^0.3.3" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + which-typed-array@^1.1.2, which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz" From 3cc6ebdee5927a2eb22cdae16b8d566010310538 Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:03:23 +0200 Subject: [PATCH 5/6] chore: reduce unused imports --- src/api/harbor/harbor-service.ts | 2 -- .../preview-modules/form-template/index.tsx | 8 ++------ .../success-template/copy-hash/index.tsx | 2 -- .../preview-modules/success-template/index.tsx | 2 -- .../base/stake-info-container/index.tsx | 10 +--------- .../components/base/tiers-selector/index.tsx | 1 - .../harbor/components/harbor-preview/index.tsx | 18 ++---------------- .../hooks/processHelpers/resultHandler.ts | 3 --- .../base/product-list-item/index.tsx | 2 +- src/features/products/entities/_products.tsx | 2 +- .../StakeHarborScreen/StakeHarborScreen.tsx | 1 - .../WithdrawRequests/WithdrawRequests.tsx | 16 +++------------- .../components/request-item/index.tsx | 6 +++--- 13 files changed, 13 insertions(+), 60 deletions(-) diff --git a/src/api/harbor/harbor-service.ts b/src/api/harbor/harbor-service.ts index f1f70884c..a0ac9f33b 100644 --- a/src/api/harbor/harbor-service.ts +++ b/src/api/harbor/harbor-service.ts @@ -2,8 +2,6 @@ import { RawRecord } from '@nozbe/watermelondb'; import { BigNumber, ethers } from 'ethers'; import { parseEther } from 'ethers/lib/utils'; import moment from 'moment/moment'; -import { RawRecord } from '@nozbe/watermelondb'; -import Config from '@constants/config'; import { HARBOR_ABI } from '@api/harbor/abi/harbor'; import { UNSTAKE_LOG_ABI } from '@api/harbor/abi/harbor-unstake-log-abi'; import Config from '@constants/config'; diff --git a/src/features/harbor/components/base/preview-modules/form-template/index.tsx b/src/features/harbor/components/base/preview-modules/form-template/index.tsx index 37c1a7d22..30c9c8f96 100644 --- a/src/features/harbor/components/base/preview-modules/form-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/form-template/index.tsx @@ -3,19 +3,15 @@ import { FlatList, ListRenderItemInfo, View } from 'react-native'; import { useTranslation } from 'react-i18next'; import { Row, Spacer, Text } from '@components/base'; import { TextOrSpinner } from '@components/composite'; -import { PrimaryButton } from '@components/modular'; +import { PrimaryButton, TokenLogo } from '@components/modular'; import { COLORS } from '@constants/colors'; import { FormTemplateProps, HarborPreViewData } from '@features/harbor/components/harbor-preview/model'; import { scale } from '@utils'; -import { styles } from './styles'; -import { Row, Spacer, Text } from '@components/base'; -import { COLORS } from '@constants/colors'; import { scale } from '@utils/scaling'; -import { PrimaryButton, TokenLogo } from '@components/modular'; -import { TextOrSpinner } from '@components/composite'; +import { styles } from './styles'; export const FormTemplate = ({ data, diff --git a/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx index d6f4a94fe..ac68207cc 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/copy-hash/index.tsx @@ -8,8 +8,6 @@ import { contentBox } from '@components/styles'; import { GlobeIcon } from '@components/svg/icons/v2'; import { COLORS } from '@constants/colors'; import { scale, StringUtils } from '@utils'; -import { Toast, ToastPosition, ToastType } from '@components/modular'; -import { contentBox } from '@components/styles'; import { styles } from './styles'; interface CopyHashModel { diff --git a/src/features/harbor/components/base/preview-modules/success-template/index.tsx b/src/features/harbor/components/base/preview-modules/success-template/index.tsx index 2efa5eaf3..1bc2892f7 100644 --- a/src/features/harbor/components/base/preview-modules/success-template/index.tsx +++ b/src/features/harbor/components/base/preview-modules/success-template/index.tsx @@ -1,7 +1,6 @@ import React, { useMemo } from 'react'; import { FlatList, ListRenderItemInfo, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import moment from 'moment'; import { useTranslation } from 'react-i18next'; import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { Row, Spacer, Text } from '@components/base'; @@ -9,7 +8,6 @@ import { PrimaryButton, SecondaryButton } from '@components/modular'; import { SuccessIcon } from '@components/svg/icons/v2/harbor'; import { COLORS } from '@constants/colors'; import { SuccessTitle } from '@features/harbor/components/base/preview-modules/success-template/success-title'; -import { useTranslation } from 'react-i18next'; import { HarborPreViewData, SuccessTemplateDataProps diff --git a/src/features/harbor/components/base/stake-info-container/index.tsx b/src/features/harbor/components/base/stake-info-container/index.tsx index 058899bb8..8db13dcc3 100644 --- a/src/features/harbor/components/base/stake-info-container/index.tsx +++ b/src/features/harbor/components/base/stake-info-container/index.tsx @@ -7,20 +7,12 @@ import { CryptoCurrencyCode } from '@appTypes'; import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { Row, Spacer, Spinner, Text } from '@components/base'; import { PrimaryButton, TokenLogo } from '@components/modular'; -import { PlusIcon } from '@components/svg/icons/v2'; +import { StakeIcon } from '@components/svg/icons/v2/harbor'; import { COLORS } from '@constants/colors'; import { HarborDataModel } from '@entities/harbor/model/types'; import { useAMBPrice } from '@hooks'; import { NumberUtils, scale } from '@utils'; import { styles } from './styles'; -import { COLORS } from '@constants/colors'; -import { useNavigation } from '@react-navigation/native'; -import { HarborNavigationProp } from '@appTypes/navigation/harbor'; -import { CryptoCurrencyCode } from '@appTypes'; -import { styles } from './styles'; -import { useAMBPrice } from '@hooks'; -import { HarborDataModel } from '@entities/harbor/model/types'; -import { StakeIcon } from '@components/svg/icons/v2/harbor'; interface StakeInfoContainerProps { loading: boolean; diff --git a/src/features/harbor/components/base/tiers-selector/index.tsx b/src/features/harbor/components/base/tiers-selector/index.tsx index 3b92ebf39..ee7ad3fad 100644 --- a/src/features/harbor/components/base/tiers-selector/index.tsx +++ b/src/features/harbor/components/base/tiers-selector/index.tsx @@ -15,7 +15,6 @@ import { TokenReward } from '@features/harbor/components/base/token-reward'; import { calculateClaimAmount } from '@features/harbor/hooks'; import { isAndroid, scale } from '@utils'; import { styles } from './styles'; -import { CircleInfoIcon } from '@components/svg/icons/v2/harbor'; interface TiersContainerProps { bondAmount: string; diff --git a/src/features/harbor/components/harbor-preview/index.tsx b/src/features/harbor/components/harbor-preview/index.tsx index d3948ad51..8eeb647ee 100644 --- a/src/features/harbor/components/harbor-preview/index.tsx +++ b/src/features/harbor/components/harbor-preview/index.tsx @@ -4,30 +4,16 @@ import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Spacer } from '@components/base'; import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { EMPTY_HARBOR_PROCESS_TRANSACTION } from '@entities/harbor/constants'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { useWalletStore } from '@entities/wallet'; -import { styles } from './styles'; -import { BottomSheet, BottomSheetRef } from '@components/composite'; -import { useBalanceOfAddress, useForwardedRef } from '@hooks'; -import { Spacer } from '@components/base'; -import { scale } from '@utils/scaling'; -import { isAndroid } from '@utils/isPlatform'; -import { BottomSheetHarborPreViewProps } from '@features/harbor/components/harbor-preview/model'; -import { useWalletStore } from '@entities/wallet'; -import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { ErrorTemplate, FormTemplate, SuccessTemplate } from '@features/harbor/components/base'; -import { - BottomSheetHarborPreViewProps, - EmptyHarborProcessTransaction -} from '@features/harbor/components/harbor-preview/model'; +import { BottomSheetHarborPreViewProps } from '@features/harbor/components/harbor-preview/model'; import { dataParseFunction, processFunctions } from '@features/harbor/hooks'; -import { useForwardedRef } from '@hooks'; -import { TransactionDTO } from '@models'; +import { useBalanceOfAddress, useForwardedRef } from '@hooks'; import { isAndroid, scale } from '@utils'; import { styles } from './styles'; diff --git a/src/features/harbor/hooks/processHelpers/resultHandler.ts b/src/features/harbor/hooks/processHelpers/resultHandler.ts index b28299059..4b42a6554 100644 --- a/src/features/harbor/hooks/processHelpers/resultHandler.ts +++ b/src/features/harbor/hooks/processHelpers/resultHandler.ts @@ -1,6 +1,3 @@ -import { explorerService } from '@api/explorer-service'; -import { delay } from '@utils'; - export const resultHandler = async (result: any) => { if (result?.error || !result?.transactionHash) { return { error: result?.error.message || 'unknown' }; diff --git a/src/features/products/components/base/product-list-item/index.tsx b/src/features/products/components/base/product-list-item/index.tsx index ae6303691..8f4ecd217 100644 --- a/src/features/products/components/base/product-list-item/index.tsx +++ b/src/features/products/components/base/product-list-item/index.tsx @@ -7,8 +7,8 @@ import capitalize from 'lodash/capitalize'; import { HomeNavigationProp } from '@appTypes'; import { Row, Text } from '@components/base'; import { Product } from '@features/products/utils'; -import { styles } from './styles'; import { sendFirebaseEvent } from '@lib/firebaseEventAnalytics'; +import { styles } from './styles'; interface ProductListItemProps { product: Product; diff --git a/src/features/products/entities/_products.tsx b/src/features/products/entities/_products.tsx index 42c53f2d2..5b3e10777 100644 --- a/src/features/products/entities/_products.tsx +++ b/src/features/products/entities/_products.tsx @@ -5,8 +5,8 @@ import { SwapAccountActionIcon } from '@components/svg/icons/v2/actions'; import { HarborAccountAction } from '@components/svg/icons/v2/harbor'; -import { SectionizedProducts } from '../utils'; import { CustomAppEvents } from '@lib/firebaseEventAnalytics'; +import { SectionizedProducts } from '../utils'; export const PRODUCTS = (t: TFunction): SectionizedProducts[] => { return [ diff --git a/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx b/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx index f308e33ff..893c26c43 100644 --- a/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx +++ b/src/screens/Harbor/StakeHarborScreen/StakeHarborScreen.tsx @@ -10,7 +10,6 @@ import { WithdrawIcon } from '@components/svg/icons/v2/harbor'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { useWalletStore } from '@entities/wallet'; import { HarborStakeTabs } from '@features/harbor/components/tabs'; -import { useEffectOnce } from '@hooks'; import { styles } from './styles'; export const StakeHarborScreen = () => { diff --git a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx index f939dcadf..fc80093af 100644 --- a/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx +++ b/src/screens/Harbor/WithdrawRequests/WithdrawRequests.tsx @@ -6,27 +6,17 @@ import { View } from 'react-native'; import { useFocusEffect } from '@react-navigation/native'; -import { formatEther } from 'ethers/lib/utils'; import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { CryptoCurrencyCode } from '@appTypes'; -import { Row, Spacer, Text } from '@components/base'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useTranslation } from 'react-i18next'; -import { useFocusEffect } from '@react-navigation/native'; +import { Text } from '@components/base'; import { Header } from '@components/composite'; -import { TokenLogo } from '@components/modular'; -import { COLORS } from '@constants/colors'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { ILogs } from '@entities/harbor/model/types'; import { useWalletStore } from '@entities/wallet'; import { useEffectOnce } from '@hooks'; -import { NumberUtils, scale } from '@utils'; -import { styles } from './WithdrawRequests.style'; -import { Text } from '@components/base'; -import { styles } from './WithdrawRequests.style'; -import { useEffectOnce } from '@hooks'; import { RequestItem } from '@screens/Harbor/WithdrawRequests/components'; +import { scale } from '@utils'; +import { styles } from './WithdrawRequests.style'; export const WithdrawRequests = () => { const { t } = useTranslation(); diff --git a/src/screens/Harbor/WithdrawRequests/components/request-item/index.tsx b/src/screens/Harbor/WithdrawRequests/components/request-item/index.tsx index ae2140627..4529e41e6 100644 --- a/src/screens/Harbor/WithdrawRequests/components/request-item/index.tsx +++ b/src/screens/Harbor/WithdrawRequests/components/request-item/index.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { View } from 'react-native'; import { formatEther } from 'ethers/lib/utils'; import { useTranslation } from 'react-i18next'; +import { CryptoCurrencyCode } from '@appTypes'; import { Row, Spacer, Text } from '@components/base'; import { TokenLogo } from '@components/modular'; -import { CryptoCurrencyCode } from '@appTypes'; -import { scale } from '@utils/scaling'; import { COLORS } from '@constants/colors'; -import { NumberUtils } from '@utils/number'; import { ILogs } from '@entities/harbor/model/types'; +import { NumberUtils } from '@utils/number'; +import { scale } from '@utils/scaling'; import { styles } from './styles'; export const RequestItem = ({ requestItem }: { requestItem: ILogs }) => { From c99a812e2e289fe98b029a76d320ed80f778a5f8 Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:10:48 +0200 Subject: [PATCH 6/6] fix: ignore "node_modules" folder --- .eslintrc.js | 1 + .../Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index fb0ffdabf..c166e0b27 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,6 +4,7 @@ module.exports = { es6: true }, parser: '@typescript-eslint/parser', + ignorePatterns: ['node_modules/'], extends: [ 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', diff --git a/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx b/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx index 5b1f2a9dc..55e8c750d 100644 --- a/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx +++ b/src/screens/Harbor/WithdrawHarborScreen/WithdrawHarborScreen.tsx @@ -1,16 +1,13 @@ import React, { useCallback, useEffect, useRef } from 'react'; import { RefreshControl, ScrollView, View } from 'react-native'; -import { useNavigation } from '@react-navigation/native'; +import { useNavigation, useFocusEffect } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useFocusEffect, useNavigation } from '@react-navigation/native'; import { HarborNavigationProp } from '@appTypes/navigation/harbor'; import { Button } from '@components/base'; import { Header } from '@components/composite'; import { NoteIcon } from '@components/svg/icons/v2/harbor'; import { DEVICE_HEIGHT } from '@constants/variables'; -import { HarborNavigationProp } from '@appTypes/navigation/harbor'; -import { useEffectOnce, useKeyboardHeight } from '@hooks'; import { useHarborStore } from '@entities/harbor/model/harbor-store'; import { useWalletStore } from '@entities/wallet'; import { HarborWithdrawTabs } from '@features/harbor/components/tabs';