Skip to content

Commit

Permalink
fix structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dschlabach committed Nov 21, 2024
1 parent d0c0b75 commit e080238
Show file tree
Hide file tree
Showing 43 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/OnchainKitProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WagmiProvider } from 'wagmi';
import { ONCHAIN_KIT_CONFIG, setOnchainKitConfig } from './OnchainKitConfig';
import { createWagmiConfig } from './createWagmiConfig';
import { COINBASE_VERIFIED_ACCOUNT_SCHEMA_ID } from './identity/constants';
import { checkHashLength } from './packages/core/utils/checkHashLength';
import { checkHashLength } from './packages/core/internal/utils/checkHashLength';
import type { OnchainKitContextType, OnchainKitProviderReact } from './types';
import { useProviderDependencies } from './useProviderDependencies';

Expand Down
4 changes: 2 additions & 2 deletions src/fund/components/FundButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom';
import { fireEvent, render, screen } from '@testing-library/react';
import { type Mock, afterEach, describe, expect, it, vi } from 'vitest';
import { openPopup } from '../../packages/core/utils/openPopup';
import { openPopup } from '../../packages/core/internal/utils/openPopup';
import { useGetFundingUrl } from '../hooks/useGetFundingUrl';
import { getFundingPopupSize } from '../utils/getFundingPopupSize';
import { FundButton } from './FundButton';
Expand All @@ -14,7 +14,7 @@ vi.mock('../utils/getFundingPopupSize', () => ({
getFundingPopupSize: vi.fn(),
}));

vi.mock('../../packages/core/utils/openPopup', () => ({
vi.mock('../../packages/core/internal/utils/openPopup', () => ({
openPopup: vi.fn(),
}));

Expand Down
2 changes: 1 addition & 1 deletion src/fund/components/FundButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback } from 'react';
import { addSvg } from '../../internal/svg/addSvg';
import { openPopup } from '../../packages/core/utils/openPopup';
import { openPopup } from '../../packages/core/internal/utils/openPopup';
import { border, cn, color, pressable, text } from '../../styles/theme';
import { useTheme } from '../../useTheme';
import { useGetFundingUrl } from '../hooks/useGetFundingUrl';
Expand Down
4 changes: 2 additions & 2 deletions src/fund/utils/getFundingPopupSize.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { type Mock, afterEach, describe, expect, it, vi } from 'vitest';
import { getWindowDimensions } from '../../packages/core/utils/getWindowDimensions';
import { getWindowDimensions } from '../../packages/core/internal/utils/getWindowDimensions';
import { ONRAMP_POPUP_HEIGHT, ONRAMP_POPUP_WIDTH } from '../constants';
import { getFundingPopupSize } from './getFundingPopupSize';

vi.mock('../../packages/core/utils/getWindowDimensions', () => ({
vi.mock('../../packages/core/internal/utils/getWindowDimensions', () => ({
getWindowDimensions: vi.fn(),
}));

Expand Down
2 changes: 1 addition & 1 deletion src/fund/utils/getFundingPopupSize.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
getWindowDimensions,
type popupSizes,
} from '../../packages/core/utils/getWindowDimensions';
} from '../../packages/core/internal/utils/getWindowDimensions';
import { ONRAMP_POPUP_HEIGHT, ONRAMP_POPUP_WIDTH } from '../constants';
import { ONRAMP_BUY_URL } from '../constants';

Expand Down
2 changes: 1 addition & 1 deletion src/identity/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Children, useMemo } from 'react';
import { defaultAvatarSVG } from '../../internal/svg/defaultAvatarSVG';
import { defaultLoadingSVG } from '../../internal/svg/defaultLoadingSVG';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { cn } from '../../styles/theme';
import { useAvatar } from '../hooks/useAvatar';
import { useName } from '../hooks/useName';
Expand Down
4 changes: 2 additions & 2 deletions src/identity/components/EthBalance.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import { type Mock, describe, expect, it, vi } from 'vitest';
import { getRoundedAmount } from '../../packages/core/utils/getRoundedAmount';
import { getRoundedAmount } from '../../packages/core/internal/utils/getRoundedAmount';
import { useGetETHBalance } from '../../wallet/hooks/useGetETHBalance';
import { EthBalance } from './EthBalance';
import { useIdentityContext } from './IdentityProvider';
Expand All @@ -18,7 +18,7 @@ vi.mock('../../wallet/hooks/useGetETHBalance', () => ({
useGetETHBalance: vi.fn(),
}));

vi.mock('../../packages/core/utils/getRoundedAmount', () => ({
vi.mock('../../packages/core/internal/utils/getRoundedAmount', () => ({
getRoundedAmount: vi.fn(),
}));

Expand Down
2 changes: 1 addition & 1 deletion src/identity/components/EthBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getRoundedAmount } from '../../packages/core/utils/getRoundedAmount';
import { getRoundedAmount } from '../../packages/core/internal/utils/getRoundedAmount';
import { cn, color, text } from '../../styles/theme';
import { useGetETHBalance } from '../../wallet/hooks/useGetETHBalance';
import type { EthBalanceReact } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/identity/components/IdentityLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Children, cloneElement, useMemo } from 'react';
import type { ReactNode } from 'react';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { background, cn, color } from '../../styles/theme';
import { useTheme } from '../../useTheme';
import { Address } from './Address';
Expand Down
2 changes: 1 addition & 1 deletion src/identity/components/Name.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Children, useMemo } from 'react';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { cn, color, text } from '../../styles/theme';
import { useName } from '../hooks/useName';
import type { NameReact } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/internal/components/Toast.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { getToastPosition } from '../../packages/core/utils/getToastPosition';
import { getToastPosition } from '../../packages/core/internal/utils/getToastPosition';
import { background, cn } from '../../styles/theme';
import { closeSvg } from '../svg/closeSvg';

Expand Down
2 changes: 1 addition & 1 deletion src/nft/components/mint/NFTAssetCost.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { multiplyFloats } from '../../../packages/core/utils/multiplyFloats';
import { multiplyFloats } from '../../../packages/core/internal/utils/multiplyFloats';
import { cn, text } from '../../../styles/theme';
import { formatAmount as formatSN } from '../../../swap/utils/formatAmount';
import { formatAmount } from '../../../token/utils/formatAmount';
Expand Down
2 changes: 1 addition & 1 deletion src/nft/components/mint/NFTTotalCost.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ReactNode, useCallback, useMemo, useState } from 'react';
import { infoSvg } from '../../../internal/svg/infoSvg';
import { multiplyFloats } from '../../../packages/core/utils/multiplyFloats';
import { multiplyFloats } from '../../../packages/core/internal/utils/multiplyFloats';
import { background, border, cn, text } from '../../../styles/theme';
import { formatAmount } from '../../../token/utils/formatAmount';
import { useNFTContext } from '../NFTProvider';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react';
import { describe, expect, it } from 'vitest';
import { Avatar } from '../../../identity/components/Avatar';
import { Name } from '../../../identity/components/Name';
import { Avatar } from '../../../../identity/components/Avatar';
import { Name } from '../../../../identity/components/Name';
import { findComponent } from './findComponent';

describe('findComponent', () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/swap/components/Swap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Children, useMemo } from 'react';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { background, border, cn, color, text } from '../../styles/theme';
import { useIsMounted } from '../../useIsMounted';
import { useTheme } from '../../useTheme';
Expand Down
4 changes: 2 additions & 2 deletions src/swap/components/SwapAmountInput.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useEffect, useMemo } from 'react';
import { TextInput } from '../../internal/components/TextInput';
import { useValue } from '../../internal/hooks/useValue';
import { getRoundedAmount } from '../../packages/core/utils/getRoundedAmount';
import { isValidAmount } from '../../packages/core/utils/isValidAmount';
import { getRoundedAmount } from '../../packages/core/internal/utils/getRoundedAmount';
import { isValidAmount } from '../../packages/core/internal/utils/isValidAmount';
import {
background,
border,
Expand Down
2 changes: 1 addition & 1 deletion src/swap/components/SwapProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { buildSwapTransaction } from '../../api/buildSwapTransaction';
import { getSwapQuote } from '../../api/getSwapQuote';
import { useCapabilitiesSafe } from '../../internal/hooks/useCapabilitiesSafe';
import { useValue } from '../../internal/hooks/useValue';
import { formatTokenAmount } from '../../packages/core/utils/formatTokenAmount';
import { formatTokenAmount } from '../../packages/core/internal/utils/formatTokenAmount';
import type { Token } from '../../token';
import { GENERIC_ERROR_MESSAGE } from '../../transaction/constants';
import { isUserRejectedRequestError } from '../../transaction/utils/isUserRejectedRequestError';
Expand Down
2 changes: 1 addition & 1 deletion src/swap/components/SwapSettingsSlippageLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Children, useMemo } from 'react';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { background, border, cn, line } from '../../styles/theme';
import type { SwapSettingsSlippageLayoutReact } from '../types';
import { SwapSettingsSlippageDescription } from './SwapSettingsSlippageDescription';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Children, useMemo } from 'react';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { background, border, cn, color, pressable } from '../../styles/theme';
import type { SwapSettingsSlippageLayoutReact } from '../types';
import { SwapSettingsSlippageDescription } from './SwapSettingsSlippageDescription';
Expand Down
2 changes: 1 addition & 1 deletion src/swap/utils/getTokenBalances.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatUnits } from 'viem';
import { getRoundedAmount } from '../../packages/core/utils/getRoundedAmount';
import { getRoundedAmount } from '../../packages/core/internal/utils/getRoundedAmount';
import type { Token } from '../../token';

type GetTokenBalancesParams = {
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/components/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEffect, useState } from 'react';
import { useAccount, useConnect } from 'wagmi';
import { IdentityProvider } from '../../identity/components/IdentityProvider';
import { Spinner } from '../../internal/components/Spinner';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import {
border,
cn,
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/components/Wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Children, useEffect, useMemo, useRef } from 'react';
import { findComponent } from '../../packages/core/utils/findComponent';
import { findComponent } from '../../packages/core/internal/utils/findComponent';
import { cn } from '../../styles/theme';
import { useIsMounted } from '../../useIsMounted';
import { useTheme } from '../../useTheme';
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/components/WalletDropdownFundLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fireEvent, render, screen } from '@testing-library/react';
import { type Mock, afterEach, describe, expect, it, vi } from 'vitest';
import { useGetFundingUrl } from '../../fund/hooks/useGetFundingUrl';
import { getFundingPopupSize } from '../../fund/utils/getFundingPopupSize';
import { openPopup } from '../../packages/core/utils/openPopup';
import { openPopup } from '../../packages/core/internal/utils/openPopup';
import { WalletDropdownFundLink } from './WalletDropdownFundLink';

vi.mock('../../fund/hooks/useGetFundingUrl', () => ({
Expand All @@ -14,7 +14,7 @@ vi.mock('../../fund/utils/getFundingPopupSize', () => ({
getFundingPopupSize: vi.fn(),
}));

vi.mock('../../packages/core/utils/openPopup', () => ({
vi.mock('../../packages/core/internal/utils/openPopup', () => ({
openPopup: vi.fn(),
}));

Expand Down
2 changes: 1 addition & 1 deletion src/wallet/components/WalletDropdownFundLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useMemo } from 'react';
import { useGetFundingUrl } from '../../fund/hooks/useGetFundingUrl';
import { getFundingPopupSize } from '../../fund/utils/getFundingPopupSize';
import { useIcon } from '../../internal/hooks/useIcon';
import { openPopup } from '../../packages/core/utils/openPopup';
import { openPopup } from '../../packages/core/internal/utils/openPopup';
import { cn, color, pressable, text as themeText } from '../../styles/theme';
import type { WalletDropdownFundLinkReact } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion src/wallet/hooks/useGetETHBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { formatUnits } from 'viem';
import type { Address } from 'viem';
import { useBalance } from 'wagmi';
import type { UseBalanceReturnType } from 'wagmi';
import { getRoundedAmount } from '../../packages/core/utils/getRoundedAmount';
import { getRoundedAmount } from '../../packages/core/internal/utils/getRoundedAmount';
import type { SwapError } from '../../swap';
import { getSwapErrorCode } from '../../swap/utils/getSwapErrorCode';
import type { UseGetETHBalanceResponse } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/hooks/useGetTokenBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { erc20Abi, formatUnits } from 'viem';
import type { Address } from 'viem';
import { useReadContract } from 'wagmi';
import type { UseReadContractReturnType } from 'wagmi';
import { getRoundedAmount } from '../../packages/core/utils/getRoundedAmount';
import { getRoundedAmount } from '../../packages/core/internal/utils/getRoundedAmount';
import type { SwapError } from '../../swap';
import { getSwapErrorCode } from '../../swap/utils/getSwapErrorCode';
import type { Token } from '../../token';
Expand Down

0 comments on commit e080238

Please sign in to comment.