diff --git a/apps/wallet/configs/ts/tsconfig.common.json b/apps/wallet/configs/ts/tsconfig.common.json index 3c062db658b..3051b3e4e5c 100644 --- a/apps/wallet/configs/ts/tsconfig.common.json +++ b/apps/wallet/configs/ts/tsconfig.common.json @@ -30,6 +30,7 @@ "_hooks": ["./src/ui/app/hooks/"], "_helpers": ["./src/ui/app/helpers/"], "_pages/*": ["./src/ui/app/pages/*"], + "_components": ["./src/ui/app/components"], "_components/*": ["./src/ui/app/components/*"], "_messaging/*": ["./src/shared/messaging/*"], "_messages": ["./src/shared/messaging/messages/"], diff --git a/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx b/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx index a5d8471c9ac..a093941786e 100644 --- a/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx +++ b/apps/wallet/src/ui/app/components/PasswordInputDialog.tsx @@ -15,7 +15,7 @@ import { toast } from 'react-hot-toast'; import { useNavigate } from 'react-router-dom'; import { object, string as YupString } from 'yup'; -import Alert from './alert'; +import { Alert } from '_components'; const validation = object({ password: YupString().ensure().required().label('Password'), diff --git a/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx b/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx index 1644438aa4b..6cdc166a5f5 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountItem.tsx @@ -12,8 +12,7 @@ import { forwardRef, type ReactNode } from 'react'; import { useAccounts } from '../../hooks/useAccounts'; import { useCopyToClipboard } from '../../hooks/useCopyToClipboard'; import { useExplorerLink } from '../../hooks/useExplorerLink'; -import { ExplorerLinkType } from '_components/explorer-link/ExplorerLinkType'; -import { IconButton } from '_components/IconButton'; +import { ExplorerLinkType, IconButton } from '_components'; import { EditableAccountName } from './EditableAccountName'; interface AccountItemProps { diff --git a/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx b/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx index 751c2f56015..1d3443a45a5 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountItemApproveConnection.tsx @@ -2,9 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { AccountIcon } from '_components/accounts/AccountIcon'; -import { LockUnlockButton } from '_components/accounts/LockUnlockButton'; -import { useUnlockAccount } from '_components/accounts/UnlockAccountContext'; +import { AccountIcon, LockUnlockButton, useUnlockAccount } from '_components'; import { type SerializedUIAccount } from '_src/background/accounts/Account'; import { useResolveIotaNSName } from '@iota/core'; import { CheckFill16 } from '@iota/icons'; diff --git a/apps/wallet/src/ui/app/components/accounts/AccountMultiSelect.tsx b/apps/wallet/src/ui/app/components/accounts/AccountMultiSelect.tsx index ffb8adb1a7c..b35dde1ae58 100644 --- a/apps/wallet/src/ui/app/components/accounts/AccountMultiSelect.tsx +++ b/apps/wallet/src/ui/app/components/accounts/AccountMultiSelect.tsx @@ -2,13 +2,11 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { AccountItemApproveConnection } from '_components/accounts/AccountItemApproveConnection'; +import { AccountItemApproveConnection, SelectAllButton } from '_components'; import { type SerializedUIAccount } from '_src/background/accounts/Account'; import * as ToggleGroup from '@radix-ui/react-toggle-group'; import { useState } from 'react'; -import { SelectAllButton } from '_components/accounts/SelectAllButton'; - interface AccountMultiSelectProps { accounts: SerializedUIAccount[]; selectedAccountIDs: string[]; diff --git a/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx b/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx index ab1a7217c22..d3330c79a0e 100644 --- a/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx +++ b/apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx @@ -11,7 +11,7 @@ import { z } from 'zod'; import { privateKeyValidation } from '../../helpers/validation/privateKeyValidation'; import { Form } from '../../shared/forms/Form'; import { TextAreaField } from '../../shared/forms/TextAreaField'; -import Alert from '_components/alert'; +import { Alert } from '_components'; const formSchema = z.object({ privateKey: privateKeyValidation, diff --git a/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx b/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx index 1a985eaaf5d..e480acb521f 100644 --- a/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx +++ b/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx @@ -11,7 +11,7 @@ import { type SubmitHandler } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; import { z } from 'zod'; -import Alert from '_components/alert'; +import { Alert } from '_components'; const RECOVERY_PHRASE_WORD_COUNT = 24; @@ -25,7 +25,7 @@ const formSchema = z.object({ }), }); -export type FormValues = z.infer; +type FormValues = z.infer; interface ImportRecoveryPhraseFormProps { submitButtonText: string; diff --git a/apps/wallet/src/ui/app/components/accounts/LockUnlockButton.tsx b/apps/wallet/src/ui/app/components/accounts/LockUnlockButton.tsx index 211ad7aadce..32b1806bef9 100644 --- a/apps/wallet/src/ui/app/components/accounts/LockUnlockButton.tsx +++ b/apps/wallet/src/ui/app/components/accounts/LockUnlockButton.tsx @@ -6,7 +6,7 @@ import { LockLocked16, LockUnlocked16 } from '@iota/icons'; import { type ComponentPropsWithoutRef } from 'react'; import { Tooltip } from '../../shared/tooltip'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components'; interface LockUnlockButtonProps extends ComponentPropsWithoutRef<'button'> { isLocked: boolean; diff --git a/apps/wallet/src/ui/app/components/accounts/ProtectAccountForm.tsx b/apps/wallet/src/ui/app/components/accounts/ProtectAccountForm.tsx index bbc2286a81d..be82c2272f2 100644 --- a/apps/wallet/src/ui/app/components/accounts/ProtectAccountForm.tsx +++ b/apps/wallet/src/ui/app/components/accounts/ProtectAccountForm.tsx @@ -58,7 +58,7 @@ const formSchema = z }) .merge(zodSchema); -export type FormValues = z.infer; +type FormValues = z.infer; interface ProtectAccountFormProps { submitButtonText: string; diff --git a/apps/wallet/src/ui/app/components/accounts/index.ts b/apps/wallet/src/ui/app/components/accounts/index.ts new file mode 100644 index 00000000000..0ecd1f6164c --- /dev/null +++ b/apps/wallet/src/ui/app/components/accounts/index.ts @@ -0,0 +1,27 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +export * from './AccountBalanceItem'; +export * from './AccountIcon'; +export * from './AccountItem'; +export * from './AccountItemApproveConnection'; +export * from './AccountListItem'; +export * from './AccountMultiSelect'; +export * from './AccountsFormContext'; +export * from './AccountsList'; +export * from './AutoLockSelector'; +export * from './EditableAccountName'; +export * from './FooterLink'; +export * from './ImportPrivateKeyForm'; +export * from './ImportRecoveryPhraseForm'; +export * from './ImportSeedForm'; +export * from './LockUnlockButton'; +export * from './NicknameDialog'; +export * from './PasswordInputDialog'; +export * from './ProtectAccountForm'; +export * from './RecoverAccountsGroup'; +export * from './SelectAllButton'; +export * from './UnlockAccountButton'; +export * from './UnlockAccountContext'; +export * from './UnlockAccountModal'; +export * from './VerifyPasswordModal'; diff --git a/apps/wallet/src/ui/app/components/active-coins-card/CoinItem.tsx b/apps/wallet/src/ui/app/components/active-coins-card/CoinItem.tsx index 0d4b1a8983f..4ca09c59cc5 100644 --- a/apps/wallet/src/ui/app/components/active-coins-card/CoinItem.tsx +++ b/apps/wallet/src/ui/app/components/active-coins-card/CoinItem.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Text } from '_app/shared/text'; -import { CoinIcon } from '_components/coin-icon'; +import { CoinIcon } from '_components'; import { useFormatCoin } from '@iota/core'; import { type ReactNode } from 'react'; diff --git a/apps/wallet/src/ui/app/components/active-coins-card/index.tsx b/apps/wallet/src/ui/app/components/active-coins-card/index.tsx index 86755c02ab7..ddeff3b3436 100644 --- a/apps/wallet/src/ui/app/components/active-coins-card/index.tsx +++ b/apps/wallet/src/ui/app/components/active-coins-card/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useActiveAddress } from '_app/hooks/useActiveAddress'; -import Loading from '_components/loading'; +import { Loading } from '_components'; import { useCoinsReFetchingConfig } from '_hooks'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/components/address-input/index.tsx b/apps/wallet/src/ui/app/components/address-input/index.tsx index 2c59c6b885b..6d88e7fce96 100644 --- a/apps/wallet/src/ui/app/components/address-input/index.tsx +++ b/apps/wallet/src/ui/app/components/address-input/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Text } from '_app/shared/text'; -import Alert from '_src/ui/app/components/alert'; +import { Alert } from '_components'; import { useIotaClient } from '@iota/dapp-kit'; import { QrCode, X12 } from '@iota/icons'; import { isValidIotaAddress } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/components/alert/index.tsx b/apps/wallet/src/ui/app/components/alert/index.tsx index 3b959704e84..843bbeebbfd 100644 --- a/apps/wallet/src/ui/app/components/alert/index.tsx +++ b/apps/wallet/src/ui/app/components/alert/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components/loading/LoadingIndicator'; import { CheckStroke16, Info16 } from '@iota/icons'; import { cva, type VariantProps } from 'class-variance-authority'; import type { ReactNode } from 'react'; @@ -52,7 +52,7 @@ const MODE_TO_ICON = { loading: , }; -export default function Alert({ +export function Alert({ children, noBorder, rounded, diff --git a/apps/wallet/src/ui/app/components/error-boundary/index.tsx b/apps/wallet/src/ui/app/components/error-boundary/index.tsx index 8921d2c45c2..23450d5f49c 100644 --- a/apps/wallet/src/ui/app/components/error-boundary/index.tsx +++ b/apps/wallet/src/ui/app/components/error-boundary/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; +import { Alert } from '_components'; import type { ReactNode } from 'react'; import { ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary'; import type { FallbackProps } from 'react-error-boundary'; diff --git a/apps/wallet/src/ui/app/components/explorer-link/index.tsx b/apps/wallet/src/ui/app/components/explorer-link/index.tsx index b22e239d2da..86b5b95cb53 100644 --- a/apps/wallet/src/ui/app/components/explorer-link/index.tsx +++ b/apps/wallet/src/ui/app/components/explorer-link/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExternalLink from '_components/external-link'; +import { ExternalLink } from '_components'; import { ArrowUpRight16 } from '@iota/icons'; import { formatAddress } from '@iota/iota.js/utils'; import type { ReactNode } from 'react'; @@ -20,7 +20,7 @@ export type ExplorerLinkProps = ExplorerLinkConfig & { showIcon?: boolean; }; -function ExplorerLink({ +export function ExplorerLink({ track, children, className, @@ -56,4 +56,6 @@ export function AddressLink({ address }: { address: string }) { ); } +export * from './ExplorerLinkType'; + export default ExplorerLink; diff --git a/apps/wallet/src/ui/app/components/external-link/index.tsx b/apps/wallet/src/ui/app/components/external-link/index.tsx index ed62f4c2fcb..52e73eb0ad2 100644 --- a/apps/wallet/src/ui/app/components/external-link/index.tsx +++ b/apps/wallet/src/ui/app/components/external-link/index.tsx @@ -13,7 +13,7 @@ export interface ExternalLinkProps { onClick?(): void; } -function ExternalLink({ href, className, children, title, onClick }: ExternalLinkProps) { +export function ExternalLink({ href, className, children, title, onClick }: ExternalLinkProps) { return ( { diff --git a/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx b/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx index a60148ad00e..bc25f98d7d4 100644 --- a/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx +++ b/apps/wallet/src/ui/app/components/iota-apps/IotaApp.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ImageIcon } from '_app/shared/image-icon'; -import ExternalLink from '_components/external-link'; +import { ExternalLink } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { getDAppUrl } from '_src/shared/utils'; import { Text } from '_src/ui/app/shared/text'; diff --git a/apps/wallet/src/ui/app/components/iota-apps/index.tsx b/apps/wallet/src/ui/app/components/iota-apps/index.tsx index e366710dcdb..d1c91e04645 100644 --- a/apps/wallet/src/ui/app/components/iota-apps/index.tsx +++ b/apps/wallet/src/ui/app/components/iota-apps/index.tsx @@ -16,7 +16,7 @@ import { AppsPageBanner } from './Banner'; import { IotaApp, type DAppEntry } from './IotaApp'; import { IotaAppEmpty } from './IotaAppEmpty'; -function AppsPlayGround() { +export function AppsPlayGround() { const ecosystemApps = useFeature(Feature.WalletDapps).value; const { tagName } = useParams(); diff --git a/apps/wallet/src/ui/app/components/ledger/ConnectLedgerModal.tsx b/apps/wallet/src/ui/app/components/ledger/ConnectLedgerModal.tsx index 2f2402eb445..771f952c6fa 100644 --- a/apps/wallet/src/ui/app/components/ledger/ConnectLedgerModal.tsx +++ b/apps/wallet/src/ui/app/components/ledger/ConnectLedgerModal.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ampli } from '_src/shared/analytics/ampli'; -import { useIotaLedgerClient } from '_src/ui/app/components/ledger/IotaLedgerClientProvider'; +import { useIotaLedgerClient } from '_components'; import { Button } from '_src/ui/app/shared/ButtonUI'; import { Dialog, diff --git a/apps/wallet/src/ui/app/components/ledger/index.ts b/apps/wallet/src/ui/app/components/ledger/index.ts new file mode 100644 index 00000000000..e9111408bb9 --- /dev/null +++ b/apps/wallet/src/ui/app/components/ledger/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +export * from './ConnectLedgerModal'; +export * from './IotaLedgerClientProvider'; +export * from './LedgerAccountList'; +export * from './LedgerAccountRow'; +export * from './ledgerErrors'; +export * from './useDeriveLedgerAccounts'; diff --git a/apps/wallet/src/ui/app/components/loading/LoadingIndicator.tsx b/apps/wallet/src/ui/app/components/loading/LoadingIndicator.tsx index 27a872523f2..a2aa54e6b05 100644 --- a/apps/wallet/src/ui/app/components/loading/LoadingIndicator.tsx +++ b/apps/wallet/src/ui/app/components/loading/LoadingIndicator.tsx @@ -16,7 +16,7 @@ const styles = cva('', { export type LoadingIndicatorProps = VariantProps; -function LoadingIndicator({ color = 'iota' }: LoadingIndicatorProps) { +export function LoadingIndicator({ color = 'iota' }: LoadingIndicatorProps) { return ; } diff --git a/apps/wallet/src/ui/app/components/loading/index.tsx b/apps/wallet/src/ui/app/components/loading/index.tsx index 848dcacf2f2..7545620f06e 100644 --- a/apps/wallet/src/ui/app/components/loading/index.tsx +++ b/apps/wallet/src/ui/app/components/loading/index.tsx @@ -10,7 +10,7 @@ interface LoadingProps extends LoadingIndicatorProps { children: ReactNode | ReactNode[]; } -function Loading({ loading, children, ...indicatorProps }: LoadingProps) { +export function Loading({ loading, children, ...indicatorProps }: LoadingProps) { return loading ? (
diff --git a/apps/wallet/src/ui/app/components/logo/index.tsx b/apps/wallet/src/ui/app/components/logo/index.tsx index 85c1f787089..3d3886eae03 100644 --- a/apps/wallet/src/ui/app/components/logo/index.tsx +++ b/apps/wallet/src/ui/app/components/logo/index.tsx @@ -17,7 +17,7 @@ const NETWORK_LOGOS = { [Network.Custom]: IotaCustomRpc, }; -function Logo({ network }: LogoProps) { +export function Logo({ network }: LogoProps) { let LogoComponent = NETWORK_LOGOS[Network.Custom]; if (network && NETWORK_LOGOS[network]) { diff --git a/apps/wallet/src/ui/app/components/menu/button/WalletSettingsButton.tsx b/apps/wallet/src/ui/app/components/menu/button/WalletSettingsButton.tsx index 2fa3b9c3319..e929f962a26 100644 --- a/apps/wallet/src/ui/app/components/menu/button/WalletSettingsButton.tsx +++ b/apps/wallet/src/ui/app/components/menu/button/WalletSettingsButton.tsx @@ -6,7 +6,7 @@ import { ButtonOrLink } from '_src/ui/app/shared/utils/ButtonOrLink'; import { HamburgerOpen24 as HamburgerOpenIcon, Settings24 as SettingsIcon } from '@iota/icons'; import { cx } from 'class-variance-authority'; -import { useMenuIsOpen, useNextMenuUrl } from '_components/menu/hooks'; +import { useMenuIsOpen, useNextMenuUrl } from '_components'; export function WalletSettingsButton() { const isOpen = useMenuIsOpen(); diff --git a/apps/wallet/src/ui/app/components/menu/button/index.tsx b/apps/wallet/src/ui/app/components/menu/button/index.tsx index d4d07ad1624..6a515433868 100644 --- a/apps/wallet/src/ui/app/components/menu/button/index.tsx +++ b/apps/wallet/src/ui/app/components/menu/button/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { useMenuIsOpen, useNextMenuUrl } from '_components/menu/hooks'; +import { useMenuIsOpen, useNextMenuUrl } from '_components'; import cl from 'clsx'; import { memo } from 'react'; import { Link } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/components/menu/content/AutoLockAccounts.tsx b/apps/wallet/src/ui/app/components/menu/content/AutoLockAccounts.tsx index 6258908658a..ffd493b768e 100644 --- a/apps/wallet/src/ui/app/components/menu/content/AutoLockAccounts.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/AutoLockAccounts.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { useNextMenuUrl } from '_components/menu/hooks'; +import { useNextMenuUrl, Loading, Overlay } from '_components'; import { autoLockDataToMinutes, parseAutoLock, @@ -16,8 +16,6 @@ import toast from 'react-hot-toast'; import { useNavigate } from 'react-router-dom'; import { AutoLockSelector, zodSchema } from '_components/accounts/AutoLockSelector'; -import Loading from '_components/loading'; -import Overlay from '_components/overlay'; export function AutoLockAccounts() { const mainMenuUrl = useNextMenuUrl(true, '/'); diff --git a/apps/wallet/src/ui/app/components/menu/content/MoreOptions.tsx b/apps/wallet/src/ui/app/components/menu/content/MoreOptions.tsx index 084f6cc4251..9ecdc1e21a8 100644 --- a/apps/wallet/src/ui/app/components/menu/content/MoreOptions.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/MoreOptions.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Button } from '_app/shared/ButtonUI'; -import { useNextMenuUrl } from '_components/menu/hooks'; +import { useNextMenuUrl } from '_components'; // import { ampli } from '_src/shared/analytics/ampli'; import { persister } from '_src/ui/app/helpers/queryClient'; import { useBackgroundClient } from '_src/ui/app/hooks/useBackgroundClient'; diff --git a/apps/wallet/src/ui/app/components/menu/content/NetworkSettings.tsx b/apps/wallet/src/ui/app/components/menu/content/NetworkSettings.tsx index 476a1a87312..160dd91c49a 100644 --- a/apps/wallet/src/ui/app/components/menu/content/NetworkSettings.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/NetworkSettings.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { useNextMenuUrl } from '_components/menu/hooks'; -import NetworkSelector from '_components/network-selector'; +import { useNextMenuUrl, NetworkSelector } from '_components'; import { MenuLayout } from './MenuLayout'; diff --git a/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx b/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx index 13d96889334..c28ecffd630 100644 --- a/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/VerifyLedgerConnectionStatus.tsx @@ -13,8 +13,7 @@ import { Ed25519PublicKey } from '@iota/iota.js/keypairs/ed25519'; import { useState } from 'react'; import toast from 'react-hot-toast'; -import { useIotaLedgerClient } from '_components/ledger/IotaLedgerClientProvider'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { useIotaLedgerClient, LoadingIndicator } from '_components'; export interface VerifyLedgerConnectionLinkProps { accountAddress: string; diff --git a/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx b/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx index 8dce87985ca..893866d4cfa 100644 --- a/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/WalletSettingsMenuList.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { useNextMenuUrl } from '_components/menu/hooks'; +import { useNextMenuUrl, Loading } from '_components'; import { useAppSelector } from '_hooks'; import { getCustomNetwork } from '_src/shared/api-env'; import { FAQ_LINK, ToS_LINK } from '_src/shared/constants'; @@ -14,7 +14,6 @@ import { ArrowUpRight12, Clipboard24, Domain24, LockLocked24, More24 } from '@io import { getNetwork, Network } from '@iota/iota.js/client'; import Browser from 'webextension-polyfill'; -import Loading from '_components/loading'; import { MenuLayout } from './MenuLayout'; import MenuListItem from './MenuListItem'; diff --git a/apps/wallet/src/ui/app/components/menu/content/index.tsx b/apps/wallet/src/ui/app/components/menu/content/index.tsx index 1d30378f0d1..0c8d1e40fab 100644 --- a/apps/wallet/src/ui/app/components/menu/content/index.tsx +++ b/apps/wallet/src/ui/app/components/menu/content/index.tsx @@ -2,13 +2,13 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { ErrorBoundary } from '_components/error-boundary'; import { + ErrorBoundary, MainLocationContext, useMenuIsOpen, useMenuUrl, useNextMenuUrl, -} from '_components/menu/hooks'; +} from '_components'; import { useOnKeyboardEvent } from '_hooks'; import { useCallback } from 'react'; import type { MouseEvent } from 'react'; diff --git a/apps/wallet/src/ui/app/components/menu/index.tsx b/apps/wallet/src/ui/app/components/menu/index.tsx index 6de8a33cc81..24e93b5c41f 100644 --- a/apps/wallet/src/ui/app/components/menu/index.tsx +++ b/apps/wallet/src/ui/app/components/menu/index.tsx @@ -4,3 +4,5 @@ export { default as MenuButton } from './button'; export { default as MenuContent } from './content'; +export * from './hooks'; +export * from './button/WalletSettingsButton'; diff --git a/apps/wallet/src/ui/app/components/network-selector/index.tsx b/apps/wallet/src/ui/app/components/network-selector/index.tsx index 807780b0812..a727973742c 100644 --- a/apps/wallet/src/ui/app/components/network-selector/index.tsx +++ b/apps/wallet/src/ui/app/components/network-selector/index.tsx @@ -16,7 +16,7 @@ import { toast } from 'react-hot-toast'; import { CustomRPCInput } from './custom-rpc-input'; import st from './NetworkSelector.module.scss'; -function NetworkSelector() { +export function NetworkSelector() { const activeNetwork = useAppSelector(({ app }) => app.network); const activeCustomRpc = useAppSelector(({ app }) => app.customRpc); const [isCustomRpcInputVisible, setCustomRpcInputVisible] = useState( diff --git a/apps/wallet/src/ui/app/components/nft-display/index.tsx b/apps/wallet/src/ui/app/components/nft-display/index.tsx index 8149be5d80f..29ca66a9182 100644 --- a/apps/wallet/src/ui/app/components/nft-display/index.tsx +++ b/apps/wallet/src/ui/app/components/nft-display/index.tsx @@ -3,8 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Heading } from '_app/shared/heading'; -import Loading from '_components/loading'; -import { NftImage, type NftImageProps } from '_components/nft-display/NftImage'; +import { Loading, NftImage, type NftImageProps } from '_components'; import { useFileExtensionType } from '_hooks'; import { isKioskOwnerToken, useGetNFTMeta, useGetObject, useKioskClient } from '@iota/core'; import { formatAddress } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/components/number-input/index.tsx b/apps/wallet/src/ui/app/components/number-input/index.tsx index ae2a7e16468..1d63c9b9462 100644 --- a/apps/wallet/src/ui/app/components/number-input/index.tsx +++ b/apps/wallet/src/ui/app/components/number-input/index.tsx @@ -17,7 +17,7 @@ export interface NumberInputProps extends FieldProps { 'data-testid'?: string; } -function NumberInput({ +export function NumberInput({ allowNegative, className, placeholder, diff --git a/apps/wallet/src/ui/app/components/overlay/index.tsx b/apps/wallet/src/ui/app/components/overlay/index.tsx index 76e12dbaa99..50810853891 100644 --- a/apps/wallet/src/ui/app/components/overlay/index.tsx +++ b/apps/wallet/src/ui/app/components/overlay/index.tsx @@ -22,7 +22,7 @@ interface OverlayProps { background?: 'bg-iota-lightest'; } -function Overlay({ +export function Overlay({ title, children, showModal, diff --git a/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx b/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx index a2b1d0abb09..a413af649d0 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/StakeTxnCard.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ValidatorLogo } from '_app/staking/validators/ValidatorLogo'; -import { TxnAmount } from '_components/receipt-card/TxnAmount'; +import { TxnAmount } from '_components'; import { NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_REDEEMABLE, NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_STARTS, diff --git a/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx b/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx index e676a0fa925..8dd4663a1c3 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/TxnAddressLink.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_components/explorer-link'; -import { ExplorerLinkType } from '_components/explorer-link/ExplorerLinkType'; +import { ExplorerLink, ExplorerLinkType } from '_components'; import { isIotaNSName } from '@iota/core'; import { formatAddress } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx b/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx index fab2cd99396..fa29251324a 100644 --- a/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx +++ b/apps/wallet/src/ui/app/components/receipt-card/UnstakeTxnCard.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ValidatorLogo } from '_app/staking/validators/ValidatorLogo'; -import { TxnAmount } from '_components/receipt-card/TxnAmount'; +import { TxnAmount } from '_components'; import { Text } from '_src/ui/app/shared/text'; import { useFormatCoin } from '@iota/core'; import type { IotaEvent } from '@iota/iota.js/client'; diff --git a/apps/wallet/src/ui/app/components/transactions-card/TxnIcon.tsx b/apps/wallet/src/ui/app/components/transactions-card/TxnIcon.tsx index a57b501cf85..44f86c27da6 100644 --- a/apps/wallet/src/ui/app/components/transactions-card/TxnIcon.tsx +++ b/apps/wallet/src/ui/app/components/transactions-card/TxnIcon.tsx @@ -5,7 +5,7 @@ import { Account24, ArrowRight16, Info16, Iota, Unstaked, WalletActionStake24 } from '@iota/icons'; import cl from 'clsx'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components'; const icons = { Send: ( diff --git a/apps/wallet/src/ui/app/components/transactions-card/TxnImage.tsx b/apps/wallet/src/ui/app/components/transactions-card/TxnImage.tsx index 8ac4fede940..ee95f755ce8 100644 --- a/apps/wallet/src/ui/app/components/transactions-card/TxnImage.tsx +++ b/apps/wallet/src/ui/app/components/transactions-card/TxnImage.tsx @@ -4,7 +4,7 @@ import { useGetNFTMeta } from '@iota/core'; import { Text } from '_app/shared/text'; -import { NftImage } from '_components/nft-display/NftImage'; +import { NftImage } from '_components'; import { cx } from 'class-variance-authority'; interface TxnImageProps { diff --git a/apps/wallet/src/ui/app/components/user-approve-container/index.tsx b/apps/wallet/src/ui/app/components/user-approve-container/index.tsx index c24d581ffc2..a4aa82a32d0 100644 --- a/apps/wallet/src/ui/app/components/user-approve-container/index.tsx +++ b/apps/wallet/src/ui/app/components/user-approve-container/index.tsx @@ -9,8 +9,7 @@ import type { ReactNode } from 'react'; import { useAccountByAddress } from '../../hooks/useAccountByAddress'; import { Button } from '../../shared/ButtonUI'; -import { UnlockAccountButton } from '_components/accounts/UnlockAccountButton'; -import { DAppInfoCard } from '_components/DAppInfoCard'; +import { UnlockAccountButton, DAppInfoCard } from '_components'; interface UserApproveContainerProps { children: ReactNode | ReactNode[]; diff --git a/apps/wallet/src/ui/app/helpers/errorMessages.ts b/apps/wallet/src/ui/app/helpers/errorMessages.ts index 5cfc2f27264..17ccc6ebb39 100644 --- a/apps/wallet/src/ui/app/helpers/errorMessages.ts +++ b/apps/wallet/src/ui/app/helpers/errorMessages.ts @@ -9,7 +9,7 @@ import { LedgerConnectionFailedError, LedgerDeviceNotFoundError, LedgerNoTransportMechanismError, -} from '_components/ledger/ledgerErrors'; +} from '_components'; /** * Helper method for producing user-friendly error messages from Signer operations diff --git a/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts b/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts index 0527cbe88a7..67fbed24459 100644 --- a/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts +++ b/apps/wallet/src/ui/app/hooks/useAccountsFinder.ts @@ -4,7 +4,7 @@ import { useBackgroundClient } from './useBackgroundClient'; import { AccountsFinder, type AllowedAccountSourceTypes } from '_src/ui/app/accounts-finder'; import { useIotaClient } from '@iota/dapp-kit'; -import { useIotaLedgerClient } from '_components/ledger/IotaLedgerClientProvider'; +import { useIotaLedgerClient } from '_components'; import { useMemo } from 'react'; import type { SourceStrategyToFind, diff --git a/apps/wallet/src/ui/app/hooks/useCreateAccountMutation.ts b/apps/wallet/src/ui/app/hooks/useCreateAccountMutation.ts index 02fe1c4c216..843f4462a53 100644 --- a/apps/wallet/src/ui/app/hooks/useCreateAccountMutation.ts +++ b/apps/wallet/src/ui/app/hooks/useCreateAccountMutation.ts @@ -5,11 +5,7 @@ import { ampli, type AddedAccountsProperties } from '_src/shared/analytics/ampli'; import { useMutation } from '@tanstack/react-query'; -import { - useAccountsFormContext, - AccountsFormType, - type AccountsFormValues, -} from '_components/accounts/AccountsFormContext'; +import { useAccountsFormContext, AccountsFormType, type AccountsFormValues } from '_components'; import { useBackgroundClient } from './useBackgroundClient'; import { AccountType } from '_src/background/accounts/Account'; @@ -33,11 +29,13 @@ function validateAccountFormValues( } return true; } + enum AmpliAccountType { Derived = 'Derived', ImportPrivateKey = 'Private Key', Ledger = 'Ledger', } + const CREATE_TYPE_TO_AMPLI_ACCOUNT: Record< AccountsFormType, AddedAccountsProperties['accountType'] diff --git a/apps/wallet/src/ui/app/hooks/useExplorerLink.ts b/apps/wallet/src/ui/app/hooks/useExplorerLink.ts index 6e5a3e7c336..98ceca9aa0a 100644 --- a/apps/wallet/src/ui/app/hooks/useExplorerLink.ts +++ b/apps/wallet/src/ui/app/hooks/useExplorerLink.ts @@ -11,8 +11,8 @@ import { getObjectUrl, getTransactionUrl, getValidatorUrl, -} from '_components/explorer-link//Explorer'; -import { ExplorerLinkType } from '_components/explorer-link/ExplorerLinkType'; + ExplorerLinkType, +} from '_components'; import { useActiveAddress } from './useActiveAddress'; import useAppSelector from './useAppSelector'; diff --git a/apps/wallet/src/ui/app/hooks/useSigner.ts b/apps/wallet/src/ui/app/hooks/useSigner.ts index fd2d445dfb2..a7e6398a071 100644 --- a/apps/wallet/src/ui/app/hooks/useSigner.ts +++ b/apps/wallet/src/ui/app/hooks/useSigner.ts @@ -7,7 +7,7 @@ import { isLedgerAccountSerializedUI } from '_src/background/accounts/LedgerAcco import { useIotaClient } from '@iota/dapp-kit'; import { walletApiProvider } from '../ApiProvider'; -import { useIotaLedgerClient } from '_components/ledger/IotaLedgerClientProvider'; +import { useIotaLedgerClient } from '_components'; import { LedgerSigner } from '../LedgerSigner'; import { type WalletSigner } from '../WalletSigner'; import { useBackgroundClient } from './useBackgroundClient'; diff --git a/apps/wallet/src/ui/app/pages/StorageMigrationPage.tsx b/apps/wallet/src/ui/app/pages/StorageMigrationPage.tsx index fc3a12d6991..30f392b5de8 100644 --- a/apps/wallet/src/ui/app/pages/StorageMigrationPage.tsx +++ b/apps/wallet/src/ui/app/pages/StorageMigrationPage.tsx @@ -5,8 +5,7 @@ import { useMutation } from '@tanstack/react-query'; import { toast } from 'react-hot-toast'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; -import { PasswordInputDialog } from '_components/PasswordInputDialog'; +import { LoadingIndicator, PasswordInputDialog } from '_components'; import { useBackgroundClient } from '../hooks/useBackgroundClient'; import { useStorageMigrationStatus } from '../hooks/useStorageMigrationStatus'; import { CardLayout } from '../shared/card-layout'; diff --git a/apps/wallet/src/ui/app/pages/accounts/AddAccountPage.tsx b/apps/wallet/src/ui/app/pages/accounts/AddAccountPage.tsx index c78e18efb3a..55f0726c7b2 100644 --- a/apps/wallet/src/ui/app/pages/accounts/AddAccountPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/AddAccountPage.tsx @@ -17,8 +17,7 @@ import { CardAction, ImageType, } from '@iota/apps-ui-kit'; -import { AccountsFormType, useAccountsFormContext } from '_components/accounts/AccountsFormContext'; -import { ConnectLedgerModal } from '_components/ledger/ConnectLedgerModal'; +import { AccountsFormType, useAccountsFormContext, ConnectLedgerModal } from '_components'; import { getLedgerConnectionErrorMessage } from '../../helpers/errorMessages'; import { useAppSelector } from '../../hooks'; import { useCreateAccountsMutation } from '../../hooks/useCreateAccountMutation'; diff --git a/apps/wallet/src/ui/app/pages/accounts/BackupMnemonicPage.tsx b/apps/wallet/src/ui/app/pages/accounts/BackupMnemonicPage.tsx index 595b23d6ad7..6937fd72aaf 100644 --- a/apps/wallet/src/ui/app/pages/accounts/BackupMnemonicPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/BackupMnemonicPage.tsx @@ -5,14 +5,11 @@ import { Button } from '_app/shared/ButtonUI'; import { CardLayout } from '_app/shared/card-layout'; import { Text } from '_app/shared/text'; -import Alert from '_components/alert'; -import Loading from '_components/loading'; -import { HideShowDisplayBox } from '_src/ui/app/components/HideShowDisplayBox'; +import { Alert, Loading, HideShowDisplayBox, VerifyPasswordModal } from '_components'; import { ArrowLeft16, Check12 } from '@iota/icons'; import { useEffect, useMemo, useState } from 'react'; import { Navigate, useLocation, useNavigate, useParams } from 'react-router-dom'; -import { VerifyPasswordModal } from '_components/accounts/VerifyPasswordModal'; import { useAccountSources } from '../../hooks/useAccountSources'; import { useExportPassphraseMutation } from '../../hooks/useExportPassphraseMutation'; import { AccountSourceType } from '_src/background/account-sources/AccountSource'; diff --git a/apps/wallet/src/ui/app/pages/accounts/ExportAccountPage.tsx b/apps/wallet/src/ui/app/pages/accounts/ExportAccountPage.tsx index 4a84160d4fb..879d15f7e1b 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ExportAccountPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ExportAccountPage.tsx @@ -6,11 +6,7 @@ import { useBackgroundClient } from '_src/ui/app/hooks/useBackgroundClient'; import { useMutation } from '@tanstack/react-query'; import { Navigate, useNavigate, useParams } from 'react-router-dom'; -import { VerifyPasswordModal } from '_components/accounts/VerifyPasswordModal'; -import Alert from '_components/alert'; -import { HideShowDisplayBox } from '_components/HideShowDisplayBox'; -import Loading from '_components/loading'; -import Overlay from '_components/overlay'; +import { VerifyPasswordModal, Alert, HideShowDisplayBox, Loading, Overlay } from '_components'; import { useAccounts } from '../../hooks/useAccounts'; export function ExportAccountPage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/ExportPassphrasePage.tsx b/apps/wallet/src/ui/app/pages/accounts/ExportPassphrasePage.tsx index 671e9dcad52..f7863eca7f1 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ExportPassphrasePage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ExportPassphrasePage.tsx @@ -2,13 +2,9 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import { HideShowDisplayBox } from '_components/HideShowDisplayBox'; +import { Alert, HideShowDisplayBox, VerifyPasswordModal, Loading, Overlay } from '_components'; import { Navigate, useNavigate, useParams } from 'react-router-dom'; -import { VerifyPasswordModal } from '_components/accounts/VerifyPasswordModal'; -import Loading from '_components/loading'; -import Overlay from '_components/overlay'; import { useAccountSources } from '../../hooks/useAccountSources'; import { useExportPassphraseMutation } from '../../hooks/useExportPassphraseMutation'; import { AccountSourceType } from '_src/background/account-sources/AccountSource'; diff --git a/apps/wallet/src/ui/app/pages/accounts/ExportSeedPage.tsx b/apps/wallet/src/ui/app/pages/accounts/ExportSeedPage.tsx index 5ff024d5bfa..975916bf0c0 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ExportSeedPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ExportSeedPage.tsx @@ -1,13 +1,9 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import { HideShowDisplayBox } from '_components/HideShowDisplayBox'; +import { Alert, HideShowDisplayBox, VerifyPasswordModal, Loading, Overlay } from '_components'; import { Navigate, useNavigate, useParams } from 'react-router-dom'; -import { VerifyPasswordModal } from '_components/accounts/VerifyPasswordModal'; -import Loading from '_components/loading'; -import Overlay from '_components/overlay'; import { useAccountSources } from '../../hooks/useAccountSources'; import { useExportSeedMutation } from '../../hooks/useExportSeedMutation'; import { AccountSourceType } from '_src/background/account-sources/AccountSource'; diff --git a/apps/wallet/src/ui/app/pages/accounts/ImportLedgerAccountsPage.tsx b/apps/wallet/src/ui/app/pages/accounts/ImportLedgerAccountsPage.tsx index 49b05859770..7554fa27075 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ImportLedgerAccountsPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ImportLedgerAccountsPage.tsx @@ -14,16 +14,15 @@ import { useCallback, useEffect, useState } from 'react'; import toast from 'react-hot-toast'; import { useNavigate, useSearchParams } from 'react-router-dom'; -import { AccountsFormType, useAccountsFormContext } from '_components/accounts/AccountsFormContext'; import { + AccountsFormType, + useAccountsFormContext, LedgerAccountList, type SelectableLedgerAccount, -} from '_components/ledger/LedgerAccountList'; -import { useDeriveLedgerAccounts, type DerivedLedgerAccount, -} from '_components/ledger/useDeriveLedgerAccounts'; -import Overlay from '_components/overlay'; + Overlay, +} from '_components'; import { getIotaApplicationErrorMessage } from '../../helpers/errorMessages'; import { useAccounts } from '../../hooks/useAccounts'; diff --git a/apps/wallet/src/ui/app/pages/accounts/ImportPassphrasePage.tsx b/apps/wallet/src/ui/app/pages/accounts/ImportPassphrasePage.tsx index 4fef8c1a8e0..b125c53aa5a 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ImportPassphrasePage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ImportPassphrasePage.tsx @@ -6,8 +6,7 @@ import { Text } from '_app/shared/text'; import { entropyToSerialized, mnemonicToEntropy } from '_src/shared/utils'; import { useNavigate } from 'react-router-dom'; -import { AccountsFormType, useAccountsFormContext } from '_components/accounts/AccountsFormContext'; -import { ImportRecoveryPhraseForm } from '_components/accounts/ImportRecoveryPhraseForm'; +import { AccountsFormType, useAccountsFormContext, ImportRecoveryPhraseForm } from '_components'; import { Heading } from '../../shared/heading'; export function ImportPassphrasePage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/ImportPrivateKeyPage.tsx b/apps/wallet/src/ui/app/pages/accounts/ImportPrivateKeyPage.tsx index 7b53816ac2e..177f24e501b 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ImportPrivateKeyPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ImportPrivateKeyPage.tsx @@ -5,8 +5,7 @@ import { Text } from '_app/shared/text'; import { useNavigate } from 'react-router-dom'; -import { AccountsFormType, useAccountsFormContext } from '_components/accounts/AccountsFormContext'; -import { ImportPrivateKeyForm } from '_components/accounts/ImportPrivateKeyForm'; +import { AccountsFormType, useAccountsFormContext, ImportPrivateKeyForm } from '_components'; import { Heading } from '../../shared/heading'; export function ImportPrivateKeyPage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/ImportSeedPage.tsx b/apps/wallet/src/ui/app/pages/accounts/ImportSeedPage.tsx index d4b6f1446f4..ee4486cd57b 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ImportSeedPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ImportSeedPage.tsx @@ -4,8 +4,7 @@ import { Text } from '_app/shared/text'; import { useNavigate } from 'react-router-dom'; -import { AccountsFormType, useAccountsFormContext } from '_components/accounts/AccountsFormContext'; -import { ImportSeedForm } from '_components/accounts/ImportSeedForm'; +import { AccountsFormType, useAccountsFormContext, ImportSeedForm } from '_components'; import { Heading } from '../../shared/heading'; export function ImportSeedPage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/ProtectAccountPage.tsx b/apps/wallet/src/ui/app/pages/accounts/ProtectAccountPage.tsx index a6753f4f45d..b704684cfec 100644 --- a/apps/wallet/src/ui/app/pages/accounts/ProtectAccountPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/ProtectAccountPage.tsx @@ -8,15 +8,12 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { toast } from 'react-hot-toast'; import { Navigate, useNavigate, useSearchParams } from 'react-router-dom'; -import { ProtectAccountForm } from '_components/accounts/ProtectAccountForm'; -import { VerifyPasswordModal } from '_components/accounts/VerifyPasswordModal'; -import Loading from '_components/loading'; +import { ProtectAccountForm, VerifyPasswordModal, Loading, AccountsFormType } from '_components'; import { useAccounts } from '../../hooks/useAccounts'; import { autoLockDataToMinutes } from '../../hooks/useAutoLockMinutes'; import { useAutoLockMinutesMutation } from '../../hooks/useAutoLockMinutesMutation'; import { useCreateAccountsMutation } from '../../hooks/useCreateAccountMutation'; import { Heading } from '../../shared/heading'; -import { AccountsFormType } from '_components/accounts/AccountsFormContext'; import { isSeedSerializedUiAccount } from '_src/background/accounts/SeedAccount'; import { isLedgerAccountSerializedUI } from '_src/background/accounts/LedgerAccount'; import { AllowedAccountSourceTypes } from '../../accounts-finder'; diff --git a/apps/wallet/src/ui/app/pages/accounts/WelcomePage.tsx b/apps/wallet/src/ui/app/pages/accounts/WelcomePage.tsx index 92c9b19bc4c..c4e8fffbfc0 100644 --- a/apps/wallet/src/ui/app/pages/accounts/WelcomePage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/WelcomePage.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Loading from '_components/loading'; +import { Loading } from '_components'; import { useNavigate } from 'react-router-dom'; import { useFullscreenGuard, useInitializedGuard } from '_hooks'; import { Button, ButtonType } from '@iota/apps-ui-kit'; diff --git a/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverManyPage.tsx b/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverManyPage.tsx index 3b09c052f6f..1203a38a8bd 100644 --- a/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverManyPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverManyPage.tsx @@ -3,21 +3,23 @@ // SPDX-License-Identifier: Apache-2.0 import { entropyToSerialized, mnemonicToEntropy } from '_src/shared/utils'; -import { ImportRecoveryPhraseForm } from '_src/ui/app/components/accounts/ImportRecoveryPhraseForm'; -import Overlay from '_src/ui/app/components/overlay'; +import { + ImportRecoveryPhraseForm, + Overlay, + RecoverAccountsGroup, + ImportSeedForm, +} from '_components'; import { useRecoveryDataMutation } from '_src/ui/app/hooks/useRecoveryDataMutation'; import { useEffect, useState } from 'react'; import toast from 'react-hot-toast'; import { useNavigate } from 'react-router-dom'; -import { RecoverAccountsGroup } from '_components/accounts/RecoverAccountsGroup'; import { useAccountGroups } from '../../../hooks/useAccountGroups'; import { useAccountSources } from '../../../hooks/useAccountSources'; import { Button } from '../../../shared/ButtonUI'; import { Heading } from '../../../shared/heading'; import { Text } from '../../../shared/text'; import { useForgotPasswordContext } from './ForgotPasswordPage'; -import { ImportSeedForm } from '_src/ui/app/components/accounts/ImportSeedForm'; import { AccountSourceType } from '_src/background/account-sources/AccountSource'; import { AccountType } from '_src/background/accounts/Account'; diff --git a/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverPage.tsx b/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverPage.tsx index 7d7c3daede7..badfa357a00 100644 --- a/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/forgot-password/RecoverPage.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { entropyToSerialized, mnemonicToEntropy } from '_src/shared/utils'; -import { ImportRecoveryPhraseForm } from '_src/ui/app/components/accounts/ImportRecoveryPhraseForm'; +import { ImportRecoveryPhraseForm, ImportSeedForm } from '_components'; import { useRecoveryDataMutation } from '_src/ui/app/hooks/useRecoveryDataMutation'; import { useEffect } from 'react'; import toast from 'react-hot-toast'; @@ -12,7 +12,6 @@ import { useNavigate } from 'react-router-dom'; import { useAccountSources } from '../../../hooks/useAccountSources'; import { Heading } from '../../../shared/heading'; import { Text } from '../../../shared/text'; -import { ImportSeedForm } from '_src/ui/app/components/accounts/ImportSeedForm'; import { AccountSourceType } from '_src/background/account-sources/AccountSource'; export function RecoverPage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetPasswordPage.tsx b/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetPasswordPage.tsx index 24f17c6a0cb..103b5c48083 100644 --- a/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetPasswordPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetPasswordPage.tsx @@ -7,7 +7,7 @@ import { useResetPasswordMutation } from '_src/ui/app/hooks/useResetPasswordMuta import { toast } from 'react-hot-toast'; import { Navigate, useNavigate } from 'react-router-dom'; -import { ProtectAccountForm } from '_components/accounts/ProtectAccountForm'; +import { ProtectAccountForm } from '_components'; import { autoLockDataToMinutes } from '../../../hooks/useAutoLockMinutes'; import { Heading } from '../../../shared/heading'; import { useForgotPasswordContext } from './ForgotPasswordPage'; diff --git a/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetWarningPage.tsx b/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetWarningPage.tsx index aa6f339df96..c4e8e638631 100644 --- a/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetWarningPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/forgot-password/ResetWarningPage.tsx @@ -6,7 +6,7 @@ import { Button } from '_app/shared/ButtonUI'; import { useAccounts } from '_src/ui/app/hooks/useAccounts'; import { Navigate, useNavigate } from 'react-router-dom'; -import { RecoverAccountsGroup } from '_components/accounts/RecoverAccountsGroup'; +import { RecoverAccountsGroup } from '_components'; import { useAccountGroups } from '../../../hooks/useAccountGroups'; import { Heading } from '../../../shared/heading'; import { Text } from '../../../shared/text'; diff --git a/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx b/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx index 1c4ed3d262e..7b002a21d4f 100644 --- a/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/manage/AccountGroup.tsx @@ -3,14 +3,14 @@ // SPDX-License-Identifier: Apache-2.0 import { AccountType, type SerializedUIAccount } from '_src/background/accounts/Account'; -import { AccountIcon } from '_src/ui/app/components/accounts/AccountIcon'; -import { AccountItem } from '_src/ui/app/components/accounts/AccountItem'; import { + AccountIcon, + AccountItem, AccountsFormType, useAccountsFormContext, -} from '_src/ui/app/components/accounts/AccountsFormContext'; -import { NicknameDialog } from '_src/ui/app/components/accounts/NicknameDialog'; -import { VerifyPasswordModal } from '_src/ui/app/components/accounts/VerifyPasswordModal'; + NicknameDialog, + VerifyPasswordModal, +} from '_components'; import { useAccounts } from '_src/ui/app/hooks/useAccounts'; import { useAccountSources } from '_src/ui/app/hooks/useAccountSources'; import { useBackgroundClient } from '_src/ui/app/hooks/useBackgroundClient'; diff --git a/apps/wallet/src/ui/app/pages/accounts/manage/ManageAccountsPage.tsx b/apps/wallet/src/ui/app/pages/accounts/manage/ManageAccountsPage.tsx index 5b040069678..ee05c13a60c 100644 --- a/apps/wallet/src/ui/app/pages/accounts/manage/ManageAccountsPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/manage/ManageAccountsPage.tsx @@ -6,7 +6,7 @@ import { useInitializedGuard } from '_src/ui/app/hooks'; import { useAccountGroups } from '_src/ui/app/hooks/useAccountGroups'; import { useNavigate } from 'react-router-dom'; -import Overlay from '_components/overlay'; +import { Overlay } from '_components'; import { AccountGroup } from './AccountGroup'; export function ManageAccountsPage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderPage.tsx b/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderPage.tsx index a923477c3fd..337147753e6 100644 --- a/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderPage.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderPage.tsx @@ -3,7 +3,7 @@ import { useInitializedGuard } from '_src/ui/app/hooks'; import { useNavigate } from 'react-router-dom'; -import Overlay from '_components/overlay'; +import { Overlay } from '_components'; import { AccountsFinderView } from './AccountsFinderView'; export function AccountsFinderPage() { diff --git a/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderView.tsx b/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderView.tsx index 13487c7a57a..f132b77a5a1 100644 --- a/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderView.tsx +++ b/apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderView.tsx @@ -2,7 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import { Search24 } from '@iota/icons'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { + LoadingIndicator, + AccountBalanceItem, + VerifyPasswordModal, + ConnectLedgerModal, + useIotaLedgerClient, +} from '_components'; import { AccountSourceType, type AccountSourceSerializedUI, @@ -10,10 +16,6 @@ import { import { AccountType } from '_src/background/accounts/Account'; import { type SourceStrategyToFind } from '_src/shared/messaging/messages/payloads/accounts-finder'; import { AllowedAccountSourceTypes } from '_src/ui/app/accounts-finder'; -import { AccountBalanceItem } from '_src/ui/app/components/accounts/AccountBalanceItem'; -import { VerifyPasswordModal } from '_src/ui/app/components/accounts/VerifyPasswordModal'; -import { ConnectLedgerModal } from '_src/ui/app/components/ledger/ConnectLedgerModal'; -import { useIotaLedgerClient } from '_src/ui/app/components/ledger/IotaLedgerClientProvider'; import { getKey } from '_src/ui/app/helpers/accounts'; import { getLedgerConnectionErrorMessage } from '_src/ui/app/helpers/errorMessages'; import { useAccountSources } from '_src/ui/app/hooks/useAccountSources'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/SignMessageRequest.tsx b/apps/wallet/src/ui/app/pages/approval-request/SignMessageRequest.tsx index d1a9b4a4101..1f6d086a18d 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/SignMessageRequest.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/SignMessageRequest.tsx @@ -6,7 +6,7 @@ import { type SignMessageApprovalRequest } from '_payloads/transactions/Approval import { toUtf8OrB64 } from '_src/shared/utils'; import { useMemo } from 'react'; -import { UserApproveContainer } from '_components/user-approve-container'; +import { UserApproveContainer } from '_components'; import { useAppDispatch } from '../../hooks'; import { useAccountByAddress } from '../../hooks/useAccountByAddress'; import { useSigner } from '../../hooks/useSigner'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/index.tsx b/apps/wallet/src/ui/app/pages/approval-request/index.tsx index f8fe725c2d2..7528680d6ff 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/index.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/index.tsx @@ -9,7 +9,7 @@ import { import { useEffect, useMemo } from 'react'; import { useParams } from 'react-router-dom'; -import Loading from '_components/loading'; +import { Loading } from '_components'; import { useAppSelector } from '../../hooks'; import { type RootState } from '../../redux/RootReducer'; import { txRequestsSelectors } from '../../redux/slices/transaction-requests'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx index 8ba8834003a..ba1fad3efcd 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/TransactionDetails/Input.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; +import { ExplorerLink, ExplorerLinkType } from '_components'; import { Text } from '_src/ui/app/shared/text'; import { type TransactionBlockInput } from '@iota/iota.js/transactions'; import { formatAddress, toB64 } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx index df9ac0f7499..89be4e5f1b0 100644 --- a/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx +++ b/apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // import { Transaction } from '@iota/iota.js'; -import { UserApproveContainer } from '_components/user-approve-container'; +import { UserApproveContainer } from '_components'; import { useAppDispatch, useTransactionData, useTransactionDryRun } from '_hooks'; import { type TransactionApprovalRequest } from '_payloads/transactions/ApprovalRequest'; import { respondToTransactionRequest } from '_redux/slices/transaction-requests'; diff --git a/apps/wallet/src/ui/app/pages/home/apps/index.tsx b/apps/wallet/src/ui/app/pages/home/apps/index.tsx index ff7ef9ceb3d..009a613b1ed 100644 --- a/apps/wallet/src/ui/app/pages/home/apps/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/apps/index.tsx @@ -3,11 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 import { Content } from '_app/shared/bottom-menu-layout'; -import FiltersPortal from '_components/filters-tags'; -import AppsPlayGround, { ConnectedAppsCard } from '_components/iota-apps'; +import { FiltersPortal, AppsPlayGround, ConnectedAppsCard, type DAppEntry } from '_components'; import { getFromSessionStorage, setToSessionStorage } from '_src/background/storage-utils'; import { Feature } from '_src/shared/experimentation/features'; -import type { DAppEntry } from '_src/ui/app/components/iota-apps/IotaApp'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { useFeature } from '@growthbook/growthbook-react'; import { useEffect } from 'react'; diff --git a/apps/wallet/src/ui/app/pages/home/hidden-assets/index.tsx b/apps/wallet/src/ui/app/pages/home/hidden-assets/index.tsx index 179e7a35ee3..9d9eb4950fc 100644 --- a/apps/wallet/src/ui/app/pages/home/hidden-assets/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/hidden-assets/index.tsx @@ -2,11 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import { ErrorBoundary } from '_components/error-boundary'; -import Loading from '_components/loading'; -import LoadingSpinner from '_components/loading/LoadingIndicator'; -import { NFTDisplayCard } from '_components/nft-display'; +import { Alert, ErrorBoundary, Loading, LoadingIndicator, NFTDisplayCard } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { Button } from '_src/ui/app/shared/ButtonUI'; import PageTitle from '_src/ui/app/shared/PageTitle'; @@ -63,7 +59,7 @@ function HiddenNftsPage() { if (isLoading) { return (
- +
); } diff --git a/apps/wallet/src/ui/app/pages/home/index.tsx b/apps/wallet/src/ui/app/pages/home/index.tsx index a5f11063885..1cf697d18fc 100644 --- a/apps/wallet/src/ui/app/pages/home/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Loading from '_components/loading'; +import { Loading } from '_components'; import { useInitializedGuard, useSetGrowthbookAttributes } from '_hooks'; import { PageMainLayout } from '_src/ui/app/shared/page-main-layout/PageMainLayout'; import { Outlet } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/interstitial/index.tsx b/apps/wallet/src/ui/app/pages/home/interstitial/index.tsx index 95da37bf507..02ba64e3d0d 100644 --- a/apps/wallet/src/ui/app/pages/home/interstitial/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/interstitial/index.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { ampli } from '_src/shared/analytics/ampli'; -import ExternalLink from '_src/ui/app/components/external-link'; +import { ExternalLink } from '_components'; import { X32 } from '@iota/icons'; import { useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx b/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx index 3b0c2ee3cc3..6b8a79f8583 100644 --- a/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/kiosk-details/index.tsx @@ -3,13 +3,15 @@ // SPDX-License-Identifier: Apache-2.0 import { useActiveAddress } from '_app/hooks/useActiveAddress'; -import { ErrorBoundary } from '_src/ui/app/components/error-boundary'; -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; -import { LabelValueItem } from '_src/ui/app/components/LabelValueItem'; -import { LabelValuesContainer } from '_src/ui/app/components/LabelValuesContainer'; -import Loading from '_src/ui/app/components/loading'; -import { NFTDisplayCard } from '_src/ui/app/components/nft-display'; +import { + ErrorBoundary, + ExplorerLink, + ExplorerLinkType, + LabelValueItem, + LabelValuesContainer, + Loading, + NFTDisplayCard, +} from '_components'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { Collapsible } from '_src/ui/app/shared/collapse'; import PageTitle from '_src/ui/app/shared/PageTitle'; diff --git a/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx b/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx index 0325fc474c1..c1ac229b3b8 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-details/index.tsx @@ -6,11 +6,13 @@ import { useActiveAddress } from '_app/hooks/useActiveAddress'; import { Button } from '_app/shared/ButtonUI'; import { Collapsible } from '_app/shared/collapse'; import { Link } from '_app/shared/Link'; -import { ExplorerLinkType } from '_components/explorer-link/ExplorerLinkType'; -import { LabelValueItem } from '_components/LabelValueItem'; -import { LabelValuesContainer } from '_components/LabelValuesContainer'; -import Loading from '_components/loading'; -import { NFTDisplayCard } from '_components/nft-display'; +import { + ExplorerLinkType, + LabelValueItem, + LabelValuesContainer, + Loading, + NFTDisplayCard, +} from '_components'; import { useNFTBasicData, useOwnedNFT } from '_hooks'; import { useExplorerLink } from '_src/ui/app/hooks/useExplorerLink'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; diff --git a/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx b/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx index 944fd3c9ddf..692fc2253ab 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-transfer/TransferNFTForm.tsx @@ -5,7 +5,7 @@ import BottomMenuLayout, { Content, Menu } from '_app/shared/bottom-menu-layout'; import { Button } from '_app/shared/ButtonUI'; import { Text } from '_app/shared/text'; -import { AddressInput } from '_components/address-input'; +import { AddressInput } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { getSignerOperationErrorMessage } from '_src/ui/app/helpers/errorMessages'; import { useActiveAddress } from '_src/ui/app/hooks'; diff --git a/apps/wallet/src/ui/app/pages/home/nft-transfer/index.tsx b/apps/wallet/src/ui/app/pages/home/nft-transfer/index.tsx index 5556f058516..23c9bcfe109 100644 --- a/apps/wallet/src/ui/app/pages/home/nft-transfer/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/nft-transfer/index.tsx @@ -3,9 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useActiveAddress } from '_app/hooks/useActiveAddress'; -import Loading from '_components/loading'; -import { NFTDisplayCard } from '_components/nft-display'; -import Overlay from '_components/overlay'; +import { Loading, NFTDisplayCard, Overlay } from '_components'; import { useOwnedNFT } from '_hooks'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { Navigate, useNavigate, useParams } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx b/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx index 9380a0afd8b..33118304ec0 100644 --- a/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx +++ b/apps/wallet/src/ui/app/pages/home/nfts/NonVisualAssets.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; +import { ExplorerLink, ExplorerLinkType } from '_components'; import { Text } from '_src/ui/app/shared/text'; import { type IotaObjectData } from '@iota/iota.js/client'; import { formatAddress, parseStructTag } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx b/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx index 5d0d70a4641..237d5f759d3 100644 --- a/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx +++ b/apps/wallet/src/ui/app/pages/home/nfts/VisualAssets.tsx @@ -2,9 +2,8 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { ErrorBoundary } from '_components/error-boundary'; +import { ErrorBoundary, NFTDisplayCard } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; -import { NFTDisplayCard } from '_src/ui/app/components/nft-display'; import { Button } from '_src/ui/app/shared/ButtonUI'; import { EyeClose16 } from '@iota/icons'; import { type IotaObjectData } from '@iota/iota.js/client'; diff --git a/apps/wallet/src/ui/app/pages/home/nfts/index.tsx b/apps/wallet/src/ui/app/pages/home/nfts/index.tsx index 19073f31b65..ffc46eb350e 100644 --- a/apps/wallet/src/ui/app/pages/home/nfts/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/nfts/index.tsx @@ -3,10 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useActiveAddress } from '_app/hooks/useActiveAddress'; -import Alert from '_components/alert'; -import FiltersPortal from '_components/filters-tags'; -import Loading from '_components/loading'; -import LoadingSpinner from '_components/loading/LoadingIndicator'; +import { Alert, FiltersPortal, Loading, LoadingIndicator } from '_components'; import { setToSessionStorage } from '_src/background/storage-utils'; import { AssetFilterTypes, useGetNFTs } from '_src/ui/app/hooks/useGetNFTs'; import PageTitle from '_src/ui/app/shared/PageTitle'; @@ -54,7 +51,7 @@ function NftsPage() { if (isLoading) { return (
- +
); } @@ -97,7 +94,7 @@ function NftsPage() {
{isSpinnerVisible ? (
- +
) : null}
diff --git a/apps/wallet/src/ui/app/pages/home/receipt/index.tsx b/apps/wallet/src/ui/app/pages/home/receipt/index.tsx index 244f7ff449a..97249dfad84 100644 --- a/apps/wallet/src/ui/app/pages/home/receipt/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/receipt/index.tsx @@ -2,10 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import Loading from '_components/loading'; -import Overlay from '_components/overlay'; -import { ReceiptCard } from '_src/ui/app/components/receipt-card'; +import { Alert, Loading, Overlay, ReceiptCard } from '_components'; import { useActiveAddress } from '_src/ui/app/hooks/useActiveAddress'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { useIotaClient } from '@iota/dapp-kit'; diff --git a/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx b/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx index 1397525bd86..4a441a290f6 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/TokenLink.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { CoinItem } from '_components/active-coins-card/CoinItem'; +import { CoinItem } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { type CoinBalance } from '@iota/iota.js/client'; import { MICROS_PER_IOTA } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx b/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx index 9b757a5e151..4a4e6022db0 100644 --- a/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx +++ b/apps/wallet/src/ui/app/pages/home/tokens/TokensDetails.tsx @@ -6,14 +6,10 @@ import { useIsWalletDefiEnabled } from '_app/hooks/useIsWalletDefiEnabled'; import { LargeButton } from '_app/shared/LargeButton'; import { Text } from '_app/shared/text'; import { ButtonOrLink } from '_app/shared/utils/ButtonOrLink'; -import Alert from '_components/alert'; -import { CoinIcon } from '_components/coin-icon'; -import Loading from '_components/loading'; +import { Alert, CoinIcon, Loading, AccountsList, UnlockAccountButton } from '_components'; import { useAppSelector, useCoinsReFetchingConfig } from '_hooks'; import { ampli } from '_src/shared/analytics/ampli'; import { Feature } from '_src/shared/experimentation/features'; -import { AccountsList } from '_src/ui/app/components/accounts/AccountsList'; -import { UnlockAccountButton } from '_src/ui/app/components/accounts/UnlockAccountButton'; import { useActiveAccount } from '_src/ui/app/hooks/useActiveAccount'; import { usePinnedCoinTypes } from '_src/ui/app/hooks/usePinnedCoinTypes'; import FaucetRequestButton from '_src/ui/app/shared/faucet/FaucetRequestButton'; diff --git a/apps/wallet/src/ui/app/pages/home/transactions/CompletedTransactions.tsx b/apps/wallet/src/ui/app/pages/home/transactions/CompletedTransactions.tsx index 65f378d6c6e..38fb83b3915 100644 --- a/apps/wallet/src/ui/app/pages/home/transactions/CompletedTransactions.tsx +++ b/apps/wallet/src/ui/app/pages/home/transactions/CompletedTransactions.tsx @@ -2,11 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import { ErrorBoundary } from '_components/error-boundary'; -import Loading from '_components/loading'; -import { TransactionCard } from '_components/transactions-card'; -import { NoActivityCard } from '_components/transactions-card/NoActivityCard'; +import { Alert, ErrorBoundary, Loading, TransactionCard, NoActivityCard } from '_components'; import { useQueryTransactionsByAddress } from '@iota/core'; import { useActiveAddress } from '_src/ui/app/hooks/useActiveAddress'; diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx index 9c3594b964d..339a8ff5e16 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/CoinSelector.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { ActiveCoinsCard } from '_components/active-coins-card'; -import Overlay from '_components/overlay'; +import { ActiveCoinsCard, Overlay } from '_components'; import { useUnlockedGuard } from '_src/ui/app/hooks/useUnlockedGuard'; import { IOTA_TYPE_ARG } from '@iota/iota.js/utils'; import { useNavigate, useSearchParams } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/PreviewTransfer.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/PreviewTransfer.tsx index e25da2eb553..2f7bab6fd23 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/PreviewTransfer.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/PreviewTransfer.tsx @@ -3,8 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Text } from '_app/shared/text'; -import { TxnAddress } from '_components/receipt-card/TxnAddress'; -import { TxnAmount } from '_components/receipt-card/TxnAmount'; +import { TxnAddress, TxnAmount } from '_components'; import { useActiveAddress } from '_src/ui/app/hooks/useActiveAddress'; import { GAS_SYMBOL } from '_src/ui/app/redux/slices/iota-objects/Coin'; import { parseAmount, useCoinMetadata } from '@iota/core'; diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx index 2d4aa2337b7..76c525e5e12 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/SendTokenForm.tsx @@ -6,9 +6,7 @@ import { useActiveAddress } from '_app/hooks/useActiveAddress'; import BottomMenuLayout, { Content, Menu } from '_app/shared/bottom-menu-layout'; import { Button } from '_app/shared/ButtonUI'; import { Text } from '_app/shared/text'; -import { AddressInput } from '_components/address-input'; -import Alert from '_components/alert'; -import Loading from '_components/loading'; +import { AddressInput, Alert, Loading } from '_components'; import { GAS_SYMBOL } from '_src/ui/app/redux/slices/iota-objects/Coin'; import { InputWithAction } from '_src/ui/app/shared/InputWithAction'; import { diff --git a/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx b/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx index 8724d895ed2..ec3100909c5 100644 --- a/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx +++ b/apps/wallet/src/ui/app/pages/home/transfer-coin/index.tsx @@ -5,8 +5,7 @@ import BottomMenuLayout, { Content, Menu } from '_app/shared/bottom-menu-layout'; import { Button } from '_app/shared/ButtonUI'; import { Text } from '_app/shared/text'; -import { ActiveCoinsCard } from '_components/active-coins-card'; -import Overlay from '_components/overlay'; +import { ActiveCoinsCard, Overlay } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { getSignerOperationErrorMessage } from '_src/ui/app/helpers/errorMessages'; import { useActiveAccount } from '_src/ui/app/hooks/useActiveAccount'; diff --git a/apps/wallet/src/ui/app/pages/site-connect/index.tsx b/apps/wallet/src/ui/app/pages/site-connect/index.tsx index 5ecfcee81c2..8417fe77f48 100644 --- a/apps/wallet/src/ui/app/pages/site-connect/index.tsx +++ b/apps/wallet/src/ui/app/pages/site-connect/index.tsx @@ -2,9 +2,14 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { AccountItemApproveConnection } from '_components/accounts/AccountItemApproveConnection'; -import Loading from '_components/loading'; -import { UserApproveContainer } from '_components/user-approve-container'; +import { + AccountItemApproveConnection, + Loading, + UserApproveContainer, + AccountMultiSelectWithControls, + Alert, + SectionHeader, +} from '_components'; import { useAppDispatch, useAppSelector } from '_hooks'; import type { RootState } from '_redux/RootReducer'; import { permissionsSelectors, respondToPermissionRequest } from '_redux/slices/permissions'; @@ -13,9 +18,6 @@ import { ampli } from '_src/shared/analytics/ampli'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { useParams } from 'react-router-dom'; -import { AccountMultiSelectWithControls } from '_components/accounts/AccountMultiSelect'; -import Alert from '_components/alert'; -import { SectionHeader } from '_components/SectionHeader'; import { useAccountGroups } from '../../hooks/useAccountGroups'; import { useActiveAccount } from '../../hooks/useActiveAccount'; import { PageMainLayoutTitle } from '../../shared/page-main-layout/PageMainLayoutTitle'; diff --git a/apps/wallet/src/ui/app/shared/InputWithAction.tsx b/apps/wallet/src/ui/app/shared/InputWithAction.tsx index 9f7e49ed6e7..788b92e2de1 100644 --- a/apps/wallet/src/ui/app/shared/InputWithAction.tsx +++ b/apps/wallet/src/ui/app/shared/InputWithAction.tsx @@ -3,15 +3,13 @@ // SPDX-License-Identifier: Apache-2.0 import { Text } from '_app/shared/text'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; -import NumberInput from '_components/number-input'; +import { LoadingIndicator, NumberInput, Alert } from '_components'; import { cva, type VariantProps } from 'class-variance-authority'; import clsx from 'clsx'; import { useField, useFormikContext } from 'formik'; import type { ComponentProps, ReactNode } from 'react'; import { forwardRef } from 'react'; -import Alert from '_components/alert'; import { Pill, type PillProps } from './Pill'; const styles = cva( diff --git a/apps/wallet/src/ui/app/shared/LargeButton.tsx b/apps/wallet/src/ui/app/shared/LargeButton.tsx index 5acb561546e..fa654b16ccd 100644 --- a/apps/wallet/src/ui/app/shared/LargeButton.tsx +++ b/apps/wallet/src/ui/app/shared/LargeButton.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components'; import clsx from 'clsx'; import { forwardRef, type ReactNode, type Ref } from 'react'; diff --git a/apps/wallet/src/ui/app/shared/dapp-status/index.tsx b/apps/wallet/src/ui/app/shared/dapp-status/index.tsx index 1b0a427cd22..040face794a 100644 --- a/apps/wallet/src/ui/app/shared/dapp-status/index.tsx +++ b/apps/wallet/src/ui/app/shared/dapp-status/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Loading from '_components/loading'; +import { Loading } from '_components'; import { useAppDispatch, useAppSelector } from '_hooks'; import { createDappStatusSelector } from '_redux/slices/permissions'; import { ampli } from '_src/shared/analytics/ampli'; diff --git a/apps/wallet/src/ui/app/shared/delegated-apy/index.tsx b/apps/wallet/src/ui/app/shared/delegated-apy/index.tsx index ee825c1c9b2..790a7368c54 100644 --- a/apps/wallet/src/ui/app/shared/delegated-apy/index.tsx +++ b/apps/wallet/src/ui/app/shared/delegated-apy/index.tsx @@ -4,7 +4,7 @@ import { Text } from '_app/shared/text'; import { IconTooltip } from '_app/shared/tooltip'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components'; import { roundFloat, useGetValidatorsApy } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; import { useMemo } from 'react'; diff --git a/apps/wallet/src/ui/app/shared/forms/FormField.tsx b/apps/wallet/src/ui/app/shared/forms/FormField.tsx index cf1a90ec165..90e547dfa1c 100644 --- a/apps/wallet/src/ui/app/shared/forms/FormField.tsx +++ b/apps/wallet/src/ui/app/shared/forms/FormField.tsx @@ -5,7 +5,7 @@ import { type ReactNode } from 'react'; import { useFormContext } from 'react-hook-form'; -import Alert from '../../components/alert'; +import { Alert } from '_components'; import { FormLabel } from './FormLabel'; interface FormFieldProps { diff --git a/apps/wallet/src/ui/app/shared/header/Header.tsx b/apps/wallet/src/ui/app/shared/header/Header.tsx index 918306a1883..d2fd486eb45 100644 --- a/apps/wallet/src/ui/app/shared/header/Header.tsx +++ b/apps/wallet/src/ui/app/shared/header/Header.tsx @@ -6,7 +6,7 @@ import { type Network } from '@iota/iota.js/client'; import { type ReactNode } from 'react'; import { Link } from 'react-router-dom'; -import Logo from '_components/logo'; +import { Logo } from '_components'; interface HeaderProps { network: Network; diff --git a/apps/wallet/src/ui/app/shared/page-main-layout/PageMainLayout.tsx b/apps/wallet/src/ui/app/shared/page-main-layout/PageMainLayout.tsx index ec06fd96139..9558877d0d1 100644 --- a/apps/wallet/src/ui/app/shared/page-main-layout/PageMainLayout.tsx +++ b/apps/wallet/src/ui/app/shared/page-main-layout/PageMainLayout.tsx @@ -2,13 +2,10 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { ErrorBoundary } from '_components/error-boundary'; -import { MenuContent } from '_components/menu'; -import { Navigation } from '_components/navigation'; +import { ErrorBoundary, MenuContent, Navigation, WalletSettingsButton } from '_components'; import cn from 'clsx'; import { createContext, useState, type ReactNode } from 'react'; -import { WalletSettingsButton } from '_components/menu/button/WalletSettingsButton'; import { useAppSelector } from '../../hooks'; import { AppType } from '../../redux/slices/app/AppType'; import DappStatus from '../dapp-status'; diff --git a/apps/wallet/src/ui/app/shared/toaster/index.tsx b/apps/wallet/src/ui/app/shared/toaster/index.tsx index b7989433493..f743b95a262 100644 --- a/apps/wallet/src/ui/app/shared/toaster/index.tsx +++ b/apps/wallet/src/ui/app/shared/toaster/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { useMenuIsOpen } from '_components/menu/hooks'; +import { useMenuIsOpen } from '_components'; import { useAppSelector } from '_hooks'; import { getNavIsVisible } from '_redux/slices/app'; import cl from 'clsx'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/OwnerFooter.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/OwnerFooter.tsx index 4b07aee5ff1..29169f50e95 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/OwnerFooter.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/OwnerFooter.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; +import { ExplorerLink, ExplorerLinkType } from '_components'; import { useActiveAddress } from '_src/ui/app/hooks'; import { getOwnerDisplay } from '@iota/core'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/BalanceChanges.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/BalanceChanges.tsx index e6c30fae3a9..2e69c8252cc 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/BalanceChanges.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/BalanceChanges.tsx @@ -1,8 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import { CoinIcon } from '_src/ui/app/components/coin-icon'; +import { Alert, CoinIcon } from '_components'; import { Text } from '_src/ui/app/shared/text'; import { CoinFormat, diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/CoinStack.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/CoinStack.tsx index 61db485486f..71f6b44a036 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/CoinStack.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/CoinStack.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { CoinIcon } from '_src/ui/app/components/coin-icon'; +import { CoinIcon } from '_components'; import { Text } from '../../text'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/ExplorerLink.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/ExplorerLink.tsx index 3fb39e1d256..7c6b7b6394f 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/ExplorerLink.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/ExplorerLink.tsx @@ -1,7 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; +import { ExplorerLinkType } from '_components'; import { useExplorerLink } from '_src/ui/app/hooks/useExplorerLink'; import { ArrowUpRight12 } from '@iota/icons'; import { useEffect, useState } from 'react'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx index e33fcafcce0..3ad77f3af3a 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/GasSummary.tsx @@ -1,8 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; +import { ExplorerLink, ExplorerLinkType } from '_components'; import { useActiveAddress } from '_src/ui/app/hooks'; import { useFormatCoin, type GasSummaryType } from '@iota/core'; import { formatAddress, IOTA_TYPE_ARG } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx index 78beadc60d3..5fe1c1f2e8f 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/ObjectChanges.tsx @@ -1,8 +1,7 @@ // Copyright (c) Mysten Labs, Inc. // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; +import { ExplorerLink, ExplorerLinkType } from '_components'; import { Text } from '_src/ui/app/shared/text'; import { Disclosure } from '@headlessui/react'; import { diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx index 38cc0b9f66c..0a4e70b879e 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/cards/objectSummary/ObjectChangeDisplay.tsx @@ -2,9 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import ExplorerLink from '_src/ui/app/components/explorer-link'; -import { ExplorerLinkType } from '_src/ui/app/components/explorer-link/ExplorerLinkType'; -import { NftImage } from '_src/ui/app/components/nft-display/NftImage'; +import { ExplorerLink, ExplorerLinkType, NftImage } from '_components'; import { type IotaObjectChangeWithDisplay } from '@iota/core'; import { formatAddress } from '@iota/iota.js/utils'; diff --git a/apps/wallet/src/ui/app/shared/transaction-summary/index.tsx b/apps/wallet/src/ui/app/shared/transaction-summary/index.tsx index 0fa9eca0683..ceb45223314 100644 --- a/apps/wallet/src/ui/app/shared/transaction-summary/index.tsx +++ b/apps/wallet/src/ui/app/shared/transaction-summary/index.tsx @@ -4,7 +4,7 @@ import { type TransactionSummary as TransactionSummaryType } from '@iota/core'; import clsx from 'clsx'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components'; import { Heading } from '../heading'; import { BalanceChanges } from './cards/BalanceChanges'; import { ExplorerLinkCard } from './cards/ExplorerLink'; diff --git a/apps/wallet/src/ui/app/shared/utils/ButtonOrLink.tsx b/apps/wallet/src/ui/app/shared/utils/ButtonOrLink.tsx index 9d7aff86d6b..2f0d0ec79be 100644 --- a/apps/wallet/src/ui/app/shared/utils/ButtonOrLink.tsx +++ b/apps/wallet/src/ui/app/shared/utils/ButtonOrLink.tsx @@ -6,7 +6,7 @@ import clsx from 'clsx'; import { forwardRef, type ComponentProps, type ReactNode, type Ref } from 'react'; import { Link, type LinkProps } from 'react-router-dom'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { LoadingIndicator } from '_components'; import { Tooltip } from '../tooltip'; interface WithTooltipProps { diff --git a/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx b/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx index 1b1f25d6216..ce68e072b45 100644 --- a/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx +++ b/apps/wallet/src/ui/app/staking/delegation-detail/DelegationDetailCard.tsx @@ -8,8 +8,7 @@ import { Card } from '_app/shared/card'; import { CardItem } from '_app/shared/card/CardItem'; import { Text } from '_app/shared/text'; import { IconTooltip } from '_app/shared/tooltip'; -import Alert from '_components/alert'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { Alert, LoadingIndicator } from '_components'; import { useAppSelector } from '_hooks'; import { ampli } from '_src/shared/analytics/ampli'; import { MIN_NUMBER_IOTA_TO_STAKE } from '_src/shared/constants'; diff --git a/apps/wallet/src/ui/app/staking/delegation-detail/index.tsx b/apps/wallet/src/ui/app/staking/delegation-detail/index.tsx index b9bf5f948ca..9b9169d5d8f 100644 --- a/apps/wallet/src/ui/app/staking/delegation-detail/index.tsx +++ b/apps/wallet/src/ui/app/staking/delegation-detail/index.tsx @@ -2,8 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import LoadingIndicator from '_components/loading/LoadingIndicator'; -import Overlay from '_components/overlay'; +import { LoadingIndicator, Overlay } from '_components'; import { useGetDelegatedStake } from '@iota/core'; import { Navigate, useNavigate, useSearchParams } from 'react-router-dom'; diff --git a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx index 7209cee86bb..cf360401f31 100644 --- a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx +++ b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx @@ -4,7 +4,7 @@ import { Card } from '_app/shared/card'; import { Text } from '_app/shared/text'; -import NumberInput from '_components/number-input'; +import { NumberInput } from '_components'; import { NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_REDEEMABLE, NUM_OF_EPOCH_BEFORE_STAKING_REWARDS_STARTS, diff --git a/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx b/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx index 02ba756ce0c..06df6c0e1ed 100644 --- a/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx +++ b/apps/wallet/src/ui/app/staking/stake/StakingCard.tsx @@ -6,7 +6,7 @@ import BottomMenuLayout, { Content, Menu } from '_app/shared/bottom-menu-layout' import { Button } from '_app/shared/ButtonUI'; import { Collapsible } from '_app/shared/collapse'; import { Text } from '_app/shared/text'; -import Loading from '_components/loading'; +import { Loading, Alert } from '_components'; import { Coin } from '_redux/slices/iota-objects/Coin'; import { ampli } from '_src/shared/analytics/ampli'; import { MIN_NUMBER_IOTA_TO_STAKE } from '_src/shared/constants'; @@ -34,7 +34,6 @@ import { useCallback, useMemo } from 'react'; import { toast } from 'react-hot-toast'; import { Navigate, useNavigate, useSearchParams } from 'react-router-dom'; -import Alert from '_components/alert'; import { getSignerOperationErrorMessage } from '../../helpers/errorMessages'; import { useActiveAccount } from '../../hooks/useActiveAccount'; import { useSigner } from '../../hooks/useSigner'; diff --git a/apps/wallet/src/ui/app/staking/stake/ValidatorFormDetail.tsx b/apps/wallet/src/ui/app/staking/stake/ValidatorFormDetail.tsx index 33b45d6adf4..119a5e2b758 100644 --- a/apps/wallet/src/ui/app/staking/stake/ValidatorFormDetail.tsx +++ b/apps/wallet/src/ui/app/staking/stake/ValidatorFormDetail.tsx @@ -3,8 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Card } from '_app/shared/card'; -import Alert from '_components/alert'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { Alert, LoadingIndicator } from '_components'; import { Text } from '_src/ui/app/shared/text'; import { IconTooltip } from '_src/ui/app/shared/tooltip'; import { diff --git a/apps/wallet/src/ui/app/staking/stake/index.tsx b/apps/wallet/src/ui/app/staking/stake/index.tsx index 286d5da65d2..6edc1110fd2 100644 --- a/apps/wallet/src/ui/app/staking/stake/index.tsx +++ b/apps/wallet/src/ui/app/staking/stake/index.tsx @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Overlay from '_components/overlay'; +import { Overlay } from '_components'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { SelectValidatorCard } from '../validators/SelectValidatorCard'; diff --git a/apps/wallet/src/ui/app/staking/validators/SelectValidatorCard.tsx b/apps/wallet/src/ui/app/staking/validators/SelectValidatorCard.tsx index 72bad919fa2..02eec44f131 100644 --- a/apps/wallet/src/ui/app/staking/validators/SelectValidatorCard.tsx +++ b/apps/wallet/src/ui/app/staking/validators/SelectValidatorCard.tsx @@ -5,8 +5,7 @@ import { Content, Menu } from '_app/shared/bottom-menu-layout'; import { Button } from '_app/shared/ButtonUI'; import { Text } from '_app/shared/text'; -import Alert from '_components/alert'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { Alert, LoadingIndicator } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { calculateStakeShare, formatPercentageDisplay, useGetValidatorsApy } from '@iota/core'; import { useIotaClientQuery } from '@iota/dapp-kit'; diff --git a/apps/wallet/src/ui/app/staking/validators/ValidatorsCard.tsx b/apps/wallet/src/ui/app/staking/validators/ValidatorsCard.tsx index dbaf7405860..7b4aaecd7a3 100644 --- a/apps/wallet/src/ui/app/staking/validators/ValidatorsCard.tsx +++ b/apps/wallet/src/ui/app/staking/validators/ValidatorsCard.tsx @@ -6,8 +6,7 @@ import BottomMenuLayout, { Content, Menu } from '_app/shared/bottom-menu-layout' import { Button } from '_app/shared/ButtonUI'; import { Card, CardItem } from '_app/shared/card'; import { Text } from '_app/shared/text'; -import Alert from '_components/alert'; -import LoadingIndicator from '_components/loading/LoadingIndicator'; +import { Alert, LoadingIndicator } from '_components'; import { ampli } from '_src/shared/analytics/ampli'; import { formatDelegatedStake, diff --git a/apps/wallet/src/ui/app/staking/validators/index.tsx b/apps/wallet/src/ui/app/staking/validators/index.tsx index 3f4ba42b551..182a6a286fb 100644 --- a/apps/wallet/src/ui/app/staking/validators/index.tsx +++ b/apps/wallet/src/ui/app/staking/validators/index.tsx @@ -2,9 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -import Alert from '_components/alert'; -import Loading from '_components/loading'; -import Overlay from '_components/overlay'; +import { Alert, Loading, Overlay } from '_components'; import { useGetDelegatedStake, DELEGATED_STAKES_QUERY_REFETCH_INTERVAL, diff --git a/apps/wallet/src/ui/index.tsx b/apps/wallet/src/ui/index.tsx index 50fc6641ac3..141d1eb813e 100644 --- a/apps/wallet/src/ui/index.tsx +++ b/apps/wallet/src/ui/index.tsx @@ -5,7 +5,7 @@ import '@fontsource-variable/inter'; import '@fontsource-variable/red-hat-mono'; -import { ErrorBoundary } from '_components/error-boundary'; +import { ErrorBoundary } from '_components'; import { initAppType } from '_redux/slices/app'; import { AppType, getFromLocationSearch } from '_redux/slices/app/AppType'; // import { initAmplitude } from '_src/shared/analytics/amplitude';