From 2423dc30512de19e65279eb3e7677ea2684b2d37 Mon Sep 17 00:00:00 2001 From: Sergey Zhuravlev Date: Tue, 15 Oct 2024 19:17:46 +0300 Subject: [PATCH] chore: now all import declarations are consistent, also added stricter rules for boundaries (#2479) --- .eslintrc.js | 64 ++++++++++++- jest.config.ts | 8 -- src/renderer/app/App.tsx | 35 +++---- .../WebSplashScreen/WebSplashScreen.tsx | 2 +- src/renderer/app/index.html | 2 +- src/renderer/app/index.tsx | 2 +- .../context/GraphqlContext/GraphqlContext.tsx | 6 +- .../providers/context/I18nContext/index.ts | 1 - .../MultisigChainContext.tsx | 16 ++-- .../context/StatusContext/StatusContext.tsx | 6 +- src/renderer/app/providers/context/index.ts | 2 - .../asset/ui/AssetBalance/AssetBalance.tsx | 12 +-- .../asset/ui/AssetDetails/AssetDetails.tsx | 7 +- .../asset/ui/AssetIcon/AssetIcon.test.tsx | 2 +- .../entities/asset/ui/AssetIcon/AssetIcon.tsx | 4 +- .../asset/ui/AssetLinks/AssetLinks.tsx | 8 +- .../ui/EmptyAssetsState/EmptyAssetsState.tsx | 4 +- .../balance/hooks/useAssetBalances.ts | 2 +- .../entities/balance/hooks/useBalance.ts | 2 +- .../entities/balance/lib/balance-utils.ts | 2 +- .../entities/balance/model/balance-model.ts | 4 +- .../entities/basket/model/basket-model.ts | 4 +- .../chain/ui/ChainIcon/ChainIcon.test.tsx | 2 +- .../entities/chain/ui/ChainIcon/ChainIcon.tsx | 6 +- .../ui/ChainTitle/ChainTitle.stories.tsx | 2 +- .../chain/ui/ChainTitle/ChainTitle.test.tsx | 2 +- .../chain/ui/ChainTitle/ChainTitle.tsx | 10 +- .../ui/OperationTitle/OperationTitle.tsx | 6 +- .../entities/chain/ui/XcmChains/XcmChains.tsx | 6 +- .../entities/contact/model/contact-model.ts | 6 +- .../entities/contact/ui/ContactList.tsx | 4 +- .../entities/contact/ui/ContactRow.tsx | 6 +- .../entities/contact/ui/EmptyContactList.tsx | 6 +- .../contact/ui/EmptyFilteredContacts.tsx | 4 +- .../ui/__tests__/EmptyContactList.test.tsx | 2 +- .../__tests__/EmptyFilteredContacts.test.tsx | 2 +- src/renderer/entities/governance/index.ts | 1 + .../governance/lib/governanceService.ts | 2 +- .../lib/governanceSubscribeService.ts | 6 +- .../entities/governance/lib/tracksService.ts | 2 +- .../governance/lib/voteTransactionService.ts | 4 +- .../entities/governance/lib/votingService.ts | 2 +- .../governance/model/proposerIdentity.ts | 2 +- .../entities/governance/model/referendum.ts | 2 +- .../governance/types/voteTransaction.ts | 2 +- .../entities/governance/ui/BalanceDiff.tsx | 2 +- .../entities/governance/ui/DiffValue.tsx | 4 +- .../entities/governance/ui/LockPeriodDiff.tsx | 4 +- .../ui/ReferendumTimer/ReferendumTimer.tsx | 2 +- .../entities/governance/ui/TrackInfo.tsx | 2 +- .../entities/governance/ui/TracksDetails.tsx | 2 +- .../ReferendumVoteChart.tsx | 4 +- .../entities/governance/ui/Voted/Voted.tsx | 2 +- .../governance/utils/createSubscriber.ts | 2 +- .../entities/multisig/api/multisigsService.ts | 2 +- .../lib/multisigEvent/common/types.ts | 4 +- .../lib/multisigEvent/multisigEventService.ts | 6 +- .../multisig/lib/multisigTx/common/types.ts | 4 +- .../multisig/lib/multisigTx/common/utils.ts | 8 +- .../lib/multisigTx/multisigTxService.ts | 10 +- .../lib/multisigTx/useForgetMultisig.ts | 2 +- src/renderer/entities/network/lib/hooks.ts | 2 +- .../entities/network/lib/network-utils.ts | 4 +- src/renderer/entities/network/lib/types.ts | 2 +- .../model/__tests__/network-model.test.ts | 6 +- .../entities/network/model/network-model.ts | 8 +- .../entities/network/ui/InactiveNetwork.tsx | 8 +- .../notification/lib/notification-utils.ts | 4 +- .../__tests__/notification-model.test.ts | 4 +- .../notification/model/notification-model.ts | 4 +- .../operations/lib/operationsUtils.ts | 2 +- .../entities/operations/ui/SignButton.tsx | 8 +- .../operations/ui/SignatorySelector.tsx | 10 +- src/renderer/entities/price/index.ts | 1 + .../entities/price/lib/useCurrencyRate.ts | 2 +- .../model/__tests__/currency-model.test.ts | 4 +- .../__tests__/price-provider-model.test.ts | 4 +- .../entities/price/model/currency-model.ts | 4 +- .../price/model/price-provider-model.ts | 8 +- .../entities/price/ui/AssetFiatBalance.tsx | 8 +- .../entities/price/ui/FiatBalance.tsx | 8 +- src/renderer/entities/price/ui/Price.tsx | 2 +- src/renderer/entities/price/ui/TokenPrice.tsx | 6 +- .../entities/proxy/api/pureProxiesService.ts | 2 +- .../proxy/lib/__tests__/mocks/proxy-mocks.ts | 6 +- .../proxy/lib/__tests__/proxy-utils.test.ts | 4 +- src/renderer/entities/proxy/lib/constants.ts | 2 +- .../entities/proxy/lib/proxy-utils.ts | 6 +- .../proxy/model/__tests__/proxy-model.test.ts | 6 +- .../entities/proxy/model/proxy-model.ts | 4 +- .../ui/ProxyAccount/ProxyAccount.stories.tsx | 4 +- .../ui/ProxyAccount/ProxyAccount.test.tsx | 6 +- .../proxy/ui/ProxyAccount/ProxyAccount.tsx | 8 +- .../entities/proxy/ui/ProxyPopover.tsx | 4 +- .../entities/proxy/ui/PureProxyPopover.tsx | 4 +- .../entities/settings/settingsStorage.ts | 2 +- .../signatory/lib/__tests__/utils.test.ts | 2 +- src/renderer/entities/signatory/lib/utils.ts | 4 +- .../SelectableSignatory.tsx | 12 +-- .../SignatoryCard/SignatoryCard.stories.tsx | 2 +- .../ui/SignatoryCard/SignatoryCard.tsx | 8 +- .../entities/staking/api/apyCalculator.ts | 2 +- .../entities/staking/api/eraService.ts | 2 +- .../staking/api/stakingDataService.ts | 4 +- .../staking/api/stakingRewardsService.ts | 2 +- .../entities/staking/api/validatorsService.ts | 2 +- .../entities/staking/lib/staking-utils.ts | 2 +- src/renderer/entities/staking/lib/types.ts | 2 +- .../ui/AccountsModal/AccountsModal.tsx | 8 +- .../SelectedValidatorsModal.tsx | 8 +- .../ui/StakingPopover/StakingPopover.tsx | 2 +- .../UnstakingDuration/UnstakingDuration.tsx | 2 +- .../ValidatorsModal/ValidatorsModal.test.tsx | 6 +- .../ui/ValidatorsModal/ValidatorsModal.tsx | 10 +- .../ui/ValidatorsTable/ValidatorsTable.tsx | 14 +-- .../lib/__tests__/callDataDecoder.test.ts | 2 +- .../__tests__/transactionConfirmIcon.test.ts | 2 +- .../lib/__tests__/transactionIcon.test.ts | 4 +- .../transaction/lib/__tests__/utils.test.ts | 2 +- .../transaction/lib/callDataDecoder.ts | 4 +- .../transaction/lib/common/constants.ts | 2 +- .../entities/transaction/lib/common/errors.ts | 2 +- .../entities/transaction/lib/common/types.ts | 2 +- .../entities/transaction/lib/common/utils.ts | 4 +- .../transaction/lib/extrinsicService.ts | 8 +- .../entities/transaction/lib/index.ts | 2 + .../lib/mock/extrinsicService.mock.ts | 4 +- .../transaction/lib/transactionBuilder.ts | 4 +- .../transaction/lib/transactionConfirmIcon.ts | 4 +- .../transaction/lib/transactionIcon.ts | 4 +- .../transaction/lib/transactionService.ts | 4 +- .../transaction/lib/validateBalance.ts | 6 +- .../entities/transaction/ui/Fee/Fee.test.tsx | 8 +- .../entities/transaction/ui/Fee/Fee.tsx | 9 +- .../transaction/ui/FeeLoader/FeeLoader.tsx | 2 +- .../ui/FeeWithLabel/FeeWithLabel.tsx | 6 +- .../ui/MultisigDeposit/MultisigDeposit.tsx | 9 +- .../MultisigDepositWithLabel.tsx | 6 +- .../OperationResult/OperationResult.test.tsx | 2 +- .../ui/OperationResult/OperationResult.tsx | 4 +- .../ui/ProxyDeposit/ProxyDeposit.tsx | 9 +- .../ProxyDepositWithLabel.tsx | 6 +- .../QrGenerator/QrDerivationsGenerator.tsx | 2 +- .../QrCode/QrGenerator/QrTxGenerator.test.tsx | 2 +- .../ui/QrCode/QrGenerator/QrTxGenerator.tsx | 4 +- .../QrCode/QrGenerator/common/utils.test.ts | 2 +- .../ui/QrCode/QrGenerator/common/utils.ts | 4 +- .../QrGeneratorContainer.tsx | 6 +- .../QrReader/QrMultiframeSignatureReader.tsx | 6 +- .../ui/QrCode/QrReader/QrReader.test.tsx | 2 +- .../ui/QrCode/QrReader/QrReader.tsx | 6 +- .../ui/QrCode/QrReader/QrReaderWrapper.tsx | 10 +- .../ui/QrCode/QrReader/QrSignatureReader.tsx | 6 +- .../QrCode/QrReader/SignatureReaderError.tsx | 4 +- .../transaction/ui/QrCode/common/constants.ts | 2 +- .../transaction/ui/QrCode/common/types.ts | 2 +- .../ui/Scanning/ScanMultiframeQr.tsx | 12 +-- .../ui/Scanning/ScanSingleframeQr.tsx | 8 +- .../TransactionTitle.test.tsx | 6 +- .../ui/TransactionTitle/TransactionTitle.tsx | 10 +- .../transaction/ui/XcmFee/XcmFee.test.tsx | 10 +- .../entities/transaction/ui/XcmFee/XcmFee.tsx | 13 ++- .../ui/XcmFeeWithLabel/XcmFeeWithLabel.tsx | 6 +- src/renderer/entities/wallet/common/utils.ts | 2 +- .../lib/__tests__/account-utils.test.ts | 6 +- .../lib/__tests__/mocks/permission-mock.ts | 2 +- .../wallet/lib/__tests__/model-utils.test.ts | 4 +- .../wallet/lib/__tests__/wallet-utils.test.ts | 2 +- .../entities/wallet/lib/account-utils.ts | 8 +- src/renderer/entities/wallet/lib/constants.ts | 2 +- .../entities/wallet/lib/model-utils.ts | 5 +- .../entities/wallet/lib/permission-utils.ts | 2 +- .../entities/wallet/lib/wallet-utils.ts | 2 +- .../model/__tests__/mocks/wallet-mock.ts | 4 +- .../model/__tests__/wallet-model.test.ts | 2 +- .../entities/wallet/model/wallet-model.ts | 6 +- .../AccountAddress/AccountAddress.stories.tsx | 2 +- .../ui/AccountAddress/AccountAddress.test.tsx | 2 +- .../ui/AccountAddress/AccountAddress.tsx | 6 +- .../AccountSelectModal/AccountSelectModal.tsx | 8 +- .../wallet/ui/AccountsList/AccountsList.tsx | 10 +- .../AddressWithExplorers.tsx | 6 +- .../AddressWithName.stories.tsx | 2 +- .../AddressWithName/AddressWithName.test.tsx | 2 +- .../ui/AddressWithName/AddressWithName.tsx | 4 +- .../AddressWithTwoLines.tsx | 6 +- .../wallet/ui/Cards/DerivedAccount.tsx | 6 +- .../wallet/ui/Cards/RootAccountLg.tsx | 6 +- .../wallet/ui/Cards/RootAccountMd.tsx | 6 +- .../entities/wallet/ui/Cards/WalletCardLg.tsx | 8 +- .../entities/wallet/ui/Cards/WalletCardMd.tsx | 8 +- .../entities/wallet/ui/Cards/WalletCardSm.tsx | 6 +- .../ui/CheckPermission/CheckPermission.tsx | 2 +- .../wallet/ui/ContactItem/ContactItem.tsx | 6 +- .../ui/ExplorersPopover/ExplorersPopover.tsx | 8 +- .../MultiAccountsList/MultiAccountsList.tsx | 10 +- .../MultishardAccountsList.tsx | 13 +-- .../ui/ProxyWalletAlert/ProxyWalletAlert.tsx | 6 +- .../VaultAccountsList/VaultAccountsList.tsx | 14 +-- .../wallet/ui/WalletIcon/WalletIcon.tsx | 6 +- .../walletConnect/lib/__tests__/utils.test.ts | 2 +- .../entities/walletConnect/lib/utils.ts | 4 +- .../model/wallet-connect-model.ts | 10 +- src/renderer/entities/xcm/model/xcm-model.ts | 4 +- .../AssetRouteGuard/model/asset-guard.ts | 4 +- .../AssetRouteGuard/ui/AssetRouteGuard.tsx | 2 +- .../assets/AssetsChainView/lib/utils.ts | 6 +- .../ui/AssetCard/AssetCard.test.tsx | 10 +- .../ui/AssetCard/AssetCard.tsx | 14 +-- .../AssetsChainView/ui/AssetsChainView.tsx | 16 ++-- .../ui/NetworkAssets/NetworkAssets.test.tsx | 12 +-- .../ui/NetworkAssets/NetworkAssets.tsx | 20 ++-- .../AssetsChainView/ui/NetworkFiatBalance.tsx | 9 +- .../AssetsPortfolioView/lib/tokensService.ts | 18 ++-- .../assets/AssetsPortfolioView/lib/types.ts | 2 +- .../model/__tests__/portfolio-model.test.ts | 4 +- .../model/portfolio-model.ts | 14 +-- .../ui/AssembledAssetAmount.tsx | 12 +-- .../ui/AssetsPortfolioView.tsx | 12 +-- .../AssetsPortfolioView/ui/NetworkCard.tsx | 10 +- .../AssetsPortfolioView/ui/TokenBalance.tsx | 14 +-- .../ui/TokenBalanceList.tsx | 16 ++-- .../assets/AssetsSearch/ui/AssetsSearch.tsx | 4 +- .../__tests__/assets-settings-modal.test.ts | 4 +- .../model/assets-settings-modal.ts | 4 +- .../AssetsSettings/ui/AssetsSettings.tsx | 6 +- src/renderer/features/assets/index.ts | 2 +- .../subscription/lib/balance-sub-utils.ts | 6 +- .../balances/subscription/lib/types.ts | 2 +- .../model/__tests__/balance-sub-model.test.ts | 12 +-- .../model/__tests__/mocks/balance-sub-mock.ts | 4 +- .../subscription/model/balance-sub-model.ts | 14 +-- .../basket/BasketFilter/common/types.ts | 2 +- .../basket/BasketFilter/lib/constants.ts | 2 +- .../features/basket/BasketFilter/lib/utils.ts | 6 +- .../BasketFilter/model/baket-filter-model.ts | 4 +- .../basket/BasketFilter/ui/BasketFilter.tsx | 8 +- src/renderer/features/basket/index.ts | 1 + .../model/__tests__/contact-filter.test.tsx | 2 +- .../ContactFilter/model/contact-filter.ts | 4 +- .../ContactFilter/ui/ContactFilter.tsx | 4 +- .../CreateContactForm/model/contact-form.ts | 6 +- .../ui/CreateContactForm.tsx | 4 +- .../ui/CreateContactNavigation.tsx | 6 +- .../EditContactForm/model/contact-form.ts | 6 +- .../EditContactForm/ui/EditContactForm.tsx | 6 +- .../ui/EditContactNavigation.tsx | 6 +- .../EditRouteGuard/model/edit-guard.ts | 4 +- .../EditRouteGuard/ui/EditRouteGuard.tsx | 2 +- .../model/__tests__/currency-form.test.ts | 2 +- .../CurrencyForm/model/currency-form.ts | 4 +- .../currency/CurrencyForm/ui/CurrencyForm.tsx | 8 +- .../emptyList/ui/EmptyAccountMessage.tsx | 2 +- .../fellowship-members/components/Member.tsx | 2 +- .../components/MembersCard.tsx | 2 +- .../components/MembersListEmptyState.tsx | 4 +- .../components/MembersModal.tsx | 2 +- .../fellowship-members/model/identity.ts | 2 +- .../model/fellowshipNetwork.ts | 4 +- .../components/ProfileCard.tsx | 4 +- .../fellowship-profile/model/fellowship.ts | 2 +- .../fellowship-profile/model/profile.ts | 4 +- .../fellowship-profile/model/status.ts | 6 +- .../components/ProposerName.tsx | 2 +- .../components/shared/ReferendumTrackInfo.tsx | 6 +- .../components/shared/ReferendumVoteChart.tsx | 10 +- .../shared/ReferendumVotingStatusBadge.tsx | 4 +- .../model/details.ts | 2 +- .../model/fellowship.ts | 2 +- .../components/Filter/Filters.tsx | 2 +- .../components/Filter/Search.tsx | 2 +- .../components/List/CompletedReferendums.tsx | 2 +- .../components/List/DisconnectAlert.tsx | 6 +- .../components/List/EmptyState.tsx | 2 +- .../components/List/OngoingReferendums.tsx | 2 +- .../components/List/ReferendumItem.tsx | 2 +- .../components/List/WalletVoted.tsx | 2 +- .../governance/aggregates/delegation.ts | 2 +- .../features/governance/aggregates/details.ts | 4 +- .../features/governance/aggregates/list.ts | 2 +- .../features/governance/aggregates/locks.ts | 4 +- .../governance/aggregates/locksPeriod.ts | 4 +- .../governance/aggregates/proposerIdentity.ts | 6 +- .../features/governance/aggregates/tracks.ts | 2 +- .../governance/aggregates/voteHistory.ts | 4 +- .../features/governance/aggregates/voting.ts | 8 +- .../AccountsMultiSelector.tsx | 4 +- .../components/Delegations/DelegateBadge.tsx | 2 +- .../components/Delegations/DelegateIcon.tsx | 5 +- .../components/Delegations/DelegateName.tsx | 4 +- .../Delegations/TotalDelegation.tsx | 7 +- .../governance/components/Locks/Locks.tsx | 6 +- .../NetworkSelector/NetworkSelector.tsx | 6 +- .../OffChainDataSource/OffChainDataSource.tsx | 6 +- .../OffChainDataSource/constants.ts | 4 +- .../ReferendumDetails/AdvancedModal.tsx | 12 +-- .../ReferendumDetails/DetailsCard.tsx | 2 +- .../ReferendumDetails/MyVotesModal.tsx | 16 ++-- .../ReferendumDetails/ProposalDescription.tsx | 8 +- .../ReferendumDetails/ProposerName.tsx | 10 +- .../ReferendumAdditional.tsx | 6 +- .../ReferendumDetailsModal.tsx | 10 +- .../ReferendumDetails/Threshold.tsx | 6 +- .../components/ReferendumDetails/Timeline.tsx | 4 +- .../ReferendumDetails/TimelineItem.tsx | 6 +- .../ReferendumDetails/VotingBalance.tsx | 8 +- .../ReferendumDetails/VotingStatus.tsx | 10 +- .../ReferendumDetails/VotingSummary.tsx | 2 +- .../ReferendumEndTimer/ReferendumEndTimer.tsx | 2 +- .../ReferendumFilter/ReferendumFilters.tsx | 4 +- .../ReferendumFilter/ReferendumSearch.tsx | 4 +- .../ReferendumList/CompletedReferendums.tsx | 6 +- .../ReferendumList/ListItemPlaceholder.tsx | 2 +- .../ReferendumList/OngoingReferendums.tsx | 4 +- .../ReferendumList/ReferendumItem.tsx | 6 +- .../components/ReferendumList/VotedBy.tsx | 8 +- .../ReferendumList/VotedReferendumItem.tsx | 8 +- .../components/VotingHistory/VoteCount.tsx | 2 +- .../VotingHistory/VotingHistoryDialog.tsx | 12 +-- .../VotingHistory/VotingHistoryList.tsx | 10 +- .../VotingHistoryListEmptyState.tsx | 4 +- .../VotingHistoryListPlaceholder.tsx | 2 +- .../VotingHistoryLoadingScreen.tsx | 2 +- .../VotingStatusBadge/VotingStatusBadge.tsx | 8 +- src/renderer/features/governance/index.ts | 1 + .../governance/lib/createFeeCalculator.ts | 6 +- .../governance/lib/createMultipleTxStore.ts | 6 +- .../governance/lib/createTransactionForm.ts | 10 +- .../features/governance/lib/createTxStore.ts | 6 +- .../features/governance/lib/unlock-rules.ts | 4 +- .../features/governance/lib/unlockService.ts | 4 +- .../governance/lib/votingListService.ts | 6 +- .../governance/model/delegatedVotes.ts | 4 +- .../features/governance/model/description.ts | 8 +- .../features/governance/model/filter.ts | 2 +- .../features/governance/model/lockPeriods.ts | 4 +- .../features/governance/model/locks.ts | 6 +- .../governance/model/networkSelector.ts | 6 +- .../features/governance/model/offChain.ts | 2 +- .../features/governance/model/timeline.ts | 8 +- .../features/governance/model/title.ts | 8 +- .../model/unlock/unlock-validate-model.ts | 10 +- .../governance/model/unlock/unlock.ts | 10 +- .../model/vote/voteValidateModel.ts | 12 +-- .../governance/model/votingSummary.ts | 8 +- .../features/governance/types/structs.ts | 2 +- .../governance/utils/getLocksForAddress.ts | 4 +- .../features/navigation/ui/NavItem.tsx | 8 +- .../features/navigation/ui/Navigation.tsx | 14 +-- .../lib/custom-rpc-utils.ts | 2 +- .../model/add-custom-rpc-model.ts | 6 +- .../model/edit-custom-rpc-model.ts | 6 +- .../model/remove-custom-rpc-model.ts | 6 +- .../ui/AddCustomRpcModal.tsx | 8 +- .../ui/EditCustomRpcModal.tsx | 8 +- .../NetworkList/lib/networks-list-utils.ts | 4 +- .../__tests__/active-networks-model.test.ts | 2 +- .../__tests__/inactive-networks-model.test.ts | 2 +- .../model/__tests__/mocks/networks-mock.ts | 2 +- .../model/active-networks-model.ts | 4 +- .../model/inactive-networks-model.ts | 4 +- .../network/NetworkList/ui/ActiveNetwork.tsx | 10 +- .../network/NetworkList/ui/EmptyNetworks.tsx | 4 +- .../NetworkList/ui/InactiveNetwork.tsx | 6 +- .../network/NetworkList/ui/NetworkList.tsx | 6 +- .../__tests__/network-selector-utils.test.ts | 4 +- .../lib/network-selector-utils.ts | 4 +- .../network/NetworkSelector/lib/types.ts | 2 +- .../__tests__/network-selector-model.test.ts | 6 +- .../model/network-selector-model.ts | 6 +- .../NetworkSelector/ui/NetworkSelector.tsx | 18 ++-- .../model/networks-filter-model.ts | 4 +- .../NetworksFilter/ui/NetworksFilter.tsx | 4 +- src/renderer/features/network/index.ts | 8 +- .../ui/EmptyNotifications.tsx | 6 +- .../NotificationsList/lib/constants.ts | 2 +- .../__tests__/notification-list-model.test.ts | 2 +- .../model/notification-list-model.ts | 2 +- .../NotificationsList/ui/NotificationRow.tsx | 8 +- .../ui/NotificationsList.tsx | 2 +- .../notifies/MultisigCreatedNotification.tsx | 12 +-- .../ui/notifies/ProxyCreatedNotification.tsx | 14 +-- .../ui/notifies/ProxyRemovedNotification.tsx | 14 +-- .../OperationSign/lib/operation-sign-utils.ts | 2 +- .../operations/OperationSign/lib/types.ts | 4 +- .../model/__tests__/sign-model.test.ts | 6 +- .../model/operation-sign-model.ts | 2 +- .../OperationSign/model/sign-model.ts | 6 +- .../OperationSign/model/sign-wc-model.ts | 10 +- .../OperationSign/ui/OperationSign.tsx | 2 +- .../OperationSign/ui/SigningSwitch.tsx | 4 +- .../operations/OperationSign/ui/Vault.tsx | 12 +-- .../OperationSign/ui/WalletConnect.tsx | 22 ++--- .../model/__tests__/submit-model.test.ts | 10 +- .../OperationSubmit/model/submit-model.ts | 10 +- .../OperationSubmit/ui/OperationSubmit.tsx | 10 +- .../AddProxy/model/confirm-model.ts | 8 +- .../AddProxy/ui/Confirmation.tsx | 16 ++-- .../AddPureProxied/model/confirm-model.ts | 4 +- .../AddPureProxied/ui/Confirmation.tsx | 12 +-- .../BondExtra/model/confirm-model.ts | 11 ++- .../BondExtra/ui/Confirmation.tsx | 18 ++-- .../BondNominate/model/confirm-model.ts | 8 +- .../BondNominate/ui/Confirmation.tsx | 18 ++-- .../Delegate/model/confirm-model.ts | 8 +- .../Delegate/ui/Confirmation.tsx | 14 +-- .../EditDelegation/model/confirm-model.ts | 8 +- .../EditDelegation/ui/Confirmation.tsx | 14 +-- .../Nominate/model/confirm-model.ts | 6 +- .../Nominate/ui/Confirmation.tsx | 16 ++-- .../Payee/model/confirm-model.ts | 11 ++- .../Payee/ui/Confirmation.tsx | 16 ++-- .../Referendum/RemoveVote/ui/Confirmation.tsx | 2 +- .../Referendum/Vote/ui/Confirmation.tsx | 2 +- .../RemoveProxy/model/confirm-model.ts | 8 +- .../RemoveProxy/ui/Confirmation.tsx | 14 +-- .../RemovePureProxied/model/confirm-model.ts | 8 +- .../RemovePureProxied/ui/Confirmation.tsx | 16 ++-- .../Restake/model/confirm-model.ts | 11 ++- .../Restake/ui/Confirmation.tsx | 18 ++-- .../RevokeDelegation/model/confirm-model.ts | 8 +- .../RevokeDelegation/ui/Confirmation.tsx | 14 +-- .../Transfer/model/confirm-model.ts | 10 +- .../Transfer/ui/Confirmation.tsx | 14 +-- .../Unstake/model/confirm-model.ts | 8 +- .../Unstake/ui/Confirmation.tsx | 18 ++-- .../Withdraw/model/confirm-model.ts | 11 ++- .../Withdraw/ui/Confirmation.tsx | 18 ++-- .../common/ConfirmDetails.tsx | 6 +- .../common/MultisigExistsAlert.tsx | 2 +- .../OperationsConfirm/lib/basket-utils.ts | 4 +- .../lib/createTransactionConfirmStore.ts | 8 +- .../OperationsFilter/lib/constants.ts | 2 +- .../operations/OperationsFilter/lib/utils.ts | 2 +- .../OperationsFilter/ui/OperationsFilter.tsx | 15 ++- .../lib/add-proxy-rules.ts | 6 +- .../lib/add-pure-proxied-rules.ts | 6 +- .../lib/bond-extra-rules.ts | 4 +- .../lib/bond-nominate-rules.ts | 4 +- .../lib/delegate-rules.ts | 4 +- .../lib/nominate-rules.ts | 4 +- .../OperationsValidation/lib/payee-rules.ts | 4 +- .../lib/remove-proxy-rules.ts | 6 +- .../lib/remove-pure-proxied-rules.ts | 6 +- .../OperationsValidation/lib/restake-rules.ts | 4 +- .../lib/transfer-rules.ts | 4 +- .../OperationsValidation/lib/unstake-rules.ts | 4 +- .../lib/validation/balance.ts | 2 +- .../lib/withdraw-rules.ts | 4 +- .../model/add-proxy-validate-model.ts | 10 +- .../model/add-pure-proxied-validate-model.ts | 10 +- .../model/bond-extra-validate-model.ts | 10 +- .../model/bond-nominate-validate-model.ts | 10 +- .../model/delegate-validate-model.ts | 12 +-- .../model/nominate-validate-model.ts | 8 +- .../model/payee-validate-model.ts | 8 +- .../model/remove-proxy-validate-model.ts | 10 +- .../remove-pure-proxied-validate-model.ts | 10 +- .../model/remove-vote-validate-model.ts | 12 +-- .../model/restake-validate-model.ts | 10 +- .../model/revoke-delegation-validate-model.ts | 12 +-- .../model/transfer-validate-model.ts | 12 +-- .../model/unstake-validate-model.ts | 10 +- .../model/withdraw-validate-model.ts | 12 +-- .../OperationsValidation/types/types.ts | 2 +- src/renderer/features/proxies/index.ts | 1 + .../lib/__tests__/proxies-utils.test.ts | 2 +- .../lib/__tests__/worker-utils.test.ts | 6 +- .../features/proxies/lib/proxies-utils.ts | 6 +- .../features/proxies/lib/worker-utils.ts | 2 +- .../model/__tests__/proxies-model.test.ts | 10 +- .../features/proxies/model/proxies-model.ts | 20 ++-- .../workers/__tests__/proxy-worker.test.ts | 2 +- .../features/proxies/workers/proxy-worker.ts | 2 +- .../Validators/model/validators-model.ts | 8 +- .../staking/Validators/ui/Validators.tsx | 10 +- .../DerivationsAddressModal/lib/utils.ts | 6 +- .../ui/DdKeyQrReader.tsx | 12 +-- .../ui/DerivationsAddressModal.tsx | 10 +- .../ExportKeys/lib/export-keys-utils.ts | 6 +- .../features/wallets/ExportKeys/lib/types.ts | 2 +- .../__tests__/forget-wallet-model.test.ts | 16 ++-- .../ForgetWallet/model/forget-wallet-model.ts | 10 +- .../ForgetWallet/ui/ForgetWalletModal.tsx | 6 +- .../lib/__tests__/import-keys-model.test.ts | 4 +- .../lib/__tests__/import-keys-utils.test.ts | 2 +- .../ImportKeys/lib/import-keys-utils.ts | 8 +- .../lib/mocks/import-keys-utils.mock.ts | 2 +- .../features/wallets/ImportKeys/lib/types.ts | 2 +- .../ImportKeys/model/import-keys-model.ts | 4 +- .../wallets/ImportKeys/ui/ImportKeysModal.tsx | 10 +- .../wallets/ImportKeys/ui/mocks/mock-data.ts | 2 +- .../model/__tests__/constructor-model.test.ts | 6 +- .../model/__tests__/mocks/constructor-mock.ts | 2 +- .../KeyConstructor/model/constructor-model.ts | 10 +- .../KeyConstructor/ui/KeyConstructor.tsx | 6 +- .../wallets/KeyConstructor/ui/KeyForm.tsx | 10 +- .../wallets/KeyConstructor/ui/KeysList.tsx | 10 +- .../KeyConstructor/ui/ShardInfoPopover.tsx | 4 +- .../KeyConstructor/ui/WarningModal.tsx | 4 +- .../model/__tests__/mocks/wallet-mock.ts | 2 +- .../__tests__/rename-wallet-model.test.ts | 4 +- .../RenameWallet/model/rename-wallet-model.ts | 8 +- .../RenameWallet/ui/RenameWalletModal.tsx | 6 +- .../model/wallet-pairing-model.ts | 2 +- .../ui/SelectWalletPairing.tsx | 10 +- .../ShardSelectorModal/lib/selector-utils.ts | 2 +- .../ShardSelectorModal/lib/shards-utils.ts | 6 +- .../wallets/ShardSelectorModal/lib/types.ts | 2 +- .../model/__tests__/mocks/shards-mock.ts | 2 +- .../model/__tests__/shards-model.test.ts | 6 +- .../ShardSelectorModal/model/shards-model.ts | 6 +- .../ShardSelectorModal/ui/SelectableShard.tsx | 10 +- .../ShardSelectorModal/ui/ShardSearch.tsx | 4 +- .../ui/ShardSelectorButton.tsx | 4 +- .../ui/ShardSelectorModal.tsx | 4 +- .../ShardSelectorModal/ui/ShardedGroup.tsx | 4 +- .../ShardSelectorModal/ui/ShardsStructure.tsx | 14 +-- .../lib/__tests__/wallet-select-utils.test.ts | 2 +- .../WalletSelect/lib/wallet-select-utils.ts | 6 +- .../__tests__/wallet-select-model.test.ts | 6 +- .../WalletSelect/model/wallet-select-model.ts | 14 +-- .../WalletSelect/ui/ProxiedTooltip.tsx | 4 +- .../wallets/WalletSelect/ui/WalletButton.tsx | 6 +- .../WalletSelect/ui/WalletFiatBalance.tsx | 13 ++- .../wallets/WalletSelect/ui/WalletGroup.tsx | 8 +- .../wallets/WalletSelect/ui/WalletPanel.tsx | 6 +- .../wallets/WalletSelect/ui/WalletSelect.tsx | 4 +- .../pages/AddressBook/Contacts/Contacts.tsx | 8 +- .../CreateContact/CreateContact.tsx | 4 +- .../AddressBook/EditContact/EditContact.tsx | 6 +- src/renderer/pages/Assets/Assets/Assets.tsx | 10 +- .../pages/Assets/Assets/model/assets-model.ts | 8 +- .../Assets/ReceiveAsset/ReceiveAsset.tsx | 8 +- .../pages/Assets/SendAsset/SendAsset.tsx | 8 +- .../pages/Basket/lib/basket-page-utils.ts | 2 +- .../pages/Basket/lib/operation-title.ts | 6 +- .../pages/Basket/lib/prepareTransactions.ts | 18 ++-- src/renderer/pages/Basket/lib/utils.ts | 2 +- .../pages/Basket/model/basket-page-model.ts | 16 ++-- .../Basket/model/sign-operations-model.ts | 26 ++--- src/renderer/pages/Basket/ui/Basket.tsx | 6 +- src/renderer/pages/Basket/ui/EmptyBasket.tsx | 4 +- src/renderer/pages/Basket/ui/Operation.tsx | 18 ++-- .../pages/Basket/ui/SignOperation.tsx | 20 ++-- .../pages/Basket/ui/SignOperations.tsx | 22 ++--- .../pages/Fellowship/ui/Fellowship.tsx | 2 +- .../ui/FellowshipReferendumDetails.tsx | 6 +- .../ui/FellowshipReferendumList.tsx | 4 +- .../Governance/aggregates/governancePage.ts | 4 +- .../lib/__tests__/governancePageUtils.test.ts | 4 +- .../Governance/lib/governancePageUtils.ts | 8 +- .../pages/Governance/ui/EmptyGovernance.tsx | 4 +- .../pages/Governance/ui/Governance.tsx | 16 ++-- .../pages/Notifications/Notifications.tsx | 6 +- .../Vault/KeyQrReader/KeyQrReader.test.tsx | 8 +- .../Vault/KeyQrReader/KeyQrReader.tsx | 12 +-- .../ManageMultishard/ManageMultishard.tsx | 18 ++-- .../ManageSingleshard/ManageSingleshard.tsx | 22 +++-- .../Vault/ManageVault/ManageVault.tsx | 23 ++--- .../Vault/ManageVault/VaultInfoPopover.tsx | 4 +- .../__tests__/manage-vault-model.test.ts | 8 +- .../ManageVault/model/manage-vault-model.ts | 16 ++-- .../Onboarding/Vault/ScanStep/ScanStep.tsx | 10 +- src/renderer/pages/Onboarding/Vault/Vault.tsx | 8 +- .../Onboarding/WalletConnect/ManageStep.tsx | 15 +-- .../Onboarding/WalletConnect/NovaWallet.tsx | 22 ++--- .../WalletConnect/WalletConnect.tsx | 22 ++--- .../Onboarding/WalletConnect/lib/constants.ts | 2 +- .../model/wc-onboarding-model.ts | 2 +- .../pages/Onboarding/WatchOnly/EmptyState.tsx | 4 +- .../pages/Onboarding/WatchOnly/WatchOnly.tsx | 16 ++-- .../Onboarding/Welcome/PrivacyPolicy.tsx | 4 +- .../pages/Onboarding/Welcome/Welcome.tsx | 10 +- .../pages/Onboarding/Welcome/WelcomeCard.tsx | 8 +- .../pages/Operations/Operations.test.tsx | 10 +- src/renderer/pages/Operations/Operations.tsx | 18 ++-- src/renderer/pages/Operations/common/utils.ts | 10 +- .../components/ActionSteps/Confirmation.tsx | 32 ++++--- .../components/ActionSteps/Submit.tsx | 17 ++-- .../pages/Operations/components/Details.tsx | 26 ++--- .../EmptyState/EmptyOperations.test.tsx | 2 +- .../components/EmptyState/EmptyOperations.tsx | 6 +- .../pages/Operations/components/LogModal.tsx | 22 ++--- .../pages/Operations/components/Operation.tsx | 20 ++-- .../components/OperationCardDetails.tsx | 34 +++---- .../components/OperationFullInfo.tsx | 17 ++-- .../components/OperationSignatories.tsx | 22 ++--- .../pages/Operations/components/Status.tsx | 6 +- .../components/TransactionAmount.tsx | 12 +-- .../components/modals/ApproveTx.tsx | 30 +++--- .../components/modals/CallDataModal.tsx | 10 +- .../components/modals/RejectReasonModal.tsx | 4 +- .../Operations/components/modals/RejectTx.tsx | 28 +++--- .../modals/SignatorySelectModal.tsx | 10 +- src/renderer/pages/Operations/index.ts | 2 + .../pages/Settings/Currency/Currency.tsx | 4 +- .../pages/Settings/Networks/lib/constants.ts | 2 +- .../__tests__/networks-overview-model.test.ts | 6 +- .../Networks/model/networks-overview-model.ts | 11 ++- .../pages/Settings/Networks/ui/Networks.tsx | 19 ++-- .../pages/Settings/Overview/Overview.test.tsx | 2 +- .../pages/Settings/Overview/Overview.tsx | 4 +- .../GeneralActions/GeneralActions.test.tsx | 2 +- .../GeneralActions/GeneralActions.tsx | 12 +-- .../SocialLinks/SocialLinks.test.tsx | 2 +- .../components/SocialLinks/SocialLinks.tsx | 6 +- .../components/Version/Version.test.tsx | 2 +- .../Overview/components/Version/Version.tsx | 4 +- .../model/referendum-data-model.ts | 6 +- .../ReferendumData/ui/ReferendumData.tsx | 2 +- src/renderer/pages/Staking/lib/constants.ts | 2 +- src/renderer/pages/Staking/lib/types.ts | 2 +- .../pages/Staking/ui/AboutStaking.tsx | 12 +-- src/renderer/pages/Staking/ui/Actions.tsx | 12 +-- src/renderer/pages/Staking/ui/NetworkInfo.tsx | 24 ++--- .../pages/Staking/ui/NominatorItem.tsx | 14 +-- .../pages/Staking/ui/NominatorsList.tsx | 12 +-- src/renderer/pages/Staking/ui/ShardedList.tsx | 14 +-- src/renderer/pages/Staking/ui/Staking.tsx | 23 ++--- src/renderer/pages/Staking/ui/TimeToEra.tsx | 4 +- src/renderer/pages/index.tsx | 4 +- .../lib/__tests__/multisigs-utils.test.ts | 2 +- .../multisigs/lib/mulitisigs-utils.ts | 4 +- .../model/__tests__/multisigs-model.test.ts | 8 +- .../multisigs/model/multisigs-model.ts | 10 +- .../api/balances/service/balanceService.ts | 6 +- .../api/governance/off-chain/lib/types.ts | 2 +- .../off-chain/service/delegationService.ts | 2 +- .../off-chain/service/polkassemblyService.ts | 4 +- .../off-chain/service/subsquareService.ts | 4 +- .../governance/on-chain/lib/claim-types.ts | 2 +- .../on-chain/lib/threshold-types.ts | 2 +- src/renderer/shared/api/network/lib/types.ts | 2 +- src/renderer/shared/api/network/lib/utils.ts | 2 +- .../api/network/provider/CachedProvider.ts | 2 +- .../api/network/service/chainsService.ts | 10 +- .../api/network/service/metadataService.ts | 2 +- .../api/network/service/networkService.ts | 4 +- .../shared/api/polkassembly/lib/types.ts | 2 +- .../__tests__/fiatService.test.ts | 2 +- .../api/price-provider/service/fiatService.ts | 4 +- .../shared/api/proxy/service/proxyService.ts | 2 +- src/renderer/shared/api/storage/lib/types.ts | 2 +- .../api/storage/migration/migration-2.ts | 2 +- .../storage/service/multisigEventStorage.ts | 2 +- .../api/storage/service/storageService.ts | 2 +- .../api/storage/service/transactionStorage.ts | 2 +- .../shared/api/subsquare/lib/types.ts | 2 +- src/renderer/shared/api/xcm/lib/types.ts | 2 +- .../shared/api/xcm/service/xcmService.ts | 2 +- src/renderer/shared/core/types/account.ts | 4 + .../shared/core/types/notification.ts | 2 +- src/renderer/shared/core/types/transaction.ts | 2 +- .../shared/effector/createDataSubscription.ts | 2 +- .../i18n}/I18nContext.tsx | 9 +- src/renderer/shared/i18n/index.ts | 1 + .../lib/hooks/__tests__/useCountdown.test.ts | 4 +- .../lib/hooks/useAltOrCtrlKeyPressed.ts | 2 +- src/renderer/shared/lib/hooks/useCountdown.ts | 2 +- .../shared/lib/hooks/useModalClose.ts | 2 +- .../lib/utils/__tests__/address.test.ts | 2 +- .../lib/utils/__tests__/derivation.test.ts | 2 +- src/renderer/shared/lib/utils/address.ts | 2 +- src/renderer/shared/lib/utils/assets.ts | 2 +- src/renderer/shared/lib/utils/balance.ts | 2 +- src/renderer/shared/lib/utils/chains.ts | 2 +- src/renderer/shared/lib/utils/constants.ts | 2 +- src/renderer/shared/lib/utils/strings.ts | 2 +- src/renderer/shared/lib/utils/substrate.ts | 2 +- .../ConfirmContext/ConfirmContext.test.tsx | 4 +- .../ConfirmContext/ConfirmContext.tsx | 6 +- .../providers}/ConfirmContext/index.ts | 0 src/renderer/shared/providers/index.ts | 1 + .../ui-entities/Account/Account.stories.tsx | 2 +- .../shared/ui-entities/Account/Account.tsx | 5 +- .../AccountExplorer/AccountExplorers.tsx | 2 +- .../ui-entities/Address/Address.stories.tsx | 2 +- .../shared/ui-entities/Address/Address.tsx | 2 +- .../shared/ui-entities/Hash/Hash.stories.tsx | 2 +- .../TransactionDetails/TransactionDetails.tsx | 6 +- .../shared/ui-kit/Dropdown/Dropdown.tsx | 2 +- src/renderer/shared/ui-kit/Modal/Modal.tsx | 6 +- .../shared/ui-kit/Skeleton/Skeleton.tsx | 2 +- .../shared/ui/Accordion/Accordion.tsx | 2 +- src/renderer/shared/ui/Alert/Alert.tsx | 2 +- src/renderer/shared/ui/Alert/AlertItem.tsx | 2 +- .../shared/ui/Alert/common/constants.ts | 2 +- .../shared/ui/Animation/Animation.tsx | 6 +- .../shared/ui/Animation/common/constants.ts | 6 +- .../shared/ui/BlockExplorer/BlockExplorer.tsx | 2 +- .../ui/Buttons/Button/Button.stories.tsx | 2 +- .../shared/ui/Buttons/Button/Button.tsx | 2 +- .../ui/Buttons/ButtonCard/ButtonCard.tsx | 2 +- .../ui/Buttons/ButtonLink/ButtonLink.tsx | 2 +- .../Buttons/ButtonWebLink/ButtonWebLink.tsx | 2 +- .../ui/Buttons/IconButton/IconButton.tsx | 2 +- src/renderer/shared/ui/Card/Card.tsx | 2 +- src/renderer/shared/ui/Checkbox/Checkbox.tsx | 2 +- .../shared/ui/ContextMenu/ContextMenu.tsx | 2 +- .../shared/ui/Countdown/Countdown.test.tsx | 2 +- .../shared/ui/Countdown/Countdown.tsx | 4 +- src/renderer/shared/ui/Counter/Counter.tsx | 2 +- .../shared/ui/DetailRow/DetailRow.tsx | 2 +- .../shared/ui/Dropdowns/Combobox/Combobox.tsx | 2 +- .../DropdownButton/DropdownButton.tsx | 2 +- .../DropdownIconButton/DropdownIconButton.tsx | 2 +- .../ui/Dropdowns/MultiSelect/MultiSelect.tsx | 2 +- .../shared/ui/Dropdowns/Select/Select.tsx | 2 +- .../shared/ui/Dropdowns/common/constants.ts | 2 +- .../shared/ui/Dropdowns/common/types.ts | 2 +- .../shared/ui/Duration/Duration.test.tsx | 2 +- src/renderer/shared/ui/Duration/Duration.tsx | 2 +- .../shared/ui/Duration/common/utils.ts | 2 +- .../shared/ui/EmptyList/EmptyList.tsx | 3 +- .../shared/ui/ExplorerLink/ExplorerLink.tsx | 2 +- .../shared/ui/ExplorerLink/constants.ts | 2 +- .../ui/FallbackScreen/FallbackScreen.test.tsx | 2 +- .../ui/FallbackScreen/FallbackScreen.tsx | 2 +- src/renderer/shared/ui/Icon/Icon.tsx | 2 +- .../shared/ui/Icon/data/aesthetics.tsx | 44 +++++---- src/renderer/shared/ui/Icon/data/arrow.tsx | 22 +++-- src/renderer/shared/ui/Icon/data/chevron.tsx | 14 +-- src/renderer/shared/ui/Icon/data/confirm.tsx | 32 ++++--- src/renderer/shared/ui/Icon/data/currency.tsx | 20 ++-- src/renderer/shared/ui/Icon/data/explorer.tsx | 22 +++-- src/renderer/shared/ui/Icon/data/flag.tsx | 8 +- .../shared/ui/Icon/data/functionals.tsx | 94 ++++++++++--------- src/renderer/shared/ui/Icon/data/keyType.tsx | 14 +-- src/renderer/shared/ui/Icon/data/misc.tsx | 18 ++-- src/renderer/shared/ui/Icon/data/mst.tsx | 36 +++---- .../shared/ui/Icon/data/navigation.tsx | 20 ++-- src/renderer/shared/ui/Icon/data/social.tsx | 18 ++-- src/renderer/shared/ui/Icon/data/staking.tsx | 20 ++-- .../shared/ui/Icon/data/walletType.tsx | 32 ++++--- .../shared/ui/Identicon/Identicon.stories.tsx | 2 +- .../shared/ui/Identicon/Identicon.test.tsx | 2 +- .../shared/ui/Identicon/Identicon.tsx | 4 +- src/renderer/shared/ui/InfoLink/InfoLink.tsx | 2 +- .../shared/ui/InputHint/InputHint.tsx | 2 +- .../ui/Inputs/AmountInput/AmountInput.tsx | 12 +-- .../shared/ui/Inputs/Input/Input.stories.tsx | 2 +- src/renderer/shared/ui/Inputs/Input/Input.tsx | 2 +- .../shared/ui/Inputs/InputArea/InputArea.tsx | 2 +- .../shared/ui/Inputs/InputFile/InputFile.tsx | 2 +- .../PasswordInput/PasswordInput.test.tsx | 2 +- .../ui/Inputs/PasswordInput/PasswordInput.tsx | 4 +- .../ui/Inputs/SearchInput/SearchInput.tsx | 2 +- .../shared/ui/LabelHelpbox/LabelHelpBox.tsx | 2 +- .../LanguageSwitcher.stories.tsx | 2 +- .../LanguageSwitcher.test.tsx | 2 +- .../ui/LanguageSwitcher/LanguageSwitcher.tsx | 4 +- src/renderer/shared/ui/Loader/Loader.tsx | 2 +- src/renderer/shared/ui/Markdown/Markdown.tsx | 4 +- .../shared/ui/Modals/BaseModal/BaseModal.tsx | 2 +- .../ui/Modals/ConfirmModal/ConfirmModal.tsx | 2 +- .../ui/Modals/StatusModal/StatusModal.tsx | 2 +- .../ui/OperationStatus/OperationStatus.tsx | 2 +- src/renderer/shared/ui/Plate/Plate.tsx | 2 +- .../ui/Popovers/MenuPopover/MenuPopover.tsx | 2 +- .../shared/ui/Popovers/Popover/Popover.tsx | 4 +- .../shared/ui/Popovers/Tooltip/Tooltip.tsx | 2 +- .../shared/ui/RadioGroup/RadioCard.tsx | 2 +- .../shared/ui/RadioGroup/RadioOption.tsx | 2 +- .../shared/ui/Shimmering/Shimmering.tsx | 2 +- .../shared/ui/StatusLabel/StatusLabel.tsx | 2 +- src/renderer/shared/ui/Switch/Switch.tsx | 2 +- src/renderer/shared/ui/Tabs/Tabs.tsx | 2 +- .../shared/ui/Typography/common/TextBase.ts | 2 +- .../ui/Typography/components/BodyText.tsx | 2 +- .../ui/Typography/components/CaptionText.tsx | 2 +- .../ui/Typography/components/FootnoteText.tsx | 2 +- .../Typography/components/HeaderTitleText.tsx | 2 +- .../ui/Typography/components/HeadlineText.tsx | 2 +- .../ui/Typography/components/HelpText.tsx | 2 +- .../ui/Typography/components/LabelText.tsx | 2 +- .../Typography/components/LargeTitleText.tsx | 2 +- .../Typography/components/SmallTitleText.tsx | 2 +- .../ui/Typography/components/TitleText.tsx | 2 +- .../widgets/AddProxyModal/lib/types.ts | 2 +- .../model/__tests__/add-proxy-model.test.ts | 18 ++-- .../model/__tests__/form-model.test.ts | 10 +- .../AddProxyModal/model/__tests__/mock.ts | 2 +- .../AddProxyModal/model/add-proxy-model.ts | 16 ++-- .../widgets/AddProxyModal/model/form-model.ts | 20 ++-- .../widgets/AddProxyModal/ui/AddProxy.tsx | 16 ++-- .../widgets/AddProxyModal/ui/AddProxyForm.tsx | 22 ++--- .../widgets/AddPureProxiedModal/lib/types.ts | 2 +- .../__tests__/add-pure-proxied-model.test.ts | 10 +- .../model/__tests__/form-model.test.ts | 10 +- .../model/__tests__/mock.ts | 2 +- .../model/add-pure-proxied-model.ts | 30 +++--- .../AddPureProxiedModal/model/form-model.ts | 18 ++-- .../AddPureProxiedModal/ui/AddPureProxied.tsx | 16 ++-- .../ui/AddPureProxiedForm.tsx | 22 ++--- .../AssetTransactionModal/lib/utils.ts | 4 +- .../__tests__/asset-transaction-model.test.ts | 4 +- .../model/asset-transaction-model.ts | 6 +- .../ui/AssetTransactionModal.tsx | 18 ++-- .../widgets/CreateWallet/lib/types.ts | 2 +- .../model/__tests__/confirm-model.test.ts | 6 +- .../model/__tests__/flow-model.test.ts | 14 +-- .../model/__tests__/form-model.test.ts | 12 +-- .../CreateWallet/model/__tests__/mock.ts | 2 +- .../model/__tests__/signatory-model.test.ts | 4 +- .../CreateWallet/model/confirm-model.ts | 4 +- .../widgets/CreateWallet/model/flow-model.ts | 14 +-- .../widgets/CreateWallet/model/form-model.ts | 10 +- .../CreateWallet/model/signatory-model.ts | 4 +- .../model/wallet-provider-model.ts | 2 +- .../CreateWallet/ui/CreateWalletProvider.tsx | 16 ++-- .../ui/MultisigWallet/ConfirmationStep.tsx | 8 +- .../ui/MultisigWallet/MultisigWallet.tsx | 10 +- .../MultisigWallet/NameNetworkSelection.tsx | 12 +-- .../SelectMultisigWalletType.tsx | 4 +- .../SelectSignatoriesThreshold.tsx | 6 +- .../ui/MultisigWallet/common/types.ts | 2 +- .../components/MultisigCreationFees.tsx | 10 +- .../components/SelectSignatories.tsx | 4 +- .../components/SelectedSignatoriesModal.tsx | 4 +- .../MultisigWallet/components/Signatory.tsx | 12 +-- .../components/SignerSelection.tsx | 2 +- .../MultisigWallet/components/WalletItem.tsx | 8 +- .../CurrencyModal/ui/CurrencyModal.tsx | 10 +- .../components/CurrentDelegationModal.tsx | 2 +- .../components/DelegationCard.tsx | 2 +- .../model/current-delegation-model.ts | 4 +- .../DelegateDetails/ui/DelegateActivity.tsx | 2 +- .../DelegateDetails/ui/DelegateDetails.tsx | 2 +- .../DelegateDetails/ui/DelegateIdentity.tsx | 2 +- .../DelegateDetails/ui/DelegateSummary.tsx | 2 +- .../DelegateDetails/ui/YourDelegation.tsx | 4 +- .../DelegateDetails/ui/YourDelegations.tsx | 2 +- .../widgets/DelegateModal/lib/types.ts | 2 +- .../DelegateModal/model/delegate-model.ts | 20 ++-- .../widgets/DelegateModal/model/form-model.ts | 14 +-- .../widgets/DelegateModal/ui/Delegate.tsx | 14 +-- .../widgets/DelegateModal/ui/DelegateForm.tsx | 19 ++-- .../DelegateModal/ui/SelectTracksForm.tsx | 2 +- .../widgets/DelegationModal/common/utils.ts | 7 -- .../components/AddCustomDelegationModal.tsx | 2 +- .../components/AddToRegistry.tsx | 2 +- .../components/DelegationCard.tsx | 2 +- .../components/DelegationList.tsx | 2 +- .../components/DelegationModal.tsx | 2 +- .../DelegationModal/components/EmptyState.tsx | 4 +- src/renderer/widgets/DelegationModal/index.ts | 1 + .../DelegationModal/model/delegation-model.ts | 2 +- .../widgets/EditDelegationModal/lib/types.ts | 2 +- .../model/edit-delegation-model.ts | 20 ++-- .../EditDelegationModal/model/form-model.ts | 14 +-- .../EditDelegationModal/ui/DelegateForm.tsx | 19 ++-- .../EditDelegationModal/ui/EditDelegation.tsx | 14 +-- .../ui/SelectTracksForm.tsx | 2 +- src/renderer/widgets/Layout/ui/MainLayout.tsx | 4 +- .../ui/CreateContactModal.tsx | 10 +- .../ui/EditContactModal.tsx | 12 +-- .../ui/ReceiveAssetModal.tsx | 20 ++-- .../widgets/RemoveProxyModal/lib/types.ts | 2 +- .../RemoveProxyModal/model/form-model.ts | 18 ++-- .../model/remove-proxy-model.ts | 34 +++---- .../RemoveProxyModal/ui/RemoveProxy.tsx | 16 ++-- .../RemoveProxyModal/ui/RemoveProxyForm.tsx | 10 +- .../widgets/RemovePureProxyModal/lib/types.ts | 2 +- .../RemovePureProxyModal/model/form-model.ts | 18 ++-- .../model/remove-pure-proxy-model.ts | 30 +++--- .../ui/RemovePureProxy.tsx | 16 ++-- .../ui/RemovePureProxyForm.tsx | 12 +-- .../RemovePureProxyModal/ui/Warning.tsx | 4 +- .../aggregates/removeVotesModal.ts | 18 ++-- .../RemoveVotesModal/ui/RemoveVotesModal.tsx | 4 +- .../RevokeDelegationModal/lib/types.ts | 2 +- .../model/revoke-delegation-model.ts | 18 ++-- .../ui/RevokeDelegation.tsx | 16 ++-- .../Staking/BondExtra/lib/bond-extra-utils.ts | 6 +- .../widgets/Staking/BondExtra/lib/types.ts | 2 +- .../BondExtra/model/bond-extra-model.ts | 20 ++-- .../Staking/BondExtra/model/form-model.ts | 18 ++-- .../Staking/BondExtra/ui/BondExtra.tsx | 14 +-- .../widgets/Staking/BondExtra/ui/BondForm.tsx | 27 ++++-- .../Staking/BondNominate/lib/bond-utils.ts | 6 +- .../widgets/Staking/BondNominate/lib/types.ts | 2 +- .../BondNominate/model/bond-nominate-model.ts | 24 ++--- .../Staking/BondNominate/model/form-model.ts | 12 +-- .../Staking/BondNominate/ui/BondForm.tsx | 21 ++--- .../Staking/BondNominate/ui/BondNominate.tsx | 16 ++-- .../Staking/Nominate/lib/nominate-utils.ts | 6 +- .../widgets/Staking/Nominate/lib/types.ts | 2 +- .../Staking/Nominate/model/form-model.ts | 18 ++-- .../Staking/Nominate/model/nominate-model.ts | 24 ++--- .../widgets/Staking/Nominate/ui/Nominate.tsx | 16 ++-- .../Staking/Nominate/ui/NominateForm.tsx | 17 ++-- .../widgets/Staking/Payee/lib/payee-utils.ts | 6 +- .../widgets/Staking/Payee/lib/types.ts | 2 +- .../widgets/Staking/Payee/model/form-model.ts | 12 +-- .../Staking/Payee/model/payee-model.ts | 20 ++-- .../widgets/Staking/Payee/ui/Payee.tsx | 14 +-- .../widgets/Staking/Payee/ui/PayeeForm.tsx | 21 ++--- .../widgets/Staking/Restake/lib/types.ts | 2 +- .../Staking/Restake/model/form-model.ts | 16 ++-- .../Staking/Restake/model/restake-model.ts | 14 +-- .../widgets/Staking/Restake/ui/Restake.tsx | 14 +-- .../Staking/Restake/ui/RestakeForm.tsx | 16 ++-- .../widgets/Staking/Unstake/lib/types.ts | 2 +- .../Staking/Unstake/model/form-model.ts | 16 ++-- .../Staking/Unstake/model/unstake-model.ts | 14 +-- .../widgets/Staking/Unstake/ui/Unstake.tsx | 14 +-- .../Staking/Unstake/ui/UnstakeForm.tsx | 16 ++-- .../widgets/Staking/Withdraw/lib/types.ts | 2 +- .../Staking/Withdraw/model/form-model.ts | 16 ++-- .../Staking/Withdraw/model/withdraw-model.ts | 14 +-- .../widgets/Staking/Withdraw/ui/Withdraw.tsx | 14 +-- .../Staking/Withdraw/ui/WithdrawForm.tsx | 16 ++-- src/renderer/widgets/Transfer/index.ts | 2 + src/renderer/widgets/Transfer/lib/types.ts | 2 +- .../Transfer/lib/xcm-transfer-utils.ts | 4 +- .../widgets/Transfer/model/form-model.ts | 14 +-- .../widgets/Transfer/model/transfer-model.ts | 12 +-- .../Transfer/model/xcm-transfer-model.ts | 10 +- src/renderer/widgets/Transfer/ui/Transfer.tsx | 16 ++-- .../widgets/Transfer/ui/TransferForm.tsx | 18 ++-- .../widgets/UnlockModal/aggregates/unlock.ts | 18 ++-- .../UnlockModal/aggregates/unlockConfirm.ts | 6 +- .../UnlockModal/aggregates/unlockForm.ts | 6 +- src/renderer/widgets/UnlockModal/index.ts | 2 + .../UnlockModal/ui/UnlockConfirmation.tsx | 10 +- .../widgets/UnlockModal/ui/UnlockForm.tsx | 18 ++-- .../widgets/UnlockModal/ui/UnlockInfo.tsx | 18 ++-- .../widgets/UnlockModal/ui/UnlockModal.tsx | 16 ++-- .../widgets/VoteModal/aggregates/voteForm.ts | 4 +- .../widgets/VoteModal/aggregates/voteModal.ts | 16 ++-- src/renderer/widgets/VoteModal/index.ts | 1 + .../widgets/VoteModal/ui/AboutVoting.tsx | 4 +- .../widgets/VoteModal/ui/RevoteModal.tsx | 18 ++-- .../widgets/VoteModal/ui/VoteForm.tsx | 14 +-- .../widgets/VoteModal/ui/VoteModal.tsx | 18 ++-- .../ui/formFields/AccountsSelector.tsx | 4 +- .../VoteModal/ui/formFields/Amount.tsx | 8 +- .../ui/formFields/ConvictionSelect.tsx | 2 +- .../VoteModal/ui/formFields/Signatories.tsx | 4 +- src/renderer/widgets/WalletDetails/index.ts | 1 + .../widgets/WalletDetails/lib/types.ts | 2 +- .../widgets/WalletDetails/lib/utils.ts | 6 +- .../__tests__/mocks/wallet-provider-mocks.ts | 4 +- .../__tests__/vault-details-model.test.ts | 8 +- .../__tests__/wallet-provider-model.test.ts | 12 +-- .../model/vault-details-model.ts | 10 +- .../model/wallet-provider-model.ts | 12 +-- .../WalletDetails/model/wc-details-model.ts | 14 +-- .../ui/components/NoProxiesAction.tsx | 8 +- .../ui/components/ProxiesList.tsx | 24 ++--- .../ui/components/ProxyAccountWithActions.tsx | 14 +-- .../ui/components/ShardsList.tsx | 10 +- .../ui/components/WalletConnectAccounts.tsx | 14 +-- .../ui/components/WalletDetailsProvider.tsx | 4 +- .../ui/wallets/MultishardWalletDetails.tsx | 24 ++--- .../ui/wallets/MultisigWalletDetails.tsx | 28 +++--- .../ui/wallets/ProxiedWalletDetails.tsx | 22 ++--- .../ui/wallets/SimpleWalletDetails.tsx | 24 ++--- .../ui/wallets/VaultWalletDetails.tsx | 30 +++--- .../ui/wallets/WalletConnectDetails.tsx | 28 +++--- tests/integrations/jest.config.ts | 4 - tsconfig.paths.json | 15 +-- 963 files changed, 3588 insertions(+), 3428 deletions(-) delete mode 100644 src/renderer/app/providers/context/I18nContext/index.ts create mode 100644 src/renderer/features/basket/index.ts create mode 100644 src/renderer/pages/Operations/index.ts rename src/renderer/{app/providers/context/I18nContext => shared/i18n}/I18nContext.tsx (87%) create mode 100644 src/renderer/shared/i18n/index.ts rename src/renderer/{app/providers/context => shared/providers}/ConfirmContext/ConfirmContext.test.tsx (94%) rename src/renderer/{app/providers/context => shared/providers}/ConfirmContext/ConfirmContext.tsx (92%) rename src/renderer/{app/providers/context => shared/providers}/ConfirmContext/index.ts (100%) create mode 100644 src/renderer/shared/providers/index.ts delete mode 100644 src/renderer/widgets/DelegationModal/common/utils.ts diff --git a/.eslintrc.js b/.eslintrc.js index 80f244aa85..2d38f2d603 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,6 +8,7 @@ const boundaryTypes = ['app', 'shared', 'domains', 'entities', 'processes', 'fea const boundaries = boundaryTypes.map((type) => ({ type, pattern: `src/renderer/${type}/*`, + capture: ['package'], })); module.exports = { @@ -29,6 +30,8 @@ module.exports = { }, rules: { 'sort-imports': ['error', { ignoreDeclarationSort: true }], + // For debugging purpose, too slow for every day usage + // 'import-x/no-cycle': ['error', { maxDepth: Number.Infinity }], 'import-x/no-unresolved': 'off', 'import-x/named': 'off', 'import-x/namespace': 'off', @@ -41,7 +44,7 @@ module.exports = { groups: ['builtin', 'external', 'parent', ['sibling', 'index']], pathGroups: boundaryTypes.map((type) => ({ group: 'parent', - pattern: `@{/${type},${type}}/**`, + pattern: `@/${type}/**`, position: 'before', })), 'newlines-between': 'always', @@ -182,6 +185,13 @@ module.exports = { message: 'Use cnTw instead.', }, ], + 'import-x/max-dependencies': [ + 'warn', + { + max: 15, + ignoreTypeImports: true, + }, + ], // Validated by typescript '@typescript-eslint/no-empty-interface': 'off', @@ -206,6 +216,58 @@ module.exports = { 'effector/enforce-store-naming-convention': 'off', // Boundaries setup + 'boundaries/entry-point': [ + 'error', + { + default: 'disallow', + rules: [ + { + target: boundaryTypes, + allow: ['index.ts', 'index.tsx'], + }, + { + target: ['shared'], + allow: ['**/*'], + }, + { + target: ['pages'], + allow: ['**/*'], + }, + // TODO fix this packages + { + target: [ + ['features', { package: 'operations' }], + ['features', { package: 'governance' }], + ['features', { package: 'wallets' }], + ], + allow: ['**/*.ts', '**/*.tsx'], + }, + ], + }, + ], + + 'boundaries/external': [ + 'error', + { + default: 'allow', + rules: [ + { + from: ['domains'], + disallow: ['react', 'effector-react'], + message: 'Domain should contain only logic, not views.', + }, + { + from: [ + ['shared', { package: 'ui-kit' }], + ['shared', { package: 'ui-entities' }], + ], + disallow: ['effector', 'effector-react'], + message: 'Data bindings are forbidden in ui library components.', + }, + ], + }, + ], + 'boundaries/element-types': [ 'error', { diff --git a/jest.config.ts b/jest.config.ts index 60f9d1812a..f1bae13249 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -43,14 +43,6 @@ const config: Config = { '\\.(css|less|scss|sass)$': 'identity-obj-proxy', '^raptorq$': '/node_modules/raptorq/raptorq.js', '^@/(.*)$': '/src/renderer/$1', - '^@renderer(.*)$': '/src/renderer/$1', - '^@app(.*)$': '/src/renderer/app/$1', - '^@pages(.*)$': '/src/renderer/pages/$1', - '^@processes(.*)$': '/src/renderer/processes/$1', - '^@widgets(.*)$': '/src/renderer/widgets/$1', - '^@features(.*)$': '/src/renderer/features/$1', - '^@entities(.*)$': '/src/renderer/entities/$1', - '^@shared(.*)$': '/src/renderer/shared/$1', '^dexie$': '/node_modules/dexie/dist/dexie.js', '^lottie': 'lottie-react', }, diff --git a/src/renderer/app/App.tsx b/src/renderer/app/App.tsx index d4cf58f156..821a9f408c 100644 --- a/src/renderer/app/App.tsx +++ b/src/renderer/app/App.tsx @@ -2,24 +2,25 @@ import { useGate, useUnit } from 'effector-react'; import { useEffect } from 'react'; import { useNavigate, useRoutes } from 'react-router-dom'; -import { logger } from '@shared/config/utils'; -import { kernelModel } from '@shared/core'; -import { Paths } from '@shared/routes'; -import { basketModel } from '@entities/basket'; -import { governanceModel } from '@entities/governance'; -import { networkModel } from '@entities/network'; -import { notificationModel } from '@entities/notification'; -import { proxyModel } from '@entities/proxy'; -import { walletModel } from '@entities/wallet'; -import { multisigsModel } from '@processes/multisigs'; -import { assetsSettingsModel } from '@features/assets'; -import { navigationModel } from '@features/navigation'; -import { proxiesModel } from '@features/proxies'; -import { CreateWalletProvider } from '@widgets/CreateWallet'; -import { WalletDetailsProvider } from '@widgets/WalletDetails'; -import { ROUTES_CONFIG } from '@pages/index'; +import { logger } from '@/shared/config/utils'; +import { kernelModel } from '@/shared/core'; +import { ConfirmDialogProvider } from '@/shared/providers'; +import { Paths } from '@/shared/routes'; +import { basketModel } from '@/entities/basket'; +import { governanceModel } from '@/entities/governance'; +import { networkModel } from '@/entities/network'; +import { notificationModel } from '@/entities/notification'; +import { proxyModel } from '@/entities/proxy'; +import { walletModel } from '@/entities/wallet'; +import { multisigsModel } from '@/processes/multisigs'; +import { assetsSettingsModel } from '@/features/assets'; +import { navigationModel } from '@/features/navigation'; +import { proxiesModel } from '@/features/proxies'; +import { CreateWalletProvider } from '@/widgets/CreateWallet'; +import { WalletDetailsProvider } from '@/widgets/WalletDetails'; +import { ROUTES_CONFIG } from '@/pages/index'; -import { ConfirmDialogProvider, GraphqlProvider, MultisigChainProvider, StatusModalProvider } from './providers'; +import { GraphqlProvider, MultisigChainProvider, StatusModalProvider } from './providers'; logger.init(); diff --git a/src/renderer/app/components/WebSplashScreen/WebSplashScreen.tsx b/src/renderer/app/components/WebSplashScreen/WebSplashScreen.tsx index 979ee17a28..1cd0ba3e05 100644 --- a/src/renderer/app/components/WebSplashScreen/WebSplashScreen.tsx +++ b/src/renderer/app/components/WebSplashScreen/WebSplashScreen.tsx @@ -1,7 +1,7 @@ import { useMemo } from 'react'; +import { useI18n } from '@/shared/i18n'; import { Animation } from '@/shared/ui'; -import { useI18n } from '../../providers'; import promo1 from './assets/promo-1.png'; import promo2 from './assets/promo-2.png'; diff --git a/src/renderer/app/index.html b/src/renderer/app/index.html index b1b8885b09..f08a581ce2 100644 --- a/src/renderer/app/index.html +++ b/src/renderer/app/index.html @@ -38,6 +38,6 @@ Nova Spektr -
+
diff --git a/src/renderer/app/index.tsx b/src/renderer/app/index.tsx index 8dd7e78fa6..b92fa55bf8 100644 --- a/src/renderer/app/index.tsx +++ b/src/renderer/app/index.tsx @@ -6,6 +6,7 @@ import { createRoot } from 'react-dom/client'; import { ErrorBoundary } from 'react-error-boundary'; import { HashRouter } from 'react-router-dom'; +import { I18Provider } from '@/shared/i18n'; import { isElectron } from '@/shared/lib/utils'; import { FallbackScreen } from '@/shared/ui'; import { APP_CONFIG } from '../../../app.config'; @@ -13,7 +14,6 @@ import { APP_CONFIG } from '../../../app.config'; import { LoadingDelay, controlledLazy, suspenseDelay } from './DelayedSuspense'; import { ElectronSplashScreen } from './components/ElectronSplashScreen/ElectronSplashScreen'; import { WebSplashScreen } from './components/WebSplashScreen/WebSplashScreen'; -import { I18Provider } from './providers/context/I18nContext'; const CLEAR_LOADING_TIMEOUT = 700; const DIRTY_LOADING_TIMEOUT = 2000; diff --git a/src/renderer/app/providers/context/GraphqlContext/GraphqlContext.tsx b/src/renderer/app/providers/context/GraphqlContext/GraphqlContext.tsx index 9c4e6fce3c..b90034896e 100644 --- a/src/renderer/app/providers/context/GraphqlContext/GraphqlContext.tsx +++ b/src/renderer/app/providers/context/GraphqlContext/GraphqlContext.tsx @@ -18,9 +18,9 @@ import { useState, } from 'react'; -import { chainsService } from '@shared/api/network'; -import { type ChainId, ExternalType } from '@shared/core'; -import { settingsStorage } from '@entities/settings'; +import { chainsService } from '@/shared/api/network'; +import { type ChainId, ExternalType } from '@/shared/core'; +import { settingsStorage } from '@/entities/settings'; type GraphqlContextProps = { changeClient: (chainId: ChainId) => void; diff --git a/src/renderer/app/providers/context/I18nContext/index.ts b/src/renderer/app/providers/context/I18nContext/index.ts deleted file mode 100644 index 78411e4bdb..0000000000 --- a/src/renderer/app/providers/context/I18nContext/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { I18Provider, useI18n } from './I18nContext'; diff --git a/src/renderer/app/providers/context/MultisigChainContext/MultisigChainContext.tsx b/src/renderer/app/providers/context/MultisigChainContext/MultisigChainContext.tsx index e4af107720..0c1bd16af4 100644 --- a/src/renderer/app/providers/context/MultisigChainContext/MultisigChainContext.tsx +++ b/src/renderer/app/providers/context/MultisigChainContext/MultisigChainContext.tsx @@ -3,15 +3,15 @@ import { type Event } from '@polkadot/types/interfaces'; import { useGate, useUnit } from 'effector-react'; import { type PropsWithChildren, createContext, useContext, useEffect } from 'react'; -import { type ChainId, type MultisigAccount, MultisigTxFinalStatus, type SigningStatus } from '@shared/core'; -import { useDebounce, useTaskQueue } from '@shared/lib/hooks'; -import { type Task } from '@shared/lib/hooks/useTaskQueue'; -import { getCreatedDateFromApi, toAddress } from '@shared/lib/utils'; +import { type ChainId, type MultisigAccount, MultisigTxFinalStatus, type SigningStatus } from '@/shared/core'; +import { useDebounce, useTaskQueue } from '@/shared/lib/hooks'; +import { type Task } from '@/shared/lib/hooks/useTaskQueue'; +import { getCreatedDateFromApi, toAddress } from '@/shared/lib/utils'; +import { subscriptionService } from '@/entities/chain'; +import { useMultisigEvent, useMultisigTx } from '@/entities/multisig'; +import { networkModel, networkUtils } from '@/entities/network'; import { operationsModel } from '@/entities/operations'; -import { subscriptionService } from '@entities/chain'; -import { useMultisigEvent, useMultisigTx } from '@entities/multisig'; -import { networkModel, networkUtils } from '@entities/network'; -import { accountUtils, walletModel } from '@entities/wallet'; +import { accountUtils, walletModel } from '@/entities/wallet'; type MultisigChainContextProps = { addTask: (task: Task) => void; diff --git a/src/renderer/app/providers/context/StatusContext/StatusContext.tsx b/src/renderer/app/providers/context/StatusContext/StatusContext.tsx index 115f77cf69..ec2bfa7c21 100644 --- a/src/renderer/app/providers/context/StatusContext/StatusContext.tsx +++ b/src/renderer/app/providers/context/StatusContext/StatusContext.tsx @@ -9,9 +9,9 @@ import { useState, } from 'react'; -import { useToggle } from '@shared/lib/hooks'; -import { DEFAULT_TRANSITION } from '@shared/lib/utils'; -import { StatusModal } from '@shared/ui'; +import { useToggle } from '@/shared/lib/hooks'; +import { DEFAULT_TRANSITION } from '@/shared/lib/utils'; +import { StatusModal } from '@/shared/ui'; export type StatusModalProps = { title: string; diff --git a/src/renderer/app/providers/context/index.ts b/src/renderer/app/providers/context/index.ts index 63b2a96017..99e3b16e32 100644 --- a/src/renderer/app/providers/context/index.ts +++ b/src/renderer/app/providers/context/index.ts @@ -1,5 +1,3 @@ -export { ConfirmDialogProvider, useConfirmContext } from './ConfirmContext'; export { GraphqlProvider, useGraphql } from './GraphqlContext'; -export { I18Provider, useI18n } from './I18nContext'; export { MultisigChainProvider, useMultisigChainContext } from './MultisigChainContext'; export { StatusModalProvider, useStatusContext } from './StatusContext'; diff --git a/src/renderer/entities/asset/ui/AssetBalance/AssetBalance.tsx b/src/renderer/entities/asset/ui/AssetBalance/AssetBalance.tsx index 7e192b877f..4d0d14d8cc 100644 --- a/src/renderer/entities/asset/ui/AssetBalance/AssetBalance.tsx +++ b/src/renderer/entities/asset/ui/AssetBalance/AssetBalance.tsx @@ -1,9 +1,9 @@ import { type BN } from '@polkadot/util'; -import { useI18n } from '@app/providers'; -import { type Asset, type AssetByChains } from '@shared/core'; -import { cnTw, formatBalance } from '@shared/lib/utils'; -import { AssetIcon } from '@entities/asset'; +import { type Asset, type AssetByChains } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, formatBalance } from '@/shared/lib/utils'; +import { AssetIcon } from '../AssetIcon/AssetIcon'; type Props = { value: BN | string; @@ -49,9 +49,9 @@ export const AssetBalance = ({ } return ( - +

{balance} - +

); }; diff --git a/src/renderer/entities/asset/ui/AssetDetails/AssetDetails.tsx b/src/renderer/entities/asset/ui/AssetDetails/AssetDetails.tsx index c8bf445f76..daa710141a 100644 --- a/src/renderer/entities/asset/ui/AssetDetails/AssetDetails.tsx +++ b/src/renderer/entities/asset/ui/AssetDetails/AssetDetails.tsx @@ -1,6 +1,7 @@ -import { type Asset } from '@shared/core'; -import { HelpText, Shimmering } from '@shared/ui'; -import { AssetFiatBalance } from '@entities/price'; +import { type Asset } from '@/shared/core'; +import { Shimmering } from '@/shared/ui/Shimmering/Shimmering'; +import { HelpText } from '@/shared/ui/Typography/index'; +import { AssetFiatBalance } from '@/entities/price'; import { AssetBalance } from '../AssetBalance/AssetBalance'; type Props = { diff --git a/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.test.tsx b/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.test.tsx index ae152ae1bb..8db9a7ee8b 100644 --- a/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.test.tsx +++ b/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.test.tsx @@ -1,6 +1,6 @@ import { act, render, screen } from '@testing-library/react'; -import { TEST_CHAIN_ICON } from '@shared/lib/utils'; +import { TEST_CHAIN_ICON } from '@/shared/lib/utils'; import { AssetIcon } from './AssetIcon'; diff --git a/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.tsx b/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.tsx index ce99766529..bcd8350c42 100644 --- a/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.tsx +++ b/src/renderer/entities/asset/ui/AssetIcon/AssetIcon.tsx @@ -1,5 +1,5 @@ -import { useToggle } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; type Props = { src?: string; diff --git a/src/renderer/entities/asset/ui/AssetLinks/AssetLinks.tsx b/src/renderer/entities/asset/ui/AssetLinks/AssetLinks.tsx index a9b18b77af..4b24e75b41 100644 --- a/src/renderer/entities/asset/ui/AssetLinks/AssetLinks.tsx +++ b/src/renderer/entities/asset/ui/AssetLinks/AssetLinks.tsx @@ -1,10 +1,10 @@ import { useUnit } from 'effector-react'; import { Link } from 'react-router-dom'; -import { type ChainId } from '@shared/core'; -import { Paths, createLink } from '@shared/routes'; -import { Icon } from '@shared/ui'; -import { CheckPermission, OperationType, walletModel } from '@entities/wallet'; +import { type ChainId } from '@/shared/core'; +import { Paths, createLink } from '@/shared/routes'; +import { Icon } from '@/shared/ui'; +import { CheckPermission, OperationType, walletModel } from '@/entities/wallet'; type Props = { assetId: number; diff --git a/src/renderer/entities/asset/ui/EmptyAssetsState/EmptyAssetsState.tsx b/src/renderer/entities/asset/ui/EmptyAssetsState/EmptyAssetsState.tsx index eed1e04401..f7885e7ad4 100644 --- a/src/renderer/entities/asset/ui/EmptyAssetsState/EmptyAssetsState.tsx +++ b/src/renderer/entities/asset/ui/EmptyAssetsState/EmptyAssetsState.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; export const EmptyAssetsState = () => { const { t } = useI18n(); diff --git a/src/renderer/entities/balance/hooks/useAssetBalances.ts b/src/renderer/entities/balance/hooks/useAssetBalances.ts index 7f68bcccb3..5c1b1ad5bc 100644 --- a/src/renderer/entities/balance/hooks/useAssetBalances.ts +++ b/src/renderer/entities/balance/hooks/useAssetBalances.ts @@ -1,6 +1,6 @@ import { useUnit } from 'effector-react'; -import { type AccountId, type Balance, type ChainId } from '@shared/core'; +import { type AccountId, type Balance, type ChainId } from '@/shared/core'; import { balanceUtils } from '../lib/balance-utils'; import { balanceModel } from '../model/balance-model'; diff --git a/src/renderer/entities/balance/hooks/useBalance.ts b/src/renderer/entities/balance/hooks/useBalance.ts index 3df374c936..2da756a5a8 100644 --- a/src/renderer/entities/balance/hooks/useBalance.ts +++ b/src/renderer/entities/balance/hooks/useBalance.ts @@ -1,4 +1,4 @@ -import { type AccountId, type Balance, type ChainId } from '@shared/core'; +import { type AccountId, type Balance, type ChainId } from '@/shared/core'; import { useAssetBalances } from './useAssetBalances'; diff --git a/src/renderer/entities/balance/lib/balance-utils.ts b/src/renderer/entities/balance/lib/balance-utils.ts index 48204e7d89..38396570fd 100644 --- a/src/renderer/entities/balance/lib/balance-utils.ts +++ b/src/renderer/entities/balance/lib/balance-utils.ts @@ -1,6 +1,6 @@ import keyBy from 'lodash/keyBy'; -import { type AccountId, type Balance, type ChainId, type OmitFirstArg } from '@shared/core'; +import { type AccountId, type Balance, type ChainId, type OmitFirstArg } from '@/shared/core'; export const balanceUtils = { getAssetBalances, diff --git a/src/renderer/entities/balance/model/balance-model.ts b/src/renderer/entities/balance/model/balance-model.ts index c8830a4d8f..08388943f1 100644 --- a/src/renderer/entities/balance/model/balance-model.ts +++ b/src/renderer/entities/balance/model/balance-model.ts @@ -1,8 +1,8 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; import { throttle } from 'patronum'; -import { storageService } from '@shared/api/storage'; -import { type Balance, type ID } from '@shared/core'; +import { storageService } from '@/shared/api/storage'; +import { type Balance, type ID } from '@/shared/core'; import { balanceUtils } from '../lib/balance-utils'; import { BUFFER_DELAY, SAVE_TIMEOUT } from '../lib/constants'; diff --git a/src/renderer/entities/basket/model/basket-model.ts b/src/renderer/entities/basket/model/basket-model.ts index 4b2278902a..b689fd3d66 100644 --- a/src/renderer/entities/basket/model/basket-model.ts +++ b/src/renderer/entities/basket/model/basket-model.ts @@ -1,7 +1,7 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type BasketTransaction } from '@shared/core'; +import { storageService } from '@/shared/api/storage'; +import { type BasketTransaction } from '@/shared/core'; const basketStarted = createEvent(); const transactionsCreated = createEvent(); diff --git a/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.test.tsx b/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.test.tsx index b5e2612fd0..61229d1845 100644 --- a/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.test.tsx +++ b/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.test.tsx @@ -1,6 +1,6 @@ import { act, render, screen } from '@testing-library/react'; -import { TEST_CHAIN_ICON } from '@shared/lib/utils'; +import { TEST_CHAIN_ICON } from '@/shared/lib/utils'; import { ChainIcon } from './ChainIcon'; diff --git a/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.tsx b/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.tsx index 1baf507317..d7b9db4aa7 100644 --- a/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.tsx +++ b/src/renderer/entities/chain/ui/ChainIcon/ChainIcon.tsx @@ -1,6 +1,6 @@ -import { useToggle } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; -import { Shimmering } from '@shared/ui'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; +import { Shimmering } from '@/shared/ui'; type Props = { src?: string; diff --git a/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.stories.tsx b/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.stories.tsx index f10f7669a1..f5d385b8fe 100644 --- a/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.stories.tsx +++ b/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryFn } from '@storybook/react'; -import { TEST_CHAIN_ID } from '@shared/lib/utils'; +import { TEST_CHAIN_ID } from '@/shared/lib/utils'; import { ChainTitle } from './ChainTitle'; diff --git a/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.test.tsx b/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.test.tsx index beacb663e0..2d33d4c5cd 100644 --- a/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.test.tsx +++ b/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.test.tsx @@ -1,6 +1,6 @@ import { act, render, screen } from '@testing-library/react'; -import { TEST_CHAIN_ID } from '@shared/lib/utils'; +import { TEST_CHAIN_ID } from '@/shared/lib/utils'; import { ChainTitle } from './ChainTitle'; diff --git a/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.tsx b/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.tsx index dbfcd932f6..45d3263b9e 100644 --- a/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.tsx +++ b/src/renderer/entities/chain/ui/ChainTitle/ChainTitle.tsx @@ -1,10 +1,10 @@ import { type ElementType, useEffect, useState } from 'react'; -import { chainsService } from '@shared/api/network'; -import { type ChainId, type Chain as ChainType } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { TextBase } from '@shared/ui/Typography/common/TextBase'; -import { ChainIcon } from '@entities/chain'; +import { chainsService } from '@/shared/api/network'; +import { type ChainId, type Chain as ChainType } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { TextBase } from '@/shared/ui/Typography/common/TextBase'; +import { ChainIcon } from '@/entities/chain'; type WithChain = { chain: ChainType }; type WithChainId = { chainId: ChainId }; diff --git a/src/renderer/entities/chain/ui/OperationTitle/OperationTitle.tsx b/src/renderer/entities/chain/ui/OperationTitle/OperationTitle.tsx index 34a4d1b93f..1cdc758eb6 100644 --- a/src/renderer/entities/chain/ui/OperationTitle/OperationTitle.tsx +++ b/src/renderer/entities/chain/ui/OperationTitle/OperationTitle.tsx @@ -1,6 +1,6 @@ -import { type ChainId } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { HeaderTitleText } from '@shared/ui'; +import { type ChainId } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { HeaderTitleText } from '@/shared/ui'; import { ChainTitle } from '../ChainTitle/ChainTitle'; type Props = { diff --git a/src/renderer/entities/chain/ui/XcmChains/XcmChains.tsx b/src/renderer/entities/chain/ui/XcmChains/XcmChains.tsx index 119e38b385..2b12199d71 100644 --- a/src/renderer/entities/chain/ui/XcmChains/XcmChains.tsx +++ b/src/renderer/entities/chain/ui/XcmChains/XcmChains.tsx @@ -1,6 +1,6 @@ -import { type ChainId } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Icon } from '@shared/ui'; +import { type ChainId } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { Icon } from '@/shared/ui'; import { ChainTitle } from '../ChainTitle/ChainTitle'; type Props = { diff --git a/src/renderer/entities/contact/model/contact-model.ts b/src/renderer/entities/contact/model/contact-model.ts index 96571a5461..6f396cc90b 100644 --- a/src/renderer/entities/contact/model/contact-model.ts +++ b/src/renderer/entities/contact/model/contact-model.ts @@ -1,8 +1,8 @@ import { createEffect, createStore, sample } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type Contact, kernelModel } from '@shared/core'; -import { splice } from '@shared/lib/utils'; +import { storageService } from '@/shared/api/storage'; +import { type Contact, kernelModel } from '@/shared/core'; +import { splice } from '@/shared/lib/utils'; const $contacts = createStore([]); diff --git a/src/renderer/entities/contact/ui/ContactList.tsx b/src/renderer/entities/contact/ui/ContactList.tsx index dd0d119797..1e59543f6d 100644 --- a/src/renderer/entities/contact/ui/ContactList.tsx +++ b/src/renderer/entities/contact/ui/ContactList.tsx @@ -1,7 +1,7 @@ import { type PropsWithChildren } from 'react'; -import { useI18n } from '@app/providers'; -import { FootnoteText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText } from '@/shared/ui'; export const ContactList = ({ children }: PropsWithChildren) => { const { t } = useI18n(); diff --git a/src/renderer/entities/contact/ui/ContactRow.tsx b/src/renderer/entities/contact/ui/ContactRow.tsx index 01e09589f9..7b6c7a86e5 100644 --- a/src/renderer/entities/contact/ui/ContactRow.tsx +++ b/src/renderer/entities/contact/ui/ContactRow.tsx @@ -1,8 +1,8 @@ import { type PropsWithChildren } from 'react'; -import { type Contact } from '@shared/core'; -import { Plate } from '@shared/ui'; -import { Address } from '@shared/ui-entities'; +import { type Contact } from '@/shared/core'; +import { Plate } from '@/shared/ui'; +import { Address } from '@/shared/ui-entities'; type Props = { contact: Contact; diff --git a/src/renderer/entities/contact/ui/EmptyContactList.tsx b/src/renderer/entities/contact/ui/EmptyContactList.tsx index 6a4697cd0d..93d8337e6a 100644 --- a/src/renderer/entities/contact/ui/EmptyContactList.tsx +++ b/src/renderer/entities/contact/ui/EmptyContactList.tsx @@ -1,8 +1,8 @@ import { useNavigate } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { Paths } from '@shared/routes'; -import { BodyText, Button, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Paths } from '@/shared/routes'; +import { BodyText, Button, Icon } from '@/shared/ui'; type Props = { description?: string; diff --git a/src/renderer/entities/contact/ui/EmptyFilteredContacts.tsx b/src/renderer/entities/contact/ui/EmptyFilteredContacts.tsx index ac07ea4941..c1ff211531 100644 --- a/src/renderer/entities/contact/ui/EmptyFilteredContacts.tsx +++ b/src/renderer/entities/contact/ui/EmptyFilteredContacts.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; export const EmptyFilteredContacts = () => { const { t } = useI18n(); diff --git a/src/renderer/entities/contact/ui/__tests__/EmptyContactList.test.tsx b/src/renderer/entities/contact/ui/__tests__/EmptyContactList.test.tsx index 376e10ed76..3927e80f43 100644 --- a/src/renderer/entities/contact/ui/__tests__/EmptyContactList.test.tsx +++ b/src/renderer/entities/contact/ui/__tests__/EmptyContactList.test.tsx @@ -3,7 +3,7 @@ import { MemoryRouter } from 'react-router-dom'; import { EmptyContactList } from '../EmptyContactList'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/entities/contact/ui/__tests__/EmptyFilteredContacts.test.tsx b/src/renderer/entities/contact/ui/__tests__/EmptyFilteredContacts.test.tsx index 3c9f6d26f1..1bacf1fafb 100644 --- a/src/renderer/entities/contact/ui/__tests__/EmptyFilteredContacts.test.tsx +++ b/src/renderer/entities/contact/ui/__tests__/EmptyFilteredContacts.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import { EmptyFilteredContacts } from '../EmptyFilteredContacts'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/entities/governance/index.ts b/src/renderer/entities/governance/index.ts index 61d8c8d742..fd90a4275c 100644 --- a/src/renderer/entities/governance/index.ts +++ b/src/renderer/entities/governance/index.ts @@ -43,6 +43,7 @@ export type { TransactionStandardVote, } from './types/voteTransaction'; export type { Track } from './types/tracks'; +export type { VoteHistoryRecord } from './model/voteHistory'; export { treasurySpendsDescription, diff --git a/src/renderer/entities/governance/lib/governanceService.ts b/src/renderer/entities/governance/lib/governanceService.ts index 466dab5827..63906261fe 100644 --- a/src/renderer/entities/governance/lib/governanceService.ts +++ b/src/renderer/entities/governance/lib/governanceService.ts @@ -9,12 +9,12 @@ import { type TrackInfo, type VotingCurve, } from '@/shared/core'; +import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; import { type ReferendaCurve, type ReferendaReferendumInfoConvictionVotingTally, referendaPallet, } from '@/shared/pallet/referenda'; -import { convictionVotingPallet } from '@shared/pallet/convictionVoting'; export const governanceService = { getReferendums, diff --git a/src/renderer/entities/governance/lib/governanceSubscribeService.ts b/src/renderer/entities/governance/lib/governanceSubscribeService.ts index b7cef88d8e..1b0d3db4e7 100644 --- a/src/renderer/entities/governance/lib/governanceSubscribeService.ts +++ b/src/renderer/entities/governance/lib/governanceSubscribeService.ts @@ -11,10 +11,10 @@ import { type Voting, type VotingMap, } from '@/shared/core'; +import { toAddress } from '@/shared/lib/utils'; +import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; +import { referendaPallet } from '@/shared/pallet/referenda'; import { polkadotjsHelpers } from '@/shared/polkadotjs-helpers'; -import { toAddress } from '@shared/lib/utils'; -import { convictionVotingPallet } from '@shared/pallet/convictionVoting'; -import { referendaPallet } from '@shared/pallet/referenda'; import { governanceService } from './governanceService'; diff --git a/src/renderer/entities/governance/lib/tracksService.ts b/src/renderer/entities/governance/lib/tracksService.ts index f72adff0a1..e05e98ff13 100644 --- a/src/renderer/entities/governance/lib/tracksService.ts +++ b/src/renderer/entities/governance/lib/tracksService.ts @@ -1,7 +1,7 @@ import { type TFunction } from 'i18next'; import { type Asset } from '@/shared/core'; -import { nonNullable } from '@shared/lib/utils'; +import { nonNullable } from '@/shared/lib/utils'; import { treasurySpendsDescription } from '@/entities/governance'; import { type Track } from '../types/tracks'; diff --git a/src/renderer/entities/governance/lib/voteTransactionService.ts b/src/renderer/entities/governance/lib/voteTransactionService.ts index 207aa52e1a..a4111f201c 100644 --- a/src/renderer/entities/governance/lib/voteTransactionService.ts +++ b/src/renderer/entities/governance/lib/voteTransactionService.ts @@ -1,7 +1,7 @@ import { BN, BN_ZERO } from '@polkadot/util'; -import { type Conviction, type Transaction, TransactionType } from '@shared/core'; -import { toSerializable } from '@shared/lib/utils'; +import { type Conviction, type Transaction, TransactionType } from '@/shared/core'; +import { toSerializable } from '@/shared/lib/utils'; import { type RemoveVoteTransaction, type RevoteTransaction, diff --git a/src/renderer/entities/governance/lib/votingService.ts b/src/renderer/entities/governance/lib/votingService.ts index 97e6478431..2a057f44c8 100644 --- a/src/renderer/entities/governance/lib/votingService.ts +++ b/src/renderer/entities/governance/lib/votingService.ts @@ -16,7 +16,7 @@ import { type Voting, type VotingMap, } from '@/shared/core'; -import { toKeysRecord } from '@shared/lib/utils'; +import { toKeysRecord } from '@/shared/lib/utils'; enum ConvictionMultiplier { None = 0.1, diff --git a/src/renderer/entities/governance/model/proposerIdentity.ts b/src/renderer/entities/governance/model/proposerIdentity.ts index e3bed82295..ec3ff02acd 100644 --- a/src/renderer/entities/governance/model/proposerIdentity.ts +++ b/src/renderer/entities/governance/model/proposerIdentity.ts @@ -2,8 +2,8 @@ import { type ApiPromise } from '@polkadot/api'; import { createEffect, createEvent, createStore, sample } from 'effector'; import { readonly } from 'patronum'; +import { type Address, type Chain, type ChainId, type Identity, type Referendum } from '@/shared/core'; import { AdditionalType } from '@/shared/core/types/chain'; -import { type Address, type Chain, type ChainId, type Identity, type Referendum } from '@shared/core'; import { networkModel } from '@/entities/network'; import { proposersService } from '../lib/proposersService'; import { referendumService } from '../lib/referendumService'; diff --git a/src/renderer/entities/governance/model/referendum.ts b/src/renderer/entities/governance/model/referendum.ts index 19716d8cee..9f3f177974 100644 --- a/src/renderer/entities/governance/model/referendum.ts +++ b/src/renderer/entities/governance/model/referendum.ts @@ -3,7 +3,7 @@ import { createEffect, createEvent, createStore, merge as mergeEvents, sample } import { readonly, spread } from 'patronum'; import { type Chain, type ChainId, type Referendum, type ReferendumId } from '@/shared/core'; -import { merge, nonNullable } from '@shared/lib/utils'; +import { merge, nonNullable } from '@/shared/lib/utils'; import { governanceService } from '../lib/governanceService'; import { governanceSubscribeService } from '../lib/governanceSubscribeService'; import { createSubscriber } from '../utils/createSubscriber'; diff --git a/src/renderer/entities/governance/types/voteTransaction.ts b/src/renderer/entities/governance/types/voteTransaction.ts index 556153cd59..b1e6f3a629 100644 --- a/src/renderer/entities/governance/types/voteTransaction.ts +++ b/src/renderer/entities/governance/types/voteTransaction.ts @@ -5,7 +5,7 @@ import { type StandardVote, type TrackId, type Transaction, -} from '@shared/core'; +} from '@/shared/core'; export type TransactionStandardVote = { Standard: Serializable }; export type TransactionSplitAbstainVote = { SplitAbstain: Serializable }; diff --git a/src/renderer/entities/governance/ui/BalanceDiff.tsx b/src/renderer/entities/governance/ui/BalanceDiff.tsx index 52913de5fb..2656859829 100644 --- a/src/renderer/entities/governance/ui/BalanceDiff.tsx +++ b/src/renderer/entities/governance/ui/BalanceDiff.tsx @@ -1,7 +1,7 @@ import { BN, BN_ZERO } from '@polkadot/util'; import { memo } from 'react'; -import { type Asset } from '@shared/core'; +import { type Asset } from '@/shared/core'; import { AssetBalance } from '@/entities/asset'; import { DiffValue } from './DiffValue'; diff --git a/src/renderer/entities/governance/ui/DiffValue.tsx b/src/renderer/entities/governance/ui/DiffValue.tsx index 966482c2cf..59dfbd47a7 100644 --- a/src/renderer/entities/governance/ui/DiffValue.tsx +++ b/src/renderer/entities/governance/ui/DiffValue.tsx @@ -1,7 +1,7 @@ import { type ReactNode } from 'react'; -import { cnTw } from '@shared/lib/utils'; -import { FootnoteText, Icon } from '@shared/ui'; +import { cnTw } from '@/shared/lib/utils'; +import { FootnoteText, Icon } from '@/shared/ui'; type Props = { className?: string; diff --git a/src/renderer/entities/governance/ui/LockPeriodDiff.tsx b/src/renderer/entities/governance/ui/LockPeriodDiff.tsx index 144392aa59..c4cb1e2dc2 100644 --- a/src/renderer/entities/governance/ui/LockPeriodDiff.tsx +++ b/src/renderer/entities/governance/ui/LockPeriodDiff.tsx @@ -1,8 +1,8 @@ import { formatDistanceStrict } from 'date-fns/formatDistanceStrict'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { type Conviction } from '@shared/core'; +import { type Conviction } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { DiffValue } from './DiffValue'; diff --git a/src/renderer/entities/governance/ui/ReferendumTimer/ReferendumTimer.tsx b/src/renderer/entities/governance/ui/ReferendumTimer/ReferendumTimer.tsx index dd61ab1d40..275cbfd500 100644 --- a/src/renderer/entities/governance/ui/ReferendumTimer/ReferendumTimer.tsx +++ b/src/renderer/entities/governance/ui/ReferendumTimer/ReferendumTimer.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; -import { useI18n } from '@/app/providers'; import { type ReferendumStatus } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { cnTw } from '@/shared/lib/utils'; import { Duration, FootnoteText, Icon } from '@/shared/ui'; import { type IconNames } from '@/shared/ui/types'; diff --git a/src/renderer/entities/governance/ui/TrackInfo.tsx b/src/renderer/entities/governance/ui/TrackInfo.tsx index a2cd59a725..8fe8209699 100644 --- a/src/renderer/entities/governance/ui/TrackInfo.tsx +++ b/src/renderer/entities/governance/ui/TrackInfo.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@/app/providers'; import { type TrackId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { FootnoteText, Icon } from '@/shared/ui'; import { type IconNames } from '@/shared/ui/Icon/data'; diff --git a/src/renderer/entities/governance/ui/TracksDetails.tsx b/src/renderer/entities/governance/ui/TracksDetails.tsx index d3dc52d1d9..a510a9d8e9 100644 --- a/src/renderer/entities/governance/ui/TracksDetails.tsx +++ b/src/renderer/entities/governance/ui/TracksDetails.tsx @@ -1,4 +1,4 @@ -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { nonNullable } from '@/shared/lib/utils'; import { CaptionText, Icon, Tooltip } from '@/shared/ui'; import { allTracks } from '../constants/tracks'; diff --git a/src/renderer/entities/governance/ui/VoteCharts/ReferendumVoteChart/ReferendumVoteChart.tsx b/src/renderer/entities/governance/ui/VoteCharts/ReferendumVoteChart/ReferendumVoteChart.tsx index 0f2758c41e..2fc7f06763 100644 --- a/src/renderer/entities/governance/ui/VoteCharts/ReferendumVoteChart/ReferendumVoteChart.tsx +++ b/src/renderer/entities/governance/ui/VoteCharts/ReferendumVoteChart/ReferendumVoteChart.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { Tooltip } from '@/shared/ui/Popovers'; import { FootnoteText, HelpText } from '@/shared/ui/Typography'; -import { VoteChart } from '@shared/ui-entities'; +import { VoteChart } from '@/shared/ui-entities'; type Props = { aye: number; diff --git a/src/renderer/entities/governance/ui/Voted/Voted.tsx b/src/renderer/entities/governance/ui/Voted/Voted.tsx index 457af01e24..fa403ce255 100644 --- a/src/renderer/entities/governance/ui/Voted/Voted.tsx +++ b/src/renderer/entities/governance/ui/Voted/Voted.tsx @@ -1,4 +1,4 @@ -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { FootnoteText, Icon } from '@/shared/ui'; type Props = { diff --git a/src/renderer/entities/governance/utils/createSubscriber.ts b/src/renderer/entities/governance/utils/createSubscriber.ts index c35db5e996..a3d33be03f 100644 --- a/src/renderer/entities/governance/utils/createSubscriber.ts +++ b/src/renderer/entities/governance/utils/createSubscriber.ts @@ -1,7 +1,7 @@ import { type Scope, createDomain, sample, scopeBind } from 'effector'; import { readonly } from 'patronum'; -import { nonNullable, nullable } from '@shared/lib/utils'; +import { nonNullable, nullable } from '@/shared/lib/utils'; type UnsubscribeFn = (() => void) | Promise<() => void>; type SubscribeFn = (params: P, callback: (value: V) => void) => UnsubscribeFn; diff --git a/src/renderer/entities/multisig/api/multisigsService.ts b/src/renderer/entities/multisig/api/multisigsService.ts index c5d9581504..dae2362f0a 100644 --- a/src/renderer/entities/multisig/api/multisigsService.ts +++ b/src/renderer/entities/multisig/api/multisigsService.ts @@ -1,6 +1,6 @@ import { type GraphQLClient } from 'graphql-request'; -import { type AccountId } from '@shared/core'; +import { type AccountId } from '@/shared/core'; import { FILTER_MULTISIG_ACCOUNT_IDS } from './graphql/queries/multisigs'; diff --git a/src/renderer/entities/multisig/lib/multisigEvent/common/types.ts b/src/renderer/entities/multisig/lib/multisigEvent/common/types.ts index ec13a84ba2..382cd84643 100644 --- a/src/renderer/entities/multisig/lib/multisigEvent/common/types.ts +++ b/src/renderer/entities/multisig/lib/multisigEvent/common/types.ts @@ -1,4 +1,4 @@ -import { type ID, type MultisigEventDS } from '@shared/api/storage'; +import { type ID, type MultisigEventDS } from '@/shared/api/storage'; import { type AccountId, type CallHash, @@ -6,7 +6,7 @@ import { type MultisigEvent, type MultisigTransactionKey, type SigningStatus, -} from '@shared/core'; +} from '@/shared/core'; export interface IMultisigEventService { getEvent: (eventId: ID) => Promise; diff --git a/src/renderer/entities/multisig/lib/multisigEvent/multisigEventService.ts b/src/renderer/entities/multisig/lib/multisigEvent/multisigEventService.ts index 1bb8db007b..4b84e08ad3 100644 --- a/src/renderer/entities/multisig/lib/multisigEvent/multisigEventService.ts +++ b/src/renderer/entities/multisig/lib/multisigEvent/multisigEventService.ts @@ -1,6 +1,6 @@ import { useLiveQuery } from 'dexie-react-hooks'; -import { type MultisigEventDS, storage } from '@shared/api/storage'; +import { type MultisigEventDS, storage } from '@/shared/api/storage'; import { type AccountId, type CallHash, @@ -8,8 +8,8 @@ import { type MultisigEvent, type MultisigTransactionKey, type SigningStatus, -} from '@shared/core'; -import { type Task } from '@shared/lib/hooks/useTaskQueue'; +} from '@/shared/core'; +import { type Task } from '@/shared/lib/hooks/useTaskQueue'; import { type IMultisigEventService } from './common/types'; diff --git a/src/renderer/entities/multisig/lib/multisigTx/common/types.ts b/src/renderer/entities/multisig/lib/multisigTx/common/types.ts index 59ee833ba4..3717c8d5d4 100644 --- a/src/renderer/entities/multisig/lib/multisigTx/common/types.ts +++ b/src/renderer/entities/multisig/lib/multisigTx/common/types.ts @@ -2,7 +2,7 @@ import { type ApiPromise } from '@polkadot/api'; import { type U8aFixed } from '@polkadot/types'; import { type PalletMultisigMultisig } from '@polkadot/types/lookup'; -import { type MultisigTransactionDS } from '@shared/api/storage'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; import { type AccountId, type CallData, @@ -10,7 +10,7 @@ import { type ChainId, type MultisigAccount, type MultisigTransaction, -} from '@shared/core'; +} from '@/shared/core'; export interface IMultisigTxService { subscribeMultisigAccount: (api: ApiPromise, account: MultisigAccount) => () => void; diff --git a/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts b/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts index 4cbcb32d35..7b76a361ec 100644 --- a/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts +++ b/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts @@ -10,10 +10,10 @@ import { type MultisigEvent, type MultisigTransaction, type Transaction, -} from '@shared/core'; -import { MultisigTxInitStatus, TransactionType } from '@shared/core'; -import { getCreatedDate, toAccountId } from '@shared/lib/utils'; -import { type ExtrinsicResultParams, findCoreBatchAll } from '@entities/transaction'; +} from '@/shared/core'; +import { MultisigTxInitStatus, TransactionType } from '@/shared/core'; +import { getCreatedDate, toAccountId } from '@/shared/lib/utils'; +import { type ExtrinsicResultParams, findCoreBatchAll } from '@/entities/transaction'; import { type PendingMultisigTransaction } from './types'; diff --git a/src/renderer/entities/multisig/lib/multisigTx/multisigTxService.ts b/src/renderer/entities/multisig/lib/multisigTx/multisigTxService.ts index 94b6340beb..2fbd5c13bb 100644 --- a/src/renderer/entities/multisig/lib/multisigTx/multisigTxService.ts +++ b/src/renderer/entities/multisig/lib/multisigTx/multisigTxService.ts @@ -1,8 +1,8 @@ import { type ApiPromise } from '@polkadot/api'; import { useLiveQuery } from 'dexie-react-hooks'; -import { chainsService } from '@shared/api/network'; -import { type MultisigTransactionDS, storage } from '@shared/api/storage'; +import { chainsService } from '@/shared/api/network'; +import { type MultisigTransactionDS, storage } from '@/shared/api/storage'; import { type AccountId, type CallData, @@ -10,9 +10,9 @@ import { type MultisigTransaction, MultisigTxFinalStatus, MultisigTxInitStatus, -} from '@shared/core'; -import { type Task } from '@shared/lib/hooks/useTaskQueue'; -import { getCurrentBlockNumber, getExpectedBlockTime, toAddress } from '@shared/lib/utils'; +} from '@/shared/core'; +import { type Task } from '@/shared/lib/hooks/useTaskQueue'; +import { getCurrentBlockNumber, getExpectedBlockTime, toAddress } from '@/shared/lib/utils'; import { useCallDataDecoder } from '@/entities/transaction'; import { useMultisigEvent } from '../multisigEvent/multisigEventService'; diff --git a/src/renderer/entities/multisig/lib/multisigTx/useForgetMultisig.ts b/src/renderer/entities/multisig/lib/multisigTx/useForgetMultisig.ts index d35f644375..73f1432bc6 100644 --- a/src/renderer/entities/multisig/lib/multisigTx/useForgetMultisig.ts +++ b/src/renderer/entities/multisig/lib/multisigTx/useForgetMultisig.ts @@ -1,4 +1,4 @@ -import { type IMultisigTransactionStorage, storage } from '@shared/api/storage'; +import { type IMultisigTransactionStorage, storage } from '@/shared/api/storage'; export const useForgetMultisig = (): Pick => { const transactionStorage = storage.connectTo('multisigTransactions'); diff --git a/src/renderer/entities/network/lib/hooks.ts b/src/renderer/entities/network/lib/hooks.ts index 7655fb6022..fa8d58a77a 100644 --- a/src/renderer/entities/network/lib/hooks.ts +++ b/src/renderer/entities/network/lib/hooks.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { useUnit } from 'effector-react'; -import { type Chain, type ChainId, type Connection, type ConnectionStatus } from '@shared/core'; +import { type Chain, type ChainId, type Connection, type ConnectionStatus } from '@/shared/core'; import { networkModel } from '../model/network-model'; import { type ExtendedChain } from './types'; diff --git a/src/renderer/entities/network/lib/network-utils.ts b/src/renderer/entities/network/lib/network-utils.ts index 0ca512add1..fedcb288de 100644 --- a/src/renderer/entities/network/lib/network-utils.ts +++ b/src/renderer/entities/network/lib/network-utils.ts @@ -6,8 +6,8 @@ import { type Connection, ConnectionStatus, ConnectionType, -} from '@shared/core'; -import { RelayChains } from '@shared/lib/utils'; +} from '@/shared/core'; +import { RelayChains } from '@/shared/lib/utils'; export const networkUtils = { isConnectedStatus, diff --git a/src/renderer/entities/network/lib/types.ts b/src/renderer/entities/network/lib/types.ts index dbff4378d4..581d5aa81b 100644 --- a/src/renderer/entities/network/lib/types.ts +++ b/src/renderer/entities/network/lib/types.ts @@ -1,6 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; -import { type Chain, type Connection, type ConnectionStatus } from '@shared/core'; +import { type Chain, type Connection, type ConnectionStatus } from '@/shared/core'; export type ExtendedChain = Chain & { connection: Connection; diff --git a/src/renderer/entities/network/model/__tests__/network-model.test.ts b/src/renderer/entities/network/model/__tests__/network-model.test.ts index 8995b90084..0078f9d3d8 100644 --- a/src/renderer/entities/network/model/__tests__/network-model.test.ts +++ b/src/renderer/entities/network/model/__tests__/network-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { ProviderType, type ProviderWithMetadata, chainsService, networkService } from '@shared/api/network'; -import { storageService } from '@shared/api/storage'; +import { ProviderType, type ProviderWithMetadata, chainsService, networkService } from '@/shared/api/network'; +import { storageService } from '@/shared/api/storage'; import { type Chain, type ChainId, @@ -9,7 +9,7 @@ import { type Connection, ConnectionStatus, ConnectionType, -} from '@shared/core'; +} from '@/shared/core'; import { networkModel } from '../network-model'; describe('entities/network/model/network-model', () => { diff --git a/src/renderer/entities/network/model/network-model.ts b/src/renderer/entities/network/model/network-model.ts index 1cbc036e73..db5114fe72 100644 --- a/src/renderer/entities/network/model/network-model.ts +++ b/src/renderer/entities/network/model/network-model.ts @@ -9,8 +9,8 @@ import { chainsService, metadataService, networkService, -} from '@shared/api/network'; -import { storageService } from '@shared/api/storage'; +} from '@/shared/api/network'; +import { storageService } from '@/shared/api/storage'; import { type Chain, type ChainId, @@ -21,8 +21,8 @@ import { type ID, type Metadata, type NoID, -} from '@shared/core'; -import { dictionary, nonNullable } from '@shared/lib/utils'; +} from '@/shared/core'; +import { dictionary, nonNullable } from '@/shared/lib/utils'; import { networkUtils } from '../lib/network-utils'; const networkStarted = createEvent(); diff --git a/src/renderer/entities/network/ui/InactiveNetwork.tsx b/src/renderer/entities/network/ui/InactiveNetwork.tsx index 2a1e2d3c49..2dd7ee780f 100644 --- a/src/renderer/entities/network/ui/InactiveNetwork.tsx +++ b/src/renderer/entities/network/ui/InactiveNetwork.tsx @@ -1,8 +1,8 @@ -import { useI18n } from '@app/providers'; +import NoConnection from '@/shared/assets/images/misc/no-connection.webp'; +import { useI18n } from '@/shared/i18n'; import { cnTw } from '@/shared/lib/utils'; -import NoConnection from '@shared/assets/images/misc/no-connection.webp'; -import { Paths } from '@shared/routes'; -import { ButtonLink, FootnoteText } from '@shared/ui'; +import { Paths } from '@/shared/routes'; +import { ButtonLink, FootnoteText } from '@/shared/ui'; type Props = { active: boolean; diff --git a/src/renderer/entities/notification/lib/notification-utils.ts b/src/renderer/entities/notification/lib/notification-utils.ts index f532bd8d3c..fa5317a358 100644 --- a/src/renderer/entities/notification/lib/notification-utils.ts +++ b/src/renderer/entities/notification/lib/notification-utils.ts @@ -1,5 +1,5 @@ -import { type MultisigCreated, type MultisigOperation, type Notification, type ProxyAction } from '@shared/core'; -import { NotificationType } from '@shared/core'; +import { type MultisigCreated, type MultisigOperation, type Notification, type ProxyAction } from '@/shared/core'; +import { NotificationType } from '@/shared/core'; export const notificationUtils = { isMultisigInvite, diff --git a/src/renderer/entities/notification/model/__tests__/notification-model.test.ts b/src/renderer/entities/notification/model/__tests__/notification-model.test.ts index 8173be8785..11e92266e0 100644 --- a/src/renderer/entities/notification/model/__tests__/notification-model.test.ts +++ b/src/renderer/entities/notification/model/__tests__/notification-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type Notification, NotificationType } from '@shared/core'; +import { storageService } from '@/shared/api/storage'; +import { type Notification, NotificationType } from '@/shared/core'; import { notificationModel } from '../notification-model'; const notifications = [ diff --git a/src/renderer/entities/notification/model/notification-model.ts b/src/renderer/entities/notification/model/notification-model.ts index 02646ff87a..fe7765bfa2 100644 --- a/src/renderer/entities/notification/model/notification-model.ts +++ b/src/renderer/entities/notification/model/notification-model.ts @@ -1,7 +1,7 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type NoID, type Notification } from '@shared/core'; +import { storageService } from '@/shared/api/storage'; +import { type NoID, type Notification } from '@/shared/core'; const notificationsStarted = createEvent(); const notificationsAdded = createEvent[]>(); diff --git a/src/renderer/entities/operations/lib/operationsUtils.ts b/src/renderer/entities/operations/lib/operationsUtils.ts index 59e320c6fc..a748fd3d52 100644 --- a/src/renderer/entities/operations/lib/operationsUtils.ts +++ b/src/renderer/entities/operations/lib/operationsUtils.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { type ChainId, type MultisigTransaction, MultisigTxInitStatus, type Transaction } from '@/shared/core'; -import { getExtrinsic } from '@/entities/transaction/lib/extrinsicService'; +import { getExtrinsic } from '@/entities/transaction'; export const operationsUtils = { isMultisigAlreadyExists, diff --git a/src/renderer/entities/operations/ui/SignButton.tsx b/src/renderer/entities/operations/ui/SignButton.tsx index 5b794de141..84a9426002 100644 --- a/src/renderer/entities/operations/ui/SignButton.tsx +++ b/src/renderer/entities/operations/ui/SignButton.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@app/providers'; -import { type SignableWalletFamily, WalletType } from '@shared/core'; -import { Button, Icon } from '@shared/ui'; -import { type IconNames } from '@shared/ui/Icon/data'; +import { type SignableWalletFamily, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button, Icon } from '@/shared/ui'; +import { type IconNames } from '@/shared/ui/Icon/data'; const WalletIcon: Record = { [WalletType.POLKADOT_VAULT]: 'vault', diff --git a/src/renderer/entities/operations/ui/SignatorySelector.tsx b/src/renderer/entities/operations/ui/SignatorySelector.tsx index d7f08ddcc1..36a8afcf39 100644 --- a/src/renderer/entities/operations/ui/SignatorySelector.tsx +++ b/src/renderer/entities/operations/ui/SignatorySelector.tsx @@ -1,11 +1,11 @@ import { type BN } from '@polkadot/util'; import { useMemo } from 'react'; -import { useI18n } from '@app/providers'; -import { type Account, type Asset } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { InputHint, Select } from '@shared/ui'; -import { type DropdownOption } from '@shared/ui/types'; +import { type Account, type Asset } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; +import { InputHint, Select } from '@/shared/ui'; +import { type DropdownOption } from '@/shared/ui/types'; import { AssetBalance } from '../../asset'; import { AccountAddress, accountUtils } from '../../wallet'; diff --git a/src/renderer/entities/price/index.ts b/src/renderer/entities/price/index.ts index f3c3f08215..4203c96ca6 100644 --- a/src/renderer/entities/price/index.ts +++ b/src/renderer/entities/price/index.ts @@ -3,3 +3,4 @@ export { currencyModel } from './model/currency-model'; export { useCurrencyRate } from './lib/useCurrencyRate'; export { TokenPrice } from './ui/TokenPrice'; export { AssetFiatBalance } from './ui/AssetFiatBalance'; +export { FiatBalance } from './ui/FiatBalance'; diff --git a/src/renderer/entities/price/lib/useCurrencyRate.ts b/src/renderer/entities/price/lib/useCurrencyRate.ts index debc7aa689..328dd95b41 100644 --- a/src/renderer/entities/price/lib/useCurrencyRate.ts +++ b/src/renderer/entities/price/lib/useCurrencyRate.ts @@ -1,6 +1,6 @@ import { useUnit } from 'effector-react'; -import { currencyModel, priceProviderModel } from '@entities/price'; +import { currencyModel, priceProviderModel } from '@/entities/price'; export const useCurrencyRate = (assetId?: string, showCurrency?: boolean): number | null => { const fiatFlag = useUnit(priceProviderModel.$fiatFlag); diff --git a/src/renderer/entities/price/model/__tests__/currency-model.test.ts b/src/renderer/entities/price/model/__tests__/currency-model.test.ts index 7151c9bb3b..a2051c71e9 100644 --- a/src/renderer/entities/price/model/__tests__/currency-model.test.ts +++ b/src/renderer/entities/price/model/__tests__/currency-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { type CurrencyItem, fiatService } from '@shared/api/price-provider'; -import { kernelModel } from '@shared/core'; +import { type CurrencyItem, fiatService } from '@/shared/api/price-provider'; +import { kernelModel } from '@/shared/core'; import { currencyModel } from '../currency-model'; describe('entities/price/model/currency-model', () => { diff --git a/src/renderer/entities/price/model/__tests__/price-provider-model.test.ts b/src/renderer/entities/price/model/__tests__/price-provider-model.test.ts index c65ac48d99..718714ca28 100644 --- a/src/renderer/entities/price/model/__tests__/price-provider-model.test.ts +++ b/src/renderer/entities/price/model/__tests__/price-provider-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { type CurrencyItem, type PriceObject, coingekoService, fiatService } from '@shared/api/price-provider'; -import { kernelModel } from '@shared/core'; +import { type CurrencyItem, type PriceObject, coingekoService, fiatService } from '@/shared/api/price-provider'; +import { kernelModel } from '@/shared/core'; import { PriceApiProvider } from '../../lib/types'; import { currencyModel } from '../currency-model'; import { priceProviderModel } from '../price-provider-model'; diff --git a/src/renderer/entities/price/model/currency-model.ts b/src/renderer/entities/price/model/currency-model.ts index f352fb3f7f..c647f70510 100644 --- a/src/renderer/entities/price/model/currency-model.ts +++ b/src/renderer/entities/price/model/currency-model.ts @@ -1,7 +1,7 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { type CurrencyItem, fiatService } from '@shared/api/price-provider'; -import { kernelModel } from '@shared/core'; +import { type CurrencyItem, fiatService } from '@/shared/api/price-provider'; +import { kernelModel } from '@/shared/core'; import { DEFAULT_CURRENCY_CODE } from '../lib/constants'; const $currencyConfig = createStore([]); diff --git a/src/renderer/entities/price/model/price-provider-model.ts b/src/renderer/entities/price/model/price-provider-model.ts index e981ab5932..78bf8b5617 100644 --- a/src/renderer/entities/price/model/price-provider-model.ts +++ b/src/renderer/entities/price/model/price-provider-model.ts @@ -1,9 +1,9 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { chainsService } from '@shared/api/network'; -import { type PriceAdapter, type PriceObject, coingekoService, fiatService } from '@shared/api/price-provider'; -import { kernelModel } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; +import { chainsService } from '@/shared/api/network'; +import { type PriceAdapter, type PriceObject, coingekoService, fiatService } from '@/shared/api/price-provider'; +import { kernelModel } from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; import { DEFAULT_ASSETS_PRICES, DEFAULT_FIAT_FLAG, DEFAULT_FIAT_PROVIDER } from '../lib/constants'; import { PriceApiProvider } from '../lib/types'; diff --git a/src/renderer/entities/price/ui/AssetFiatBalance.tsx b/src/renderer/entities/price/ui/AssetFiatBalance.tsx index 23ecc20fd1..a3639ad98c 100644 --- a/src/renderer/entities/price/ui/AssetFiatBalance.tsx +++ b/src/renderer/entities/price/ui/AssetFiatBalance.tsx @@ -1,10 +1,10 @@ import BN from 'bignumber.js'; import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type Asset, type AssetByChains } from '@shared/core'; -import { ZERO_BALANCE, formatFiatBalance } from '@shared/lib/utils'; -import { Shimmering } from '@shared/ui'; +import { type Asset, type AssetByChains } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { ZERO_BALANCE, formatFiatBalance } from '@/shared/lib/utils'; +import { Shimmering } from '@/shared/ui/Shimmering/Shimmering'; import { currencyModel } from '../model/currency-model'; import { priceProviderModel } from '../model/price-provider-model'; diff --git a/src/renderer/entities/price/ui/FiatBalance.tsx b/src/renderer/entities/price/ui/FiatBalance.tsx index 8af94e86ae..bf917cc0dc 100644 --- a/src/renderer/entities/price/ui/FiatBalance.tsx +++ b/src/renderer/entities/price/ui/FiatBalance.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { cnTw } from '@shared/lib/utils'; -import { FootnoteText, Shimmering } from '@shared/ui'; +import { cnTw } from '@/shared/lib/utils'; +import { Shimmering } from '@/shared/ui/Shimmering/Shimmering'; import { currencyModel } from '../model/currency-model'; import { Price } from './Price'; @@ -20,8 +20,8 @@ export const FiatBalance = ({ amount, className }: Props) => { } return ( - + - +
); }; diff --git a/src/renderer/entities/price/ui/Price.tsx b/src/renderer/entities/price/ui/Price.tsx index 2d13e90ca0..c33a915553 100644 --- a/src/renderer/entities/price/ui/Price.tsx +++ b/src/renderer/entities/price/ui/Price.tsx @@ -1,4 +1,4 @@ -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; type Props = { amount: string; diff --git a/src/renderer/entities/price/ui/TokenPrice.tsx b/src/renderer/entities/price/ui/TokenPrice.tsx index f3fb441b84..6cd8874d4c 100644 --- a/src/renderer/entities/price/ui/TokenPrice.tsx +++ b/src/renderer/entities/price/ui/TokenPrice.tsx @@ -1,8 +1,8 @@ import { useStoreMap, useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { ZERO_BALANCE, cnTw, formatFiatBalance } from '@shared/lib/utils'; -import { FootnoteText, Shimmering } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { ZERO_BALANCE, cnTw, formatFiatBalance } from '@/shared/lib/utils'; +import { FootnoteText, Shimmering } from '@/shared/ui'; import { currencyModel } from '../model/currency-model'; import { priceProviderModel } from '../model/price-provider-model'; diff --git a/src/renderer/entities/proxy/api/pureProxiesService.ts b/src/renderer/entities/proxy/api/pureProxiesService.ts index b7e5c5e698..2f5853c95a 100644 --- a/src/renderer/entities/proxy/api/pureProxiesService.ts +++ b/src/renderer/entities/proxy/api/pureProxiesService.ts @@ -1,6 +1,6 @@ import { type GraphQLClient } from 'graphql-request'; -import { type AccountId } from '@shared/core'; +import { type AccountId } from '@/shared/core'; import { FILTER_PURE_PROXIED_ACCOUNT_IDS } from './graphql/queries/pureProxies'; diff --git a/src/renderer/entities/proxy/lib/__tests__/mocks/proxy-mocks.ts b/src/renderer/entities/proxy/lib/__tests__/mocks/proxy-mocks.ts index 5d0ee5a761..a38bd98fd8 100644 --- a/src/renderer/entities/proxy/lib/__tests__/mocks/proxy-mocks.ts +++ b/src/renderer/entities/proxy/lib/__tests__/mocks/proxy-mocks.ts @@ -1,6 +1,6 @@ -import { type BaseAccount, type ProxyAccount, type ProxyDeposits, type Wallet, type WcAccount } from '@shared/core'; -import { AccountType, ChainType, CryptoType, ProxyType, SigningType, WalletType } from '@shared/core'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; +import { type BaseAccount, type ProxyAccount, type ProxyDeposits, type Wallet, type WcAccount } from '@/shared/core'; +import { AccountType, ChainType, CryptoType, ProxyType, SigningType, WalletType } from '@/shared/core'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; const oldProxy: ProxyAccount = { id: 1, diff --git a/src/renderer/entities/proxy/lib/__tests__/proxy-utils.test.ts b/src/renderer/entities/proxy/lib/__tests__/proxy-utils.test.ts index 4aa5887d72..e1eb90acda 100644 --- a/src/renderer/entities/proxy/lib/__tests__/proxy-utils.test.ts +++ b/src/renderer/entities/proxy/lib/__tests__/proxy-utils.test.ts @@ -1,5 +1,5 @@ -import { type ProxiedAccount, ProxyType, ProxyVariant } from '@shared/core'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; +import { type ProxiedAccount, ProxyType, ProxyVariant } from '@/shared/core'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; import { proxyUtils } from '../proxy-utils'; import { proxyMock } from './mocks/proxy-mocks'; diff --git a/src/renderer/entities/proxy/lib/constants.ts b/src/renderer/entities/proxy/lib/constants.ts index eefb845a6b..0a0e383954 100644 --- a/src/renderer/entities/proxy/lib/constants.ts +++ b/src/renderer/entities/proxy/lib/constants.ts @@ -1,4 +1,4 @@ -import { ProxyType } from '@shared/core'; +import { ProxyType } from '@/shared/core'; export const ProxyTypeName: Record = { [ProxyType.ANY]: 'proxy.names.any', diff --git a/src/renderer/entities/proxy/lib/proxy-utils.ts b/src/renderer/entities/proxy/lib/proxy-utils.ts index 29fa64e1ae..d534a2814c 100644 --- a/src/renderer/entities/proxy/lib/proxy-utils.ts +++ b/src/renderer/entities/proxy/lib/proxy-utils.ts @@ -7,9 +7,9 @@ import { type ProxyDeposits, type ProxyGroup, type Wallet, -} from '@shared/core'; -import { ProxyType, ProxyVariant } from '@shared/core'; -import { splitCamelCaseString, toAddress } from '@shared/lib/utils'; +} from '@/shared/core'; +import { ProxyType, ProxyVariant } from '@/shared/core'; +import { splitCamelCaseString, toAddress } from '@/shared/lib/utils'; import { accountUtils } from '../../wallet'; import { ProxyTypeName } from './constants'; diff --git a/src/renderer/entities/proxy/model/__tests__/proxy-model.test.ts b/src/renderer/entities/proxy/model/__tests__/proxy-model.test.ts index 8eb343971b..26f1cbacdf 100644 --- a/src/renderer/entities/proxy/model/__tests__/proxy-model.test.ts +++ b/src/renderer/entities/proxy/model/__tests__/proxy-model.test.ts @@ -1,8 +1,8 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type AccountId, type HexString, type ProxyAccount, type ProxyGroup } from '@shared/core'; -import { ProxyType } from '@shared/core'; +import { storageService } from '@/shared/api/storage'; +import { type AccountId, type HexString, type ProxyAccount, type ProxyGroup } from '@/shared/core'; +import { ProxyType } from '@/shared/core'; import { proxyModel } from '../proxy-model'; const proxyMock = { diff --git a/src/renderer/entities/proxy/model/proxy-model.ts b/src/renderer/entities/proxy/model/proxy-model.ts index e76182aaee..74a73218bd 100644 --- a/src/renderer/entities/proxy/model/proxy-model.ts +++ b/src/renderer/entities/proxy/model/proxy-model.ts @@ -1,8 +1,8 @@ import { combine, createEffect, createEvent, createStore, sample } from 'effector'; import groupBy from 'lodash/groupBy'; -import { storageService } from '@shared/api/storage'; -import { type AccountId, type ID, type NoID, type ProxyAccount, type ProxyGroup } from '@shared/core'; +import { storageService } from '@/shared/api/storage'; +import { type AccountId, type ID, type NoID, type ProxyAccount, type ProxyGroup } from '@/shared/core'; import { proxyUtils } from '../lib/proxy-utils'; type ProxyStore = Record; diff --git a/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.stories.tsx b/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.stories.tsx index e8fd0278c1..1cf01036fc 100644 --- a/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.stories.tsx +++ b/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.stories.tsx @@ -1,7 +1,7 @@ import { type Meta, type StoryFn } from '@storybook/react'; -import { ProxyType } from '@shared/core'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; +import { ProxyType } from '@/shared/core'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; import { ProxyAccount } from './ProxyAccount'; diff --git a/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.test.tsx b/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.test.tsx index eb863911a5..189e5d0832 100644 --- a/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.test.tsx +++ b/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.test.tsx @@ -1,11 +1,11 @@ import { render, screen } from '@testing-library/react'; -import { ProxyType } from '@shared/core'; -import { TEST_ACCOUNTS, TEST_ADDRESS } from '@shared/lib/utils'; +import { ProxyType } from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_ADDRESS } from '@/shared/lib/utils'; import { ProxyAccount } from './ProxyAccount'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.tsx b/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.tsx index 84c8c2922f..d0741199cf 100644 --- a/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.tsx +++ b/src/renderer/entities/proxy/ui/ProxyAccount/ProxyAccount.tsx @@ -1,9 +1,9 @@ import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type AccountId, type ProxyType } from '@shared/core'; -import { cnTw, toAddress, toShortAddress } from '@shared/lib/utils'; -import { BodyText, HelpText, Identicon, Truncate } from '@shared/ui'; +import { type AccountId, type ProxyType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, toAddress, toShortAddress } from '@/shared/lib/utils'; +import { BodyText, HelpText, Identicon, Truncate } from '@/shared/ui'; import { proxyUtils } from '../../lib/proxy-utils'; type Props = { diff --git a/src/renderer/entities/proxy/ui/ProxyPopover.tsx b/src/renderer/entities/proxy/ui/ProxyPopover.tsx index 5761a947ed..338d3af8ae 100644 --- a/src/renderer/entities/proxy/ui/ProxyPopover.tsx +++ b/src/renderer/entities/proxy/ui/ProxyPopover.tsx @@ -1,8 +1,8 @@ import { type PropsWithChildren } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon, LabelHelpBox, Popover, SmallTitleText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon, LabelHelpBox, Popover, SmallTitleText } from '@/shared/ui'; // const WIKI_LINK = ''; diff --git a/src/renderer/entities/proxy/ui/PureProxyPopover.tsx b/src/renderer/entities/proxy/ui/PureProxyPopover.tsx index a4f233364d..dc7e5bd451 100644 --- a/src/renderer/entities/proxy/ui/PureProxyPopover.tsx +++ b/src/renderer/entities/proxy/ui/PureProxyPopover.tsx @@ -1,8 +1,8 @@ import { type PropsWithChildren } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon, LabelHelpBox, Popover, SmallTitleText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon, LabelHelpBox, Popover, SmallTitleText } from '@/shared/ui'; // const WIKI_LINK = ''; diff --git a/src/renderer/entities/settings/settingsStorage.ts b/src/renderer/entities/settings/settingsStorage.ts index 901535b1c6..49f583ba28 100644 --- a/src/renderer/entities/settings/settingsStorage.ts +++ b/src/renderer/entities/settings/settingsStorage.ts @@ -1,4 +1,4 @@ -import { type ChainId } from '@shared/core'; +import { type ChainId } from '@/shared/core'; import { UserSettings } from './lib/types'; diff --git a/src/renderer/entities/signatory/lib/__tests__/utils.test.ts b/src/renderer/entities/signatory/lib/__tests__/utils.test.ts index 34855b83d0..606db46f52 100644 --- a/src/renderer/entities/signatory/lib/__tests__/utils.test.ts +++ b/src/renderer/entities/signatory/lib/__tests__/utils.test.ts @@ -1,4 +1,4 @@ -import { type Wallet, WalletType } from '@shared/core'; +import { type Wallet, WalletType } from '@/shared/core'; import { signatoryUtils } from '../utils'; describe('entities/signatory/lib/onChainUtils', () => { diff --git a/src/renderer/entities/signatory/lib/utils.ts b/src/renderer/entities/signatory/lib/utils.ts index 2eff6cb3ce..4226f7711a 100644 --- a/src/renderer/entities/signatory/lib/utils.ts +++ b/src/renderer/entities/signatory/lib/utils.ts @@ -1,5 +1,5 @@ -import { type AccountId, type Wallet } from '@shared/core'; -import { walletUtils } from '@entities/wallet'; +import { type AccountId, type Wallet } from '@/shared/core'; +import { walletUtils } from '@/entities/wallet'; export const signatoryUtils = { getSignatoryWallet, diff --git a/src/renderer/entities/signatory/ui/SelectableSignatory/SelectableSignatory.tsx b/src/renderer/entities/signatory/ui/SelectableSignatory/SelectableSignatory.tsx index ff4146c40f..d2430426a5 100644 --- a/src/renderer/entities/signatory/ui/SelectableSignatory/SelectableSignatory.tsx +++ b/src/renderer/entities/signatory/ui/SelectableSignatory/SelectableSignatory.tsx @@ -1,11 +1,11 @@ import { useUnit } from 'effector-react'; -import { type AccountId, type Asset, type ChainId } from '@shared/core'; -import { cnTw, toAccountId, toAddress, transferableAmount } from '@shared/lib/utils'; -import { BodyText, Icon } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { useBalance } from '@entities/balance'; -import { WalletIcon, walletModel } from '@entities/wallet'; +import { type AccountId, type Asset, type ChainId } from '@/shared/core'; +import { cnTw, toAccountId, toAddress, transferableAmount } from '@/shared/lib/utils'; +import { BodyText, Icon } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { useBalance } from '@/entities/balance'; +import { WalletIcon, walletModel } from '@/entities/wallet'; // TODO: Fix layers type Props = { diff --git a/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.stories.tsx b/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.stories.tsx index e94b4e6aea..bec782edb3 100644 --- a/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.stories.tsx +++ b/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryFn } from '@storybook/react'; -import { TEST_ADDRESS } from '@shared/lib/utils'; +import { TEST_ADDRESS } from '@/shared/lib/utils'; import { SignatoryCard } from './SignatoryCard'; diff --git a/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.tsx b/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.tsx index 12d84b3014..685219fe27 100644 --- a/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.tsx +++ b/src/renderer/entities/signatory/ui/SignatoryCard/SignatoryCard.tsx @@ -1,9 +1,9 @@ import { type PropsWithChildren } from 'react'; -import { type AccountId, type Explorer, type SigningStatus } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Icon } from '@shared/ui'; -import { ExplorersPopover } from '@entities/wallet'; +import { type AccountId, type Explorer, type SigningStatus } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { Icon } from '@/shared/ui'; +import { ExplorersPopover } from '@/entities/wallet'; const IconProps = { SIGNED: { className: 'group-hover:hidden text-text-positive', name: 'checkmarkOutline' }, diff --git a/src/renderer/entities/staking/api/apyCalculator.ts b/src/renderer/entities/staking/api/apyCalculator.ts index b08bfb6d2c..313c0fd1b8 100644 --- a/src/renderer/entities/staking/api/apyCalculator.ts +++ b/src/renderer/entities/staking/api/apyCalculator.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { default as BigNumber } from 'bignumber.js'; -import { type Address } from '@shared/core'; +import { type Address } from '@/shared/core'; import { DECAY_RATE, INTEREST_IDEAL, MINIMUM_INFLATION, STAKED_PORTION_IDEAL } from '../lib/constants'; import { type ApyValidator } from '../lib/types'; diff --git a/src/renderer/entities/staking/api/eraService.ts b/src/renderer/entities/staking/api/eraService.ts index 227fa87c57..53ce12d15a 100644 --- a/src/renderer/entities/staking/api/eraService.ts +++ b/src/renderer/entities/staking/api/eraService.ts @@ -1,6 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; -import { type EraIndex } from '@shared/core'; +import { type EraIndex } from '@/shared/core'; export const eraService = { subscribeActiveEra, diff --git a/src/renderer/entities/staking/api/stakingDataService.ts b/src/renderer/entities/staking/api/stakingDataService.ts index 311cca1071..36b2153f9c 100644 --- a/src/renderer/entities/staking/api/stakingDataService.ts +++ b/src/renderer/entities/staking/api/stakingDataService.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; -import { type Address, type ChainId, type EraIndex, type Unlocking } from '@shared/core'; -import { ZERO_BALANCE, redeemableAmount } from '@shared/lib/utils'; +import { type Address, type ChainId, type EraIndex, type Unlocking } from '@/shared/core'; +import { ZERO_BALANCE, redeemableAmount } from '@/shared/lib/utils'; import { type IStakingDataService, type StakingMap } from '../lib/types'; export const useStakingData = (): IStakingDataService => { diff --git a/src/renderer/entities/staking/api/stakingRewardsService.ts b/src/renderer/entities/staking/api/stakingRewardsService.ts index 71aad07329..dd0d5b7083 100644 --- a/src/renderer/entities/staking/api/stakingRewardsService.ts +++ b/src/renderer/entities/staking/api/stakingRewardsService.ts @@ -1,6 +1,6 @@ import { useQuery } from '@apollo/client'; -import { type Address } from '@shared/core'; +import { type Address } from '@/shared/core'; import { GET_TOTAL_REWARDS } from '../graphql/queries/stakingRewards'; import { type RewardsQuery } from '../graphql/types/stakingRewards'; import { type IStakingRewardsService, type RewardsMap } from '../lib/types'; diff --git a/src/renderer/entities/staking/api/validatorsService.ts b/src/renderer/entities/staking/api/validatorsService.ts index 61c0094207..509fdf507d 100644 --- a/src/renderer/entities/staking/api/validatorsService.ts +++ b/src/renderer/entities/staking/api/validatorsService.ts @@ -5,7 +5,7 @@ import { type PalletIdentityRegistration } from '@polkadot/types/lookup'; import { u8aToString } from '@polkadot/util'; import merge from 'lodash/merge'; -import { type Address, type EraIndex, type Identity, type SubIdentity, type Validator } from '@shared/core'; +import { type Address, type EraIndex, type Identity, type SubIdentity, type Validator } from '@/shared/core'; import { DEFAULT_MAX_NOMINATORS, KUSAMA_MAX_NOMINATORS } from '../lib/constants'; import { stakingUtils } from '../lib/staking-utils'; import { type ValidatorMap } from '../lib/types'; diff --git a/src/renderer/entities/staking/lib/staking-utils.ts b/src/renderer/entities/staking/lib/staking-utils.ts index 065565e20a..6902698d49 100644 --- a/src/renderer/entities/staking/lib/staking-utils.ts +++ b/src/renderer/entities/staking/lib/staking-utils.ts @@ -1,4 +1,4 @@ -import { type ChainId } from '@shared/core'; +import { type ChainId } from '@/shared/core'; export const stakingUtils = { isKusamaChainId, diff --git a/src/renderer/entities/staking/lib/types.ts b/src/renderer/entities/staking/lib/types.ts index 01314712d2..7636a23ad8 100644 --- a/src/renderer/entities/staking/lib/types.ts +++ b/src/renderer/entities/staking/lib/types.ts @@ -1,6 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; -import { type Address, type ChainId, type EraIndex, type Stake, type Unlocking, type Validator } from '@shared/core'; +import { type Address, type ChainId, type EraIndex, type Stake, type Unlocking, type Validator } from '@/shared/core'; // ===================================================== // ========== IStakingDataService interface ============ diff --git a/src/renderer/entities/staking/ui/AccountsModal/AccountsModal.tsx b/src/renderer/entities/staking/ui/AccountsModal/AccountsModal.tsx index 8b25a578d0..e61fb229e2 100644 --- a/src/renderer/entities/staking/ui/AccountsModal/AccountsModal.tsx +++ b/src/renderer/entities/staking/ui/AccountsModal/AccountsModal.tsx @@ -1,8 +1,8 @@ -import { useI18n } from '@app/providers'; +import { type Account, type AccountId, type Asset, type ChainId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, stakeableAmount, toAddress } from '@/shared/lib/utils'; +import { BaseModal, BodyText, HelpText, Identicon } from '@/shared/ui'; import { Hash } from '@/shared/ui-entities'; -import { type Account, type AccountId, type Asset, type ChainId } from '@shared/core'; -import { cnTw, stakeableAmount, toAddress } from '@shared/lib/utils'; -import { BaseModal, BodyText, HelpText, Identicon } from '@shared/ui'; import { AssetBalance } from '../../../asset'; import { useAssetBalances } from '../../../balance'; diff --git a/src/renderer/entities/staking/ui/SelectedValidatorsModal/SelectedValidatorsModal.tsx b/src/renderer/entities/staking/ui/SelectedValidatorsModal/SelectedValidatorsModal.tsx index f2ad698435..cb6702e7b5 100644 --- a/src/renderer/entities/staking/ui/SelectedValidatorsModal/SelectedValidatorsModal.tsx +++ b/src/renderer/entities/staking/ui/SelectedValidatorsModal/SelectedValidatorsModal.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@app/providers'; -import { type Validator } from '@shared/core/types/validator'; -import { BaseModal } from '@shared/ui'; -import { ValidatorsTable } from '@entities/staking/ui'; +import { type Validator } from '@/shared/core/types/validator'; +import { useI18n } from '@/shared/i18n'; +import { BaseModal } from '@/shared/ui'; +import { ValidatorsTable } from '@/entities/staking/ui'; type Props = { isOpen: boolean; diff --git a/src/renderer/entities/staking/ui/StakingPopover/StakingPopover.tsx b/src/renderer/entities/staking/ui/StakingPopover/StakingPopover.tsx index 01effcdd96..b7c2403c26 100644 --- a/src/renderer/entities/staking/ui/StakingPopover/StakingPopover.tsx +++ b/src/renderer/entities/staking/ui/StakingPopover/StakingPopover.tsx @@ -1,6 +1,6 @@ import { type PropsWithChildren, type ReactNode } from 'react'; -import { FootnoteText, LabelHelpBox, Popover } from '@shared/ui'; +import { FootnoteText, LabelHelpBox, Popover } from '@/shared/ui'; type Props = { labelText?: string; diff --git a/src/renderer/entities/staking/ui/UnstakingDuration/UnstakingDuration.tsx b/src/renderer/entities/staking/ui/UnstakingDuration/UnstakingDuration.tsx index 55a1431705..335c6e671d 100644 --- a/src/renderer/entities/staking/ui/UnstakingDuration/UnstakingDuration.tsx +++ b/src/renderer/entities/staking/ui/UnstakingDuration/UnstakingDuration.tsx @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { useEffect, useState } from 'react'; -import { Duration } from '@shared/ui'; +import { Duration } from '@/shared/ui'; import { useStakingData } from '../../api'; type Props = { diff --git a/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.test.tsx b/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.test.tsx index be0792c9d8..ef2c6aa33d 100644 --- a/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.test.tsx +++ b/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.test.tsx @@ -1,11 +1,11 @@ import { render, screen } from '@testing-library/react'; -import { type Asset } from '@shared/core'; -import { type Validator } from '@shared/core/types/validator'; +import { type Asset } from '@/shared/core'; +import { type Validator } from '@/shared/core/types/validator'; import { ValidatorsModal } from './ValidatorsModal'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.tsx b/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.tsx index c505131959..c5ce4e1a5d 100644 --- a/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.tsx +++ b/src/renderer/entities/staking/ui/ValidatorsModal/ValidatorsModal.tsx @@ -1,8 +1,8 @@ -import { useI18n } from '@app/providers'; -import { type Asset, type Explorer } from '@shared/core'; -import { type Validator } from '@shared/core/types/validator'; -import { cnTw } from '@shared/lib/utils'; -import { Accordion, BaseModal, SmallTitleText } from '@shared/ui'; +import { type Asset, type Explorer } from '@/shared/core'; +import { type Validator } from '@/shared/core/types/validator'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Accordion, BaseModal, SmallTitleText } from '@/shared/ui'; import { ValidatorsTable } from '../ValidatorsTable/ValidatorsTable'; type Props = { diff --git a/src/renderer/entities/staking/ui/ValidatorsTable/ValidatorsTable.tsx b/src/renderer/entities/staking/ui/ValidatorsTable/ValidatorsTable.tsx index 756bf6f231..352ed31749 100644 --- a/src/renderer/entities/staking/ui/ValidatorsTable/ValidatorsTable.tsx +++ b/src/renderer/entities/staking/ui/ValidatorsTable/ValidatorsTable.tsx @@ -1,11 +1,11 @@ -import { useI18n } from '@app/providers'; +import { type Asset, type Explorer, type Validator } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, getComposedIdentity } from '@/shared/lib/utils'; +import { BodyText, FootnoteText, HelpText, IconButton, Identicon } from '@/shared/ui'; import { Hash } from '@/shared/ui-entities'; -import { type Asset, type Explorer, type Validator } from '@shared/core'; -import { cnTw, getComposedIdentity } from '@shared/lib/utils'; -import { BodyText, FootnoteText, HelpText, IconButton, Identicon } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { ExplorersPopover } from '@entities/wallet'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance } from '@/entities/price'; +import { ExplorersPopover } from '@/entities/wallet'; const TABLE_GRID_CELLS = 'grid-cols-[1fr,128px,128px,40px]'; diff --git a/src/renderer/entities/transaction/lib/__tests__/callDataDecoder.test.ts b/src/renderer/entities/transaction/lib/__tests__/callDataDecoder.test.ts index d61445328b..65794b11b8 100644 --- a/src/renderer/entities/transaction/lib/__tests__/callDataDecoder.test.ts +++ b/src/renderer/entities/transaction/lib/__tests__/callDataDecoder.test.ts @@ -2,7 +2,7 @@ import { ApiPromise } from '@polkadot/api'; import { MockProvider } from '@polkadot/rpc-provider/mock'; import { TypeRegistry } from '@polkadot/types'; -import { TEST_ADDRESS } from '@shared/lib/utils'; +import { TEST_ADDRESS } from '@/shared/lib/utils'; import { useCallDataDecoder } from '../callDataDecoder'; import { metadata } from './metadata'; diff --git a/src/renderer/entities/transaction/lib/__tests__/transactionConfirmIcon.test.ts b/src/renderer/entities/transaction/lib/__tests__/transactionConfirmIcon.test.ts index 770a367fc8..dd8ac1044d 100644 --- a/src/renderer/entities/transaction/lib/__tests__/transactionConfirmIcon.test.ts +++ b/src/renderer/entities/transaction/lib/__tests__/transactionConfirmIcon.test.ts @@ -1,4 +1,4 @@ -import { type Transaction, TransactionType } from '@shared/core'; +import { type Transaction, TransactionType } from '@/shared/core'; import { getIconName } from '../transactionConfirmIcon'; describe('entities/transaction/lib/transactionConfirmIcon', () => { diff --git a/src/renderer/entities/transaction/lib/__tests__/transactionIcon.test.ts b/src/renderer/entities/transaction/lib/__tests__/transactionIcon.test.ts index 95e15ae11f..be02f68b63 100644 --- a/src/renderer/entities/transaction/lib/__tests__/transactionIcon.test.ts +++ b/src/renderer/entities/transaction/lib/__tests__/transactionIcon.test.ts @@ -1,5 +1,5 @@ -import { TransactionType } from '@shared/core'; -import { TEST_ADDRESS } from '@shared/lib/utils'; +import { TransactionType } from '@/shared/core'; +import { TEST_ADDRESS } from '@/shared/lib/utils'; import { getIconName } from '../transactionIcon'; describe('entities/transaction/lib/transactionIcon', () => { diff --git a/src/renderer/entities/transaction/lib/__tests__/utils.test.ts b/src/renderer/entities/transaction/lib/__tests__/utils.test.ts index bd70eeb908..7c5f180343 100644 --- a/src/renderer/entities/transaction/lib/__tests__/utils.test.ts +++ b/src/renderer/entities/transaction/lib/__tests__/utils.test.ts @@ -1,4 +1,4 @@ -import { type Transaction, TransactionType } from '@shared/core'; +import { type Transaction, TransactionType } from '@/shared/core'; import { isAddProxyTransaction, isManageProxyTransaction, diff --git a/src/renderer/entities/transaction/lib/callDataDecoder.ts b/src/renderer/entities/transaction/lib/callDataDecoder.ts index 032c11eeba..e9686136f5 100644 --- a/src/renderer/entities/transaction/lib/callDataDecoder.ts +++ b/src/renderer/entities/transaction/lib/callDataDecoder.ts @@ -4,8 +4,8 @@ import { type Type } from '@polkadot/types'; import { type Call } from '@polkadot/types/interfaces'; import { type HexString } from '@polkadot/util/types'; -import { xcmService } from '@shared/api/xcm'; -import { type Address, type CallData, type ChainId, type DecodedTransaction, TransactionType } from '@shared/core'; +import { xcmService } from '@/shared/api/xcm'; +import { type Address, type CallData, type ChainId, type DecodedTransaction, TransactionType } from '@/shared/core'; import { BOND_WITH_CONTROLLER_ARGS_AMOUNT, diff --git a/src/renderer/entities/transaction/lib/common/constants.ts b/src/renderer/entities/transaction/lib/common/constants.ts index 5e64decf9b..dfee25329c 100644 --- a/src/renderer/entities/transaction/lib/common/constants.ts +++ b/src/renderer/entities/transaction/lib/common/constants.ts @@ -1,4 +1,4 @@ -import { AssetType, TransactionType } from '@shared/core'; +import { AssetType, TransactionType } from '@/shared/core'; export const MAX_WEIGHT = { refTime: '0', diff --git a/src/renderer/entities/transaction/lib/common/errors.ts b/src/renderer/entities/transaction/lib/common/errors.ts index f4dc720174..6fff781e5c 100644 --- a/src/renderer/entities/transaction/lib/common/errors.ts +++ b/src/renderer/entities/transaction/lib/common/errors.ts @@ -1,4 +1,4 @@ -import { type ObjectValues } from '@shared/core'; +import { type ObjectValues } from '@/shared/core'; export const OperationError = { INVALID_FEE: 'staking.notEnoughBalanceForFeeError', diff --git a/src/renderer/entities/transaction/lib/common/types.ts b/src/renderer/entities/transaction/lib/common/types.ts index 197e3ae8b9..a7c24df0a8 100644 --- a/src/renderer/entities/transaction/lib/common/types.ts +++ b/src/renderer/entities/transaction/lib/common/types.ts @@ -12,7 +12,7 @@ import { type HexString, type Timepoint, type Transaction, -} from '@shared/core'; +} from '@/shared/core'; // ===================================================== // =========== ITransactionService interface =========== diff --git a/src/renderer/entities/transaction/lib/common/utils.ts b/src/renderer/entities/transaction/lib/common/utils.ts index 18518f2c07..866fbb8d9e 100644 --- a/src/renderer/entities/transaction/lib/common/utils.ts +++ b/src/renderer/entities/transaction/lib/common/utils.ts @@ -2,8 +2,8 @@ import { type ApiPromise } from '@polkadot/api'; import { type SpRuntimeDispatchError } from '@polkadot/types/lookup'; import { type TFunction } from 'i18next'; -import { type DecodedTransaction, type MultisigTransaction, type Transaction, TransactionType } from '@shared/core'; -import { formatSectionAndMethod } from '@shared/lib/utils'; +import { type DecodedTransaction, type MultisigTransaction, type Transaction, TransactionType } from '@/shared/core'; +import { formatSectionAndMethod } from '@/shared/lib/utils'; import { type VoteTransaction, voteTransactionService } from '../../../governance'; import { diff --git a/src/renderer/entities/transaction/lib/extrinsicService.ts b/src/renderer/entities/transaction/lib/extrinsicService.ts index c43879a0c0..2c80654f3f 100644 --- a/src/renderer/entities/transaction/lib/extrinsicService.ts +++ b/src/renderer/entities/transaction/lib/extrinsicService.ts @@ -10,10 +10,10 @@ import { } from '@substrate/txwrapper-polkadot'; import sortBy from 'lodash/sortBy'; -import { type MultisigTxWrapper, type ProxyTxWrapper, type Transaction, TransactionType } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { DEFAULT_FEE_ASSET_ITEM } from '@entities/transaction'; -import * as xcmMethods from '@entities/transaction/lib/common/xcmMethods'; +import { type MultisigTxWrapper, type ProxyTxWrapper, type Transaction, TransactionType } from '@/shared/core'; +import { toAddress } from '@/shared/lib/utils'; +import { DEFAULT_FEE_ASSET_ITEM } from '@/entities/transaction'; +import * as xcmMethods from '@/entities/transaction/lib/common/xcmMethods'; import { getMaxWeight, hasDestWeight, isControllerMissing, isOldMultisigPallet } from './common/utils'; import { convictionVotingMethods } from './wrappers/convictionVoting'; diff --git a/src/renderer/entities/transaction/lib/index.ts b/src/renderer/entities/transaction/lib/index.ts index d74e86a14a..9e51d5300d 100644 --- a/src/renderer/entities/transaction/lib/index.ts +++ b/src/renderer/entities/transaction/lib/index.ts @@ -4,6 +4,8 @@ export * from './common/utils'; export * from './common/types'; export * from './common/constants'; export * from './validateBalance'; +export * from './transactionConfirmIcon'; +export * from './extrinsicService'; export { transactionBuilder } from './transactionBuilder'; export { OperationError, type OperationErrorType } from './common/errors'; diff --git a/src/renderer/entities/transaction/lib/mock/extrinsicService.mock.ts b/src/renderer/entities/transaction/lib/mock/extrinsicService.mock.ts index 5fb1e2a0ea..003f857353 100644 --- a/src/renderer/entities/transaction/lib/mock/extrinsicService.mock.ts +++ b/src/renderer/entities/transaction/lib/mock/extrinsicService.mock.ts @@ -1,5 +1,5 @@ -import { type Serializable, type StandardVote, TransactionType } from '@shared/core'; -import { TEST_ACCOUNTS, TEST_ADDRESS } from '@shared/lib/utils'; +import { type Serializable, type StandardVote, TransactionType } from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_ADDRESS } from '@/shared/lib/utils'; export const extrinsicTests = [ { diff --git a/src/renderer/entities/transaction/lib/transactionBuilder.ts b/src/renderer/entities/transaction/lib/transactionBuilder.ts index 90a6b7e9af..0272ee0ee5 100644 --- a/src/renderer/entities/transaction/lib/transactionBuilder.ts +++ b/src/renderer/entities/transaction/lib/transactionBuilder.ts @@ -12,8 +12,8 @@ import { type TrackId, type Transaction, TransactionType, -} from '@shared/core'; -import { TEST_ACCOUNTS, formatAmount, getAssetId, toAccountId, toAddress } from '@shared/lib/utils'; +} from '@/shared/core'; +import { TEST_ACCOUNTS, formatAmount, getAssetId, toAccountId, toAddress } from '@/shared/lib/utils'; import { type RevoteTransaction, type TransactionVote, type VoteTransaction } from '@/entities/governance'; import { TransferType } from './common/constants'; diff --git a/src/renderer/entities/transaction/lib/transactionConfirmIcon.ts b/src/renderer/entities/transaction/lib/transactionConfirmIcon.ts index 2fd9797582..8f25759d6b 100644 --- a/src/renderer/entities/transaction/lib/transactionConfirmIcon.ts +++ b/src/renderer/entities/transaction/lib/transactionConfirmIcon.ts @@ -1,5 +1,5 @@ -import { type DecodedTransaction, type Transaction, TransactionType } from '@shared/core'; -import { type IconNames } from '@shared/ui/Icon/data'; +import { type DecodedTransaction, type Transaction, TransactionType } from '@/shared/core'; +import { type IconNames } from '@/shared/ui/Icon/data'; import { isEditDelegationTransaction } from './common/utils'; diff --git a/src/renderer/entities/transaction/lib/transactionIcon.ts b/src/renderer/entities/transaction/lib/transactionIcon.ts index 910cb968cb..dfbd5f2494 100644 --- a/src/renderer/entities/transaction/lib/transactionIcon.ts +++ b/src/renderer/entities/transaction/lib/transactionIcon.ts @@ -1,5 +1,5 @@ -import { type DecodedTransaction, type Transaction, TransactionType } from '@shared/core'; -import { type IconNames } from '@shared/ui/Icon/data'; +import { type DecodedTransaction, type Transaction, TransactionType } from '@/shared/core'; +import { type IconNames } from '@/shared/ui/Icon/data'; import { isEditDelegationTransaction } from './common/utils'; diff --git a/src/renderer/entities/transaction/lib/transactionService.ts b/src/renderer/entities/transaction/lib/transactionService.ts index af30dc60ab..7c0c97f80c 100644 --- a/src/renderer/entities/transaction/lib/transactionService.ts +++ b/src/renderer/entities/transaction/lib/transactionService.ts @@ -22,8 +22,8 @@ import { type TxWrapper, type Wallet, WrapperKind, -} from '@shared/core'; -import { type TxMetadata, createTxMetadata, dictionary, toAccountId } from '@shared/lib/utils'; +} from '@/shared/core'; +import { type TxMetadata, createTxMetadata, dictionary, toAccountId } from '@/shared/lib/utils'; import { walletUtils } from '../../wallet'; import { LEAVE_SOME_SPACE_MULTIPLIER } from './common/constants'; diff --git a/src/renderer/entities/transaction/lib/validateBalance.ts b/src/renderer/entities/transaction/lib/validateBalance.ts index 354ac32bbd..f535011835 100644 --- a/src/renderer/entities/transaction/lib/validateBalance.ts +++ b/src/renderer/entities/transaction/lib/validateBalance.ts @@ -1,9 +1,9 @@ import { type ApiPromise } from '@polkadot/api'; import { BN } from '@polkadot/util'; -import { type AccountId, type Balance, type ChainId, type PartialBy, type Transaction } from '@shared/core'; -import { ValidationErrors, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { OperationError, type OperationErrorType } from '@entities/transaction'; +import { type AccountId, type Balance, type ChainId, type PartialBy, type Transaction } from '@/shared/core'; +import { ValidationErrors, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { OperationError, type OperationErrorType } from '@/entities/transaction'; type Props = { api: ApiPromise; diff --git a/src/renderer/entities/transaction/ui/Fee/Fee.test.tsx b/src/renderer/entities/transaction/ui/Fee/Fee.test.tsx index e40b6f67c9..ea8bea9e6a 100644 --- a/src/renderer/entities/transaction/ui/Fee/Fee.test.tsx +++ b/src/renderer/entities/transaction/ui/Fee/Fee.test.tsx @@ -1,24 +1,24 @@ import { type ApiPromise } from '@polkadot/api'; import { act, render, screen } from '@testing-library/react'; -import { type Asset, type Transaction } from '@shared/core'; +import { type Asset, type Transaction } from '@/shared/core'; import { Fee } from './Fee'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), })); -jest.mock('@entities/transaction', () => ({ +jest.mock('@/entities/transaction', () => ({ transactionService: { getTransactionFee: jest.fn().mockResolvedValue('12'), }, FeeLoader: ({ fiatFlag }: any) =>
{fiatFlag ? 'fiat' : 'crypto'}
, })); -jest.mock('@entities/asset', () => ({ +jest.mock('@/entities/asset', () => ({ AssetBalance: ({ value }: any) =>
{value}
, })); diff --git a/src/renderer/entities/transaction/ui/Fee/Fee.tsx b/src/renderer/entities/transaction/ui/Fee/Fee.tsx index 05d3ac904d..9afc47b0b6 100644 --- a/src/renderer/entities/transaction/ui/Fee/Fee.tsx +++ b/src/renderer/entities/transaction/ui/Fee/Fee.tsx @@ -3,11 +3,10 @@ import { BN } from '@polkadot/util'; import { useUnit } from 'effector-react'; import { memo, useEffect, useState } from 'react'; -import { type Asset, type Transaction } from '@shared/core'; -import { AssetBalance } from '@entities/asset'; -import { priceProviderModel } from '@entities/price'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { FeeLoader, transactionService } from '@entities/transaction'; +import { type Asset, type Transaction } from '@/shared/core'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; +import { FeeLoader, transactionService } from '@/entities/transaction'; type Props = { api?: ApiPromise; diff --git a/src/renderer/entities/transaction/ui/FeeLoader/FeeLoader.tsx b/src/renderer/entities/transaction/ui/FeeLoader/FeeLoader.tsx index a66be0bcbf..d3a104338c 100644 --- a/src/renderer/entities/transaction/ui/FeeLoader/FeeLoader.tsx +++ b/src/renderer/entities/transaction/ui/FeeLoader/FeeLoader.tsx @@ -1,4 +1,4 @@ -import { Shimmering } from '@shared/ui'; +import { Shimmering } from '@/shared/ui'; type Props = { fiatFlag?: boolean; diff --git a/src/renderer/entities/transaction/ui/FeeWithLabel/FeeWithLabel.tsx b/src/renderer/entities/transaction/ui/FeeWithLabel/FeeWithLabel.tsx index 55052d106f..e287469d29 100644 --- a/src/renderer/entities/transaction/ui/FeeWithLabel/FeeWithLabel.tsx +++ b/src/renderer/entities/transaction/ui/FeeWithLabel/FeeWithLabel.tsx @@ -1,8 +1,8 @@ import { type ComponentProps } from 'react'; -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { DetailRow, FootnoteText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { DetailRow, FootnoteText } from '@/shared/ui'; import { Fee } from '../Fee/Fee'; type Props = ComponentProps & { diff --git a/src/renderer/entities/transaction/ui/MultisigDeposit/MultisigDeposit.tsx b/src/renderer/entities/transaction/ui/MultisigDeposit/MultisigDeposit.tsx index 926e86d471..9ac3259942 100644 --- a/src/renderer/entities/transaction/ui/MultisigDeposit/MultisigDeposit.tsx +++ b/src/renderer/entities/transaction/ui/MultisigDeposit/MultisigDeposit.tsx @@ -2,11 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { useUnit } from 'effector-react'; import { memo, useEffect, useState } from 'react'; -import { type Asset, type MultisigThreshold } from '@shared/core'; -import { AssetBalance } from '@entities/asset'; -import { priceProviderModel } from '@entities/price'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { FeeLoader, transactionService } from '@entities/transaction'; +import { type Asset, type MultisigThreshold } from '@/shared/core'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; +import { FeeLoader, transactionService } from '@/entities/transaction'; type Props = { api?: ApiPromise; diff --git a/src/renderer/entities/transaction/ui/MultisigDepositWithLabel/MultisigDepositWithLabel.tsx b/src/renderer/entities/transaction/ui/MultisigDepositWithLabel/MultisigDepositWithLabel.tsx index 64050c14fd..1399da05f3 100644 --- a/src/renderer/entities/transaction/ui/MultisigDepositWithLabel/MultisigDepositWithLabel.tsx +++ b/src/renderer/entities/transaction/ui/MultisigDepositWithLabel/MultisigDepositWithLabel.tsx @@ -1,8 +1,8 @@ import { type ComponentProps } from 'react'; -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; import { MultisigDeposit } from '../MultisigDeposit/MultisigDeposit'; type Props = ComponentProps & { diff --git a/src/renderer/entities/transaction/ui/OperationResult/OperationResult.test.tsx b/src/renderer/entities/transaction/ui/OperationResult/OperationResult.test.tsx index 160ff29297..3bff32a681 100644 --- a/src/renderer/entities/transaction/ui/OperationResult/OperationResult.test.tsx +++ b/src/renderer/entities/transaction/ui/OperationResult/OperationResult.test.tsx @@ -3,7 +3,7 @@ import noop from 'lodash/noop'; import { OperationResult } from './OperationResult'; -jest.mock('@shared/ui/Animation/Animation', () => ({ +jest.mock('@/shared/ui/Animation/Animation', () => ({ Animation: () => animation, })); diff --git a/src/renderer/entities/transaction/ui/OperationResult/OperationResult.tsx b/src/renderer/entities/transaction/ui/OperationResult/OperationResult.tsx index 4ca3a7bcee..add6b28e53 100644 --- a/src/renderer/entities/transaction/ui/OperationResult/OperationResult.tsx +++ b/src/renderer/entities/transaction/ui/OperationResult/OperationResult.tsx @@ -1,7 +1,7 @@ import { type PropsWithChildren, useEffect, useRef } from 'react'; -import { Icon, StatusModal } from '@shared/ui'; -import { Animation } from '@shared/ui/Animation/Animation'; +import { Icon, StatusModal } from '@/shared/ui'; +import { Animation } from '@/shared/ui/Animation/Animation'; import { VariantAnimationProps } from './common/constants'; import { type Variant } from './common/types'; diff --git a/src/renderer/entities/transaction/ui/ProxyDeposit/ProxyDeposit.tsx b/src/renderer/entities/transaction/ui/ProxyDeposit/ProxyDeposit.tsx index 82c4e47d38..75a2bfb4ef 100644 --- a/src/renderer/entities/transaction/ui/ProxyDeposit/ProxyDeposit.tsx +++ b/src/renderer/entities/transaction/ui/ProxyDeposit/ProxyDeposit.tsx @@ -2,11 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { useUnit } from 'effector-react'; import { memo, useEffect, useState } from 'react'; -import { proxyService } from '@shared/api/proxy'; -import { type Asset } from '@shared/core'; -import { AssetBalance } from '@entities/asset'; -import { priceProviderModel } from '@entities/price'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; +import { proxyService } from '@/shared/api/proxy'; +import { type Asset } from '@/shared/core'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; import { FeeLoader } from '../FeeLoader/FeeLoader'; type Props = { diff --git a/src/renderer/entities/transaction/ui/ProxyDepositWithLabel/ProxyDepositWithLabel.tsx b/src/renderer/entities/transaction/ui/ProxyDepositWithLabel/ProxyDepositWithLabel.tsx index f38e614b6e..0371bd76eb 100644 --- a/src/renderer/entities/transaction/ui/ProxyDepositWithLabel/ProxyDepositWithLabel.tsx +++ b/src/renderer/entities/transaction/ui/ProxyDepositWithLabel/ProxyDepositWithLabel.tsx @@ -1,8 +1,8 @@ import { type ComponentProps } from 'react'; -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; import { ProxyDeposit } from '../ProxyDeposit/ProxyDeposit'; type Props = ComponentProps & { diff --git a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrDerivationsGenerator.tsx b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrDerivationsGenerator.tsx index 2fd93db0c4..01f69e3b6b 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrDerivationsGenerator.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrDerivationsGenerator.tsx @@ -1,4 +1,4 @@ -import { type Address } from '@shared/core'; +import { type Address } from '@/shared/core'; import { type DynamicDerivationRequestInfo } from '../common/types'; import { DEFAULT_FRAME_DELAY } from './common/constants'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.test.tsx b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.test.tsx index 1d16c4a8d2..36bbbb007f 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.test.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; -import { SigningType } from '@shared/core'; +import { SigningType } from '@/shared/core'; import { QrTxGenerator } from './QrTxGenerator'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.tsx b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.tsx index f87a0c88e0..34aaf1dab1 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/QrTxGenerator.tsx @@ -1,7 +1,7 @@ import { u8aConcat } from '@polkadot/util'; -import { type ChainId, type SigningType } from '@shared/core'; -import { CryptoType } from '@shared/core'; +import { type ChainId, type SigningType } from '@/shared/core'; +import { CryptoType } from '@/shared/core'; import { DEFAULT_FRAME_DELAY, SUBSTRATE_ID } from './common/constants'; import useGenerator from './common/useGenerator'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.test.ts b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.test.ts index ab9f71cc2a..5453961470 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.test.ts +++ b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.test.ts @@ -1,7 +1,7 @@ import { stringToU8a, u8aToHex } from '@polkadot/util'; import { u8aConcat } from '@polkadot/util/u8a/concat'; -import { SigningType } from '@shared/core'; +import { SigningType } from '@/shared/core'; import { SUBSTRATE_ID } from './constants'; import { createFrames, createSignPayload, createSubstrateSignPayload, encodeNumber, getSvgString } from './utils'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.ts b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.ts index 288e17005e..09ede6fe05 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.ts +++ b/src/renderer/entities/transaction/ui/QrCode/QrGenerator/common/utils.ts @@ -4,8 +4,8 @@ import { str } from 'parity-scale-codec'; import qrcode from 'qrcode-generator'; import { type Encoder } from 'raptorq'; -import { type Address, type ChainId } from '@shared/core'; -import { CryptoType, CryptoTypeString, SigningType } from '@shared/core'; +import { type Address, type ChainId } from '@/shared/core'; +import { CryptoType, CryptoTypeString, SigningType } from '@/shared/core'; import { DYNAMIC_DERIVATIONS_REQUEST } from '../../common/constants'; import { type DynamicDerivationRequestInfo } from '../../common/types'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrGeneratorContainer/QrGeneratorContainer.tsx b/src/renderer/entities/transaction/ui/QrCode/QrGeneratorContainer/QrGeneratorContainer.tsx index 09cdff994f..fc6216354f 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrGeneratorContainer/QrGeneratorContainer.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrGeneratorContainer/QrGeneratorContainer.tsx @@ -1,8 +1,8 @@ import { type PropsWithChildren } from 'react'; -import { useI18n } from '@app/providers'; -import { type ChainId } from '@shared/core'; -import { Button, Countdown, FootnoteText, Icon, InfoLink, Shimmering, SmallTitleText } from '@shared/ui'; +import { type ChainId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button, Countdown, FootnoteText, Icon, InfoLink, Shimmering, SmallTitleText } from '@/shared/ui'; import { TROUBLESHOOTING_URL, getMetadataPortalMetadataUrl } from '../common/constants'; type Props = { diff --git a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrMultiframeSignatureReader.tsx b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrMultiframeSignatureReader.tsx index d17cc46b5e..b29d4600b0 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrMultiframeSignatureReader.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrMultiframeSignatureReader.tsx @@ -3,9 +3,9 @@ import { BrowserCodeReader, BrowserQRCodeReader, type IScannerControls } from '@ import init, { Decoder, EncodingPacket } from 'raptorq'; import { useEffect, useRef } from 'react'; -import { useI18n } from '@app/providers'; -import { type HexString } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; +import { type HexString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; import { CRYPTO_SR25519 } from '../QrGenerator/common/constants'; import { ErrorFields, FRAME_KEY, SIGNED_TRANSACTION_BULK } from '../common/constants'; import { QR_READER_ERRORS } from '../common/errors'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.test.tsx b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.test.tsx index a0b08581f1..bf7e4ffd61 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.test.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.test.tsx @@ -22,7 +22,7 @@ jest.mock('@zxing/browser', () => ({ })), })); -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.tsx b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.tsx index 52eff521ba..f0f973247c 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReader.tsx @@ -3,9 +3,9 @@ import { BrowserCodeReader, BrowserQRCodeReader, type IScannerControls } from '@ import init, { Decoder, EncodingPacket } from 'raptorq'; import { useEffect, useRef } from 'react'; -import { useI18n } from '@app/providers'; -import { CryptoTypeString } from '@shared/core'; -import { cnTw, validateSignerFormat } from '@shared/lib/utils'; +import { CryptoTypeString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, validateSignerFormat } from '@/shared/lib/utils'; import { DYNAMIC_DERIVATIONS_ADDRESS_RESPONSE, EXPORT_ADDRESS, diff --git a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReaderWrapper.tsx b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReaderWrapper.tsx index 1c8333a431..4b54c5feba 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReaderWrapper.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrReaderWrapper.tsx @@ -1,10 +1,10 @@ import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type HexString } from '@shared/core'; -import { ValidationErrors, cnTw } from '@shared/lib/utils'; -import { Button, CaptionText, Countdown, FootnoteText, Select, Shimmering, SmallTitleText } from '@shared/ui'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; +import { type HexString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { ValidationErrors, cnTw } from '@/shared/lib/utils'; +import { Button, CaptionText, Countdown, FootnoteText, Select, Shimmering, SmallTitleText } from '@/shared/ui'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; import { CameraAccessErrors, CameraError, WhiteTextButtonStyle } from '../common/constants'; import { type ErrorObject, type Progress, QrError, type VideoInput } from '../common/types'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrSignatureReader.tsx b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrSignatureReader.tsx index 9b4b927dd6..8d46bd72ff 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrReader/QrSignatureReader.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrReader/QrSignatureReader.tsx @@ -3,9 +3,9 @@ import { BrowserCodeReader, BrowserQRCodeReader, type IScannerControls } from '@ import init from 'raptorq'; import { useEffect, useRef } from 'react'; -import { useI18n } from '@app/providers'; -import { type HexString } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; +import { type HexString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; import { ErrorFields } from '../common/constants'; import { QR_READER_ERRORS } from '../common/errors'; import { type DecodeCallback, type ErrorObject, QrError, type VideoInput } from '../common/types'; diff --git a/src/renderer/entities/transaction/ui/QrCode/QrReader/SignatureReaderError.tsx b/src/renderer/entities/transaction/ui/QrCode/QrReader/SignatureReaderError.tsx index 6062961abd..b81ec8de65 100644 --- a/src/renderer/entities/transaction/ui/QrCode/QrReader/SignatureReaderError.tsx +++ b/src/renderer/entities/transaction/ui/QrCode/QrReader/SignatureReaderError.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { Button, FootnoteText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Button, FootnoteText } from '@/shared/ui'; import { CameraAccessErrors, type CameraError, CameraErrorText } from '../common/constants'; type Props = { diff --git a/src/renderer/entities/transaction/ui/QrCode/common/constants.ts b/src/renderer/entities/transaction/ui/QrCode/common/constants.ts index 6d5bfd0f1f..d71b65e05f 100644 --- a/src/renderer/entities/transaction/ui/QrCode/common/constants.ts +++ b/src/renderer/entities/transaction/ui/QrCode/common/constants.ts @@ -10,7 +10,7 @@ import { uint8Array, } from 'parity-scale-codec'; -import { type ChainId, type CryptoType, CryptoTypeString } from '@shared/core'; +import { type ChainId, type CryptoType, CryptoTypeString } from '@/shared/core'; import { type AddressInfo, type DdAddressInfo, type DdSeedInfo, type SeedInfo } from './types'; diff --git a/src/renderer/entities/transaction/ui/QrCode/common/types.ts b/src/renderer/entities/transaction/ui/QrCode/common/types.ts index 1092ca4f90..b77ab822ea 100644 --- a/src/renderer/entities/transaction/ui/QrCode/common/types.ts +++ b/src/renderer/entities/transaction/ui/QrCode/common/types.ts @@ -1,6 +1,6 @@ import { type DecodeContinuouslyCallback } from '@zxing/browser/esm/common/DecodeContinuouslyCallback'; -import { type Address, type ChainId, type CryptoType, type CryptoTypeString } from '@shared/core'; +import { type Address, type ChainId, type CryptoType, type CryptoTypeString } from '@/shared/core'; import { type VaultFeature } from './constants'; diff --git a/src/renderer/entities/transaction/ui/Scanning/ScanMultiframeQr.tsx b/src/renderer/entities/transaction/ui/Scanning/ScanMultiframeQr.tsx index b1a127a4f6..fcddf04c50 100644 --- a/src/renderer/entities/transaction/ui/Scanning/ScanMultiframeQr.tsx +++ b/src/renderer/entities/transaction/ui/Scanning/ScanMultiframeQr.tsx @@ -3,12 +3,12 @@ import { u8aConcat } from '@polkadot/util'; import init, { Encoder } from 'raptorq'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type Address, type BaseAccount, type ChainId, type ShardAccount, type Wallet } from '@shared/core'; -import { type TxMetadata, createTxMetadata, toAddress, upgradeNonce } from '@shared/lib/utils'; -import { Button } from '@shared/ui'; -import { transactionService } from '@entities/transaction'; -import { type SigningPayload } from '@features/operations/OperationSign'; +import { type Address, type BaseAccount, type ChainId, type ShardAccount, type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { type TxMetadata, createTxMetadata, toAddress, upgradeNonce } from '@/shared/lib/utils'; +import { Button } from '@/shared/ui'; +import { transactionService } from '@/entities/transaction'; +import { type SigningPayload } from '@/features/operations/OperationSign'; import { accountUtils, walletUtils } from '../../../wallet'; import { QrMultiframeGenerator } from '../QrCode/QrGenerator/QrMultiframeTxGenerator'; import { createMultipleSignPayload, createSubstrateSignPayload } from '../QrCode/QrGenerator/common/utils'; diff --git a/src/renderer/entities/transaction/ui/Scanning/ScanSingleframeQr.tsx b/src/renderer/entities/transaction/ui/Scanning/ScanSingleframeQr.tsx index b91102647a..5fddefb2c2 100644 --- a/src/renderer/entities/transaction/ui/Scanning/ScanSingleframeQr.tsx +++ b/src/renderer/entities/transaction/ui/Scanning/ScanSingleframeQr.tsx @@ -1,7 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; import { type Account, type Address, @@ -11,9 +10,10 @@ import { type ShardAccount, type Transaction, type Wallet, -} from '@shared/core'; -import { CryptoType } from '@shared/core'; -import { Button } from '@shared/ui'; +} from '@/shared/core'; +import { CryptoType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button } from '@/shared/ui'; import { transactionService } from '../../lib'; import { QrTxGenerator } from '../QrCode/QrGenerator/QrTxGenerator'; import { QrGeneratorContainer } from '../QrCode/QrGeneratorContainer/QrGeneratorContainer'; diff --git a/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.test.tsx b/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.test.tsx index dc20f54786..46ee639e55 100644 --- a/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.test.tsx +++ b/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.test.tsx @@ -1,11 +1,11 @@ import { render, screen } from '@testing-library/react'; -import { type Transaction, TransactionType } from '@shared/core'; -import { TEST_ADDRESS, TEST_CHAIN_ID } from '@shared/lib/utils'; +import { type Transaction, TransactionType } from '@/shared/core'; +import { TEST_ADDRESS, TEST_CHAIN_ID } from '@/shared/lib/utils'; import { TransactionTitle } from './TransactionTitle'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx b/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx index c772ea6e96..6984e6d8a5 100644 --- a/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx +++ b/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx @@ -1,10 +1,10 @@ import { type PropsWithChildren } from 'react'; -import { useI18n } from '@app/providers'; -import { type DecodedTransaction, type Transaction } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { BodyText, FootnoteText, Icon } from '@shared/ui'; -import { getIconName } from '@entities/transaction/lib/transactionIcon'; +import { type DecodedTransaction, type Transaction } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BodyText, FootnoteText, Icon } from '@/shared/ui'; +import { getIconName } from '@/entities/transaction/lib/transactionIcon'; import { getTransactionTitle } from '../../lib'; type Props = { diff --git a/src/renderer/entities/transaction/ui/XcmFee/XcmFee.test.tsx b/src/renderer/entities/transaction/ui/XcmFee/XcmFee.test.tsx index c434234edf..ea3d538d24 100644 --- a/src/renderer/entities/transaction/ui/XcmFee/XcmFee.test.tsx +++ b/src/renderer/entities/transaction/ui/XcmFee/XcmFee.test.tsx @@ -1,24 +1,24 @@ import { type ApiPromise } from '@polkadot/api'; import { act, render, screen } from '@testing-library/react'; -import { type ChainXCM, type XcmConfig } from '@shared/api/xcm'; -import { type Asset, type Transaction } from '@shared/core'; +import { type ChainXCM, type XcmConfig } from '@/shared/api/xcm'; +import { type Asset, type Transaction } from '@/shared/core'; import { XcmFee } from './XcmFee'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), })); -jest.mock('@entities/transaction', () => ({ +jest.mock('@/entities/transaction', () => ({ useTransaction: jest.fn().mockReturnValue({ getTransactionFee: jest.fn().mockResolvedValue('12'), }), })); -jest.mock('@entities/asset/ui', () => ({ +jest.mock('@/entities/asset/ui', () => ({ AssetBalance: ({ value }: any) =>
{value}
, })); diff --git a/src/renderer/entities/transaction/ui/XcmFee/XcmFee.tsx b/src/renderer/entities/transaction/ui/XcmFee/XcmFee.tsx index 847d53b8f8..81d15c6094 100644 --- a/src/renderer/entities/transaction/ui/XcmFee/XcmFee.tsx +++ b/src/renderer/entities/transaction/ui/XcmFee/XcmFee.tsx @@ -3,13 +3,12 @@ import { BN } from '@polkadot/util'; import { useUnit } from 'effector-react'; import { memo, useEffect, useState } from 'react'; -import { type XcmConfig, xcmService } from '@shared/api/xcm'; -import { type Asset, type DecodedTransaction, type Transaction } from '@shared/core'; -import { toLocalChainId } from '@shared/lib/utils'; -import { AssetBalance } from '@entities/asset'; -import { priceProviderModel } from '@entities/price'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { FeeLoader } from '@entities/transaction'; +import { type XcmConfig, xcmService } from '@/shared/api/xcm'; +import { type Asset, type DecodedTransaction, type Transaction } from '@/shared/core'; +import { toLocalChainId } from '@/shared/lib/utils'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; +import { FeeLoader } from '@/entities/transaction'; type Props = { api: ApiPromise; diff --git a/src/renderer/entities/transaction/ui/XcmFeeWithLabel/XcmFeeWithLabel.tsx b/src/renderer/entities/transaction/ui/XcmFeeWithLabel/XcmFeeWithLabel.tsx index 8b66ce4b8e..e0f466ed9c 100644 --- a/src/renderer/entities/transaction/ui/XcmFeeWithLabel/XcmFeeWithLabel.tsx +++ b/src/renderer/entities/transaction/ui/XcmFeeWithLabel/XcmFeeWithLabel.tsx @@ -1,8 +1,8 @@ import { type ComponentProps } from 'react'; -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { DetailRow, FootnoteText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { DetailRow, FootnoteText } from '@/shared/ui'; import { XcmFee } from '../XcmFee/XcmFee'; type Props = ComponentProps & { diff --git a/src/renderer/entities/wallet/common/utils.ts b/src/renderer/entities/wallet/common/utils.ts index 02173e3335..42e6d84604 100644 --- a/src/renderer/entities/wallet/common/utils.ts +++ b/src/renderer/entities/wallet/common/utils.ts @@ -1,4 +1,4 @@ -import { type Wallet } from '@shared/core'; +import { type Wallet } from '@/shared/core'; import { permissionUtils } from '../lib/permission-utils'; import { OperationType } from './types'; diff --git a/src/renderer/entities/wallet/lib/__tests__/account-utils.test.ts b/src/renderer/entities/wallet/lib/__tests__/account-utils.test.ts index 10523e6147..f044fcfa92 100644 --- a/src/renderer/entities/wallet/lib/__tests__/account-utils.test.ts +++ b/src/renderer/entities/wallet/lib/__tests__/account-utils.test.ts @@ -7,9 +7,9 @@ import { CryptoType, KeyType, type ShardAccount, -} from '@shared/core'; -import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@shared/lib/utils'; -import { accountUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@/shared/lib/utils'; +import { accountUtils } from '../account-utils'; const accounts: (ChainAccount | ShardAccount)[] = [ { diff --git a/src/renderer/entities/wallet/lib/__tests__/mocks/permission-mock.ts b/src/renderer/entities/wallet/lib/__tests__/mocks/permission-mock.ts index d99fa0f0d0..7895a0520c 100644 --- a/src/renderer/entities/wallet/lib/__tests__/mocks/permission-mock.ts +++ b/src/renderer/entities/wallet/lib/__tests__/mocks/permission-mock.ts @@ -11,7 +11,7 @@ import { type WalletConnectWallet, WalletType, type WatchOnlyWallet, -} from '@shared/core'; +} from '@/shared/core'; // Wallets diff --git a/src/renderer/entities/wallet/lib/__tests__/model-utils.test.ts b/src/renderer/entities/wallet/lib/__tests__/model-utils.test.ts index 2b35d48cc2..587698e529 100644 --- a/src/renderer/entities/wallet/lib/__tests__/model-utils.test.ts +++ b/src/renderer/entities/wallet/lib/__tests__/model-utils.test.ts @@ -1,5 +1,5 @@ -import { AccountType, type BaseAccount, type ChainAccount, ChainType, CryptoType, KeyType } from '@shared/core'; -import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@shared/lib/utils'; +import { AccountType, type BaseAccount, type ChainAccount, ChainType, CryptoType, KeyType } from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@/shared/lib/utils'; import { modelUtils } from '../model-utils'; const accounts = [ { diff --git a/src/renderer/entities/wallet/lib/__tests__/wallet-utils.test.ts b/src/renderer/entities/wallet/lib/__tests__/wallet-utils.test.ts index e4cc1d5ab5..bfc5e8c02d 100644 --- a/src/renderer/entities/wallet/lib/__tests__/wallet-utils.test.ts +++ b/src/renderer/entities/wallet/lib/__tests__/wallet-utils.test.ts @@ -1,4 +1,4 @@ -import { type Wallet, WalletType } from '@shared/core'; +import { type Wallet, WalletType } from '@/shared/core'; import { walletUtils } from '../wallet-utils'; describe('entities/wallet/lib/wallet-utils', () => { diff --git a/src/renderer/entities/wallet/lib/account-utils.ts b/src/renderer/entities/wallet/lib/account-utils.ts index 720e594dc0..8d52f4e7b9 100644 --- a/src/renderer/entities/wallet/lib/account-utils.ts +++ b/src/renderer/entities/wallet/lib/account-utils.ts @@ -17,10 +17,10 @@ import { type ShardAccount, type Wallet, type WcAccount, -} from '@shared/core'; -import { AccountType, ChainType, CryptoType, ProxyType, ProxyVariant } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { networkUtils } from '@entities/network'; +} from '@/shared/core'; +import { AccountType, ChainType, CryptoType, ProxyType, ProxyVariant } from '@/shared/core'; +import { toAddress } from '@/shared/lib/utils'; +import { networkUtils } from '@/entities/network'; import { walletUtils } from './wallet-utils'; diff --git a/src/renderer/entities/wallet/lib/constants.ts b/src/renderer/entities/wallet/lib/constants.ts index 0d122c579b..87a55e3ff4 100644 --- a/src/renderer/entities/wallet/lib/constants.ts +++ b/src/renderer/entities/wallet/lib/constants.ts @@ -1,5 +1,5 @@ +import { KeyType } from '@/shared/core'; import { type IconNames } from '@/shared/ui/types'; -import { KeyType } from '@shared/core'; export const KEY_NAMES = { [KeyType.MAIN]: 'Main', diff --git a/src/renderer/entities/wallet/lib/model-utils.ts b/src/renderer/entities/wallet/lib/model-utils.ts index 26dba33b44..6b1495bed8 100644 --- a/src/renderer/entities/wallet/lib/model-utils.ts +++ b/src/renderer/entities/wallet/lib/model-utils.ts @@ -1,5 +1,6 @@ -import { type BaseAccount, type ChainAccount } from '@shared/core'; -import { accountUtils } from '@entities/wallet'; +import { type BaseAccount, type ChainAccount } from '@/shared/core'; + +import { accountUtils } from './account-utils'; export const modelUtils = { groupAccounts, diff --git a/src/renderer/entities/wallet/lib/permission-utils.ts b/src/renderer/entities/wallet/lib/permission-utils.ts index f87a0f4e4b..5739ee19e2 100644 --- a/src/renderer/entities/wallet/lib/permission-utils.ts +++ b/src/renderer/entities/wallet/lib/permission-utils.ts @@ -1,4 +1,4 @@ -import { type Wallet } from '@shared/core'; +import { type Wallet } from '@/shared/core'; import { accountUtils } from './account-utils'; import { walletUtils } from './wallet-utils'; diff --git a/src/renderer/entities/wallet/lib/wallet-utils.ts b/src/renderer/entities/wallet/lib/wallet-utils.ts index f26c435751..7805d082ea 100644 --- a/src/renderer/entities/wallet/lib/wallet-utils.ts +++ b/src/renderer/entities/wallet/lib/wallet-utils.ts @@ -13,7 +13,7 @@ import { type WalletConnectWallet, WalletType, type WatchOnlyWallet, -} from '@shared/core'; +} from '@/shared/core'; export const walletUtils = { isPolkadotVault, diff --git a/src/renderer/entities/wallet/model/__tests__/mocks/wallet-mock.ts b/src/renderer/entities/wallet/model/__tests__/mocks/wallet-mock.ts index cb75da7dd5..75f7777fb4 100644 --- a/src/renderer/entities/wallet/model/__tests__/mocks/wallet-mock.ts +++ b/src/renderer/entities/wallet/model/__tests__/mocks/wallet-mock.ts @@ -10,8 +10,8 @@ import { SigningType, type Wallet, WalletType, -} from '@shared/core'; -import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@shared/lib/utils'; +} from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@/shared/lib/utils'; const accounts: Account[] = [ { diff --git a/src/renderer/entities/wallet/model/__tests__/wallet-model.test.ts b/src/renderer/entities/wallet/model/__tests__/wallet-model.test.ts index 530eb67e69..87cd08b5cb 100644 --- a/src/renderer/entities/wallet/model/__tests__/wallet-model.test.ts +++ b/src/renderer/entities/wallet/model/__tests__/wallet-model.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; +import { storageService } from '@/shared/api/storage'; import { walletModel } from '../wallet-model'; import { walletMock } from './mocks/wallet-mock'; diff --git a/src/renderer/entities/wallet/model/wallet-model.ts b/src/renderer/entities/wallet/model/wallet-model.ts index 032c98f4bc..1ab6b49364 100644 --- a/src/renderer/entities/wallet/model/wallet-model.ts +++ b/src/renderer/entities/wallet/model/wallet-model.ts @@ -2,7 +2,7 @@ import { combine, createEffect, createEvent, createStore, sample } from 'effecto import groupBy from 'lodash/groupBy'; import { combineEvents } from 'patronum'; -import { storageService } from '@shared/api/storage'; +import { storageService } from '@/shared/api/storage'; import { type Account, type BaseAccount, @@ -12,8 +12,8 @@ import { type NoID, type Wallet, type WcAccount, -} from '@shared/core'; -import { dictionary } from '@shared/lib/utils'; +} from '@/shared/core'; +import { dictionary } from '@/shared/lib/utils'; import { modelUtils } from '../lib/model-utils'; type DbWallet = Omit; diff --git a/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.stories.tsx b/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.stories.tsx index f46867db62..a450aea166 100644 --- a/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.stories.tsx +++ b/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryFn } from '@storybook/react'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; import { AccountAddress } from './AccountAddress'; diff --git a/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.test.tsx b/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.test.tsx index a6070182e8..c2aa9360ed 100644 --- a/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.test.tsx +++ b/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { TEST_ACCOUNTS, TEST_ADDRESS } from '@shared/lib/utils'; +import { TEST_ACCOUNTS, TEST_ADDRESS } from '@/shared/lib/utils'; import { AccountAddress } from './AccountAddress'; diff --git a/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.tsx b/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.tsx index c8640c0952..92d6b535e9 100644 --- a/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.tsx +++ b/src/renderer/entities/wallet/ui/AccountAddress/AccountAddress.tsx @@ -1,8 +1,8 @@ import { hexToU8a } from '@polkadot/util'; -import { type AccountId, type Address } from '@shared/core'; -import { cnTw, toAddress, toShortAddress } from '@shared/lib/utils'; -import { Identicon, Truncate } from '@shared/ui'; +import { type AccountId, type Address } from '@/shared/core'; +import { cnTw, toAddress, toShortAddress } from '@/shared/lib/utils'; +import { Identicon, Truncate } from '@/shared/ui'; type AddressType = 'full' | 'short' | 'adaptive'; diff --git a/src/renderer/entities/wallet/ui/AccountSelectModal/AccountSelectModal.tsx b/src/renderer/entities/wallet/ui/AccountSelectModal/AccountSelectModal.tsx index e96518852d..856d84e568 100644 --- a/src/renderer/entities/wallet/ui/AccountSelectModal/AccountSelectModal.tsx +++ b/src/renderer/entities/wallet/ui/AccountSelectModal/AccountSelectModal.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@app/providers'; -import { type Account, type Chain } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { BaseModal, Icon } from '@shared/ui'; +import { type Account, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BaseModal, Icon } from '@/shared/ui'; import { accountUtils } from '../../lib/account-utils'; import { AccountAddress } from '../AccountAddress/AccountAddress'; diff --git a/src/renderer/entities/wallet/ui/AccountsList/AccountsList.tsx b/src/renderer/entities/wallet/ui/AccountsList/AccountsList.tsx index fc7ea040db..8fd311b3ab 100644 --- a/src/renderer/entities/wallet/ui/AccountsList/AccountsList.tsx +++ b/src/renderer/entities/wallet/ui/AccountsList/AccountsList.tsx @@ -1,9 +1,9 @@ -import { useI18n } from '@app/providers'; +import { type AccountId, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, toAddress } from '@/shared/lib/utils'; +import { FootnoteText } from '@/shared/ui'; import { AccountExplorers, Address } from '@/shared/ui-entities'; -import { type AccountId, type Chain } from '@shared/core'; -import { cnTw, toAddress } from '@shared/lib/utils'; -import { FootnoteText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; +import { ChainTitle } from '@/entities/chain'; type Props = { accountId: AccountId; diff --git a/src/renderer/entities/wallet/ui/AddressWithExplorers/AddressWithExplorers.tsx b/src/renderer/entities/wallet/ui/AddressWithExplorers/AddressWithExplorers.tsx index 1d287f90c2..6e966bb92d 100644 --- a/src/renderer/entities/wallet/ui/AddressWithExplorers/AddressWithExplorers.tsx +++ b/src/renderer/entities/wallet/ui/AddressWithExplorers/AddressWithExplorers.tsx @@ -1,6 +1,6 @@ -import { type Explorer } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { IconButton } from '@shared/ui'; +import { type Explorer } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { IconButton } from '@/shared/ui'; import { AccountAddress, type AccountAddressProps, getAddress } from '../AccountAddress/AccountAddress'; import { ExplorersPopover } from '../ExplorersPopover/ExplorersPopover'; diff --git a/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.stories.tsx b/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.stories.tsx index b0b050184b..bf61b5022c 100644 --- a/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.stories.tsx +++ b/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryFn } from '@storybook/react'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; import { AddressWithName } from './AddressWithName'; diff --git a/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.test.tsx b/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.test.tsx index 43598b60ea..82c4538ffe 100644 --- a/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.test.tsx +++ b/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { TEST_ACCOUNTS, TEST_ADDRESS } from '@shared/lib/utils'; +import { TEST_ACCOUNTS, TEST_ADDRESS } from '@/shared/lib/utils'; import { AddressWithName } from './AddressWithName'; diff --git a/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.tsx b/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.tsx index b4493a93ec..e0e6625ece 100644 --- a/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.tsx +++ b/src/renderer/entities/wallet/ui/AddressWithName/AddressWithName.tsx @@ -1,5 +1,5 @@ -import { cnTw, copyToClipboard, toShortAddress } from '@shared/lib/utils'; -import { IconButton, Truncate } from '@shared/ui'; +import { cnTw, copyToClipboard, toShortAddress } from '@/shared/lib/utils'; +import { IconButton, Truncate } from '@/shared/ui'; import { type AccountAddressProps, getAddress } from '../AccountAddress/AccountAddress'; import { AddressWithTwoLines } from '../AddressWithTwoLines/AddressWithTwoLines'; diff --git a/src/renderer/entities/wallet/ui/AddressWithTwoLines/AddressWithTwoLines.tsx b/src/renderer/entities/wallet/ui/AddressWithTwoLines/AddressWithTwoLines.tsx index 9c6b60d86c..f119ddd235 100644 --- a/src/renderer/entities/wallet/ui/AddressWithTwoLines/AddressWithTwoLines.tsx +++ b/src/renderer/entities/wallet/ui/AddressWithTwoLines/AddressWithTwoLines.tsx @@ -1,9 +1,9 @@ import { type IconTheme } from '@polkadot/react-identicon/types'; import { type ReactNode } from 'react'; -import { type AccountId, type Address } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Identicon } from '@shared/ui'; +import { type AccountId, type Address } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { Identicon } from '@/shared/ui'; import { getAddress } from '../AccountAddress/AccountAddress'; type WithAccountId = { diff --git a/src/renderer/entities/wallet/ui/Cards/DerivedAccount.tsx b/src/renderer/entities/wallet/ui/Cards/DerivedAccount.tsx index 111ae8233f..ccd5067713 100644 --- a/src/renderer/entities/wallet/ui/Cards/DerivedAccount.tsx +++ b/src/renderer/entities/wallet/ui/Cards/DerivedAccount.tsx @@ -1,8 +1,8 @@ import { type MouseEvent } from 'react'; -import { type ChainAccount, type ShardAccount } from '@shared/core'; -import { SS58_PUBLIC_KEY_PREFIX, cnTw, toAddress } from '@shared/lib/utils'; -import { BodyText, CaptionText, FootnoteText, HelpText, Icon, IconButton, Identicon } from '@shared/ui'; +import { type ChainAccount, type ShardAccount } from '@/shared/core'; +import { SS58_PUBLIC_KEY_PREFIX, cnTw, toAddress } from '@/shared/lib/utils'; +import { BodyText, CaptionText, FootnoteText, HelpText, Icon, IconButton, Identicon } from '@/shared/ui'; import { accountUtils } from '../../lib/account-utils'; import { KeyIcon } from '../../lib/constants'; diff --git a/src/renderer/entities/wallet/ui/Cards/RootAccountLg.tsx b/src/renderer/entities/wallet/ui/Cards/RootAccountLg.tsx index 6defd973e2..a2a05a0e8d 100644 --- a/src/renderer/entities/wallet/ui/Cards/RootAccountLg.tsx +++ b/src/renderer/entities/wallet/ui/Cards/RootAccountLg.tsx @@ -1,8 +1,8 @@ import { type MouseEvent } from 'react'; -import { type AccountId } from '@shared/core'; -import { SS58_PUBLIC_KEY_PREFIX, cnTw, toAddress } from '@shared/lib/utils'; -import { BodyText, IconButton, Identicon } from '@shared/ui'; +import { type AccountId } from '@/shared/core'; +import { SS58_PUBLIC_KEY_PREFIX, cnTw, toAddress } from '@/shared/lib/utils'; +import { BodyText, IconButton, Identicon } from '@/shared/ui'; type Props = { name: string; diff --git a/src/renderer/entities/wallet/ui/Cards/RootAccountMd.tsx b/src/renderer/entities/wallet/ui/Cards/RootAccountMd.tsx index 15a72d3259..1da983455f 100644 --- a/src/renderer/entities/wallet/ui/Cards/RootAccountMd.tsx +++ b/src/renderer/entities/wallet/ui/Cards/RootAccountMd.tsx @@ -1,8 +1,8 @@ import { type MouseEvent } from 'react'; -import { type AccountId } from '@shared/core'; -import { SS58_PUBLIC_KEY_PREFIX, cnTw, toAddress } from '@shared/lib/utils'; -import { BodyText, IconButton, Identicon } from '@shared/ui'; +import { type AccountId } from '@/shared/core'; +import { SS58_PUBLIC_KEY_PREFIX, cnTw, toAddress } from '@/shared/lib/utils'; +import { BodyText, IconButton, Identicon } from '@/shared/ui'; type Props = { name: string; diff --git a/src/renderer/entities/wallet/ui/Cards/WalletCardLg.tsx b/src/renderer/entities/wallet/ui/Cards/WalletCardLg.tsx index f1d5f9a4bc..6ed2be9170 100644 --- a/src/renderer/entities/wallet/ui/Cards/WalletCardLg.tsx +++ b/src/renderer/entities/wallet/ui/Cards/WalletCardLg.tsx @@ -1,9 +1,9 @@ import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type Wallet } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { FootnoteText, StatusLabel } from '@shared/ui'; +import { type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { FootnoteText, StatusLabel } from '@/shared/ui'; import { walletUtils } from '../../lib/wallet-utils'; import { WalletIcon } from '../WalletIcon/WalletIcon'; diff --git a/src/renderer/entities/wallet/ui/Cards/WalletCardMd.tsx b/src/renderer/entities/wallet/ui/Cards/WalletCardMd.tsx index 96e5cbf85c..78cb5c8ddb 100644 --- a/src/renderer/entities/wallet/ui/Cards/WalletCardMd.tsx +++ b/src/renderer/entities/wallet/ui/Cards/WalletCardMd.tsx @@ -1,9 +1,9 @@ import { type MouseEvent, type ReactNode } from 'react'; -import { type Wallet } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { FootnoteText, IconButton } from '@shared/ui'; -import { walletUtils } from '@entities/wallet'; +import { type Wallet } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { FootnoteText, IconButton } from '@/shared/ui'; +import { walletUtils } from '../../lib/wallet-utils'; import { WalletIcon } from '../WalletIcon/WalletIcon'; type Props = { diff --git a/src/renderer/entities/wallet/ui/Cards/WalletCardSm.tsx b/src/renderer/entities/wallet/ui/Cards/WalletCardSm.tsx index 8064b065cb..c38c06329e 100644 --- a/src/renderer/entities/wallet/ui/Cards/WalletCardSm.tsx +++ b/src/renderer/entities/wallet/ui/Cards/WalletCardSm.tsx @@ -1,8 +1,8 @@ import { type MouseEvent } from 'react'; -import { type Wallet } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { FootnoteText, IconButton } from '@shared/ui'; +import { type Wallet } from '@/shared/core'; +import { cnTw } from '@/shared/lib/utils'; +import { FootnoteText, IconButton } from '@/shared/ui'; import { WalletIcon } from '../WalletIcon/WalletIcon'; type Props = { diff --git a/src/renderer/entities/wallet/ui/CheckPermission/CheckPermission.tsx b/src/renderer/entities/wallet/ui/CheckPermission/CheckPermission.tsx index 731950eb37..471caca0de 100644 --- a/src/renderer/entities/wallet/ui/CheckPermission/CheckPermission.tsx +++ b/src/renderer/entities/wallet/ui/CheckPermission/CheckPermission.tsx @@ -1,7 +1,7 @@ import { type PropsWithChildren } from 'react'; import { Navigate } from 'react-router-dom'; -import { type Wallet } from '@shared/core'; +import { type Wallet } from '@/shared/core'; import { type OperationType } from '../../common/types'; import { getOperationTypeFn } from '../../common/utils'; diff --git a/src/renderer/entities/wallet/ui/ContactItem/ContactItem.tsx b/src/renderer/entities/wallet/ui/ContactItem/ContactItem.tsx index 538e114851..6272a93ee7 100644 --- a/src/renderer/entities/wallet/ui/ContactItem/ContactItem.tsx +++ b/src/renderer/entities/wallet/ui/ContactItem/ContactItem.tsx @@ -1,8 +1,8 @@ import { type MouseEvent } from 'react'; -import { type AccountId, type Address, type KeyType } from '@shared/core'; -import { cnTw, toAddress } from '@shared/lib/utils'; -import { BodyText, HelpText, Icon, IconButton, Identicon } from '@shared/ui'; +import { type AccountId, type Address, type KeyType } from '@/shared/core'; +import { cnTw, toAddress } from '@/shared/lib/utils'; +import { BodyText, HelpText, Icon, IconButton, Identicon } from '@/shared/ui'; import { KeyIcon } from '../../lib/constants'; type Props = { diff --git a/src/renderer/entities/wallet/ui/ExplorersPopover/ExplorersPopover.tsx b/src/renderer/entities/wallet/ui/ExplorersPopover/ExplorersPopover.tsx index 374d688735..4a58bb4fbe 100644 --- a/src/renderer/entities/wallet/ui/ExplorersPopover/ExplorersPopover.tsx +++ b/src/renderer/entities/wallet/ui/ExplorersPopover/ExplorersPopover.tsx @@ -1,9 +1,9 @@ import { type PropsWithChildren, type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type AccountId, type Address, type Explorer } from '@shared/core'; -import { cnTw, copyToClipboard, getAccountExplorer, toAddress } from '@shared/lib/utils'; -import { ContextMenu, ExplorerLink, HelpText, IconButton } from '@shared/ui'; +import { type AccountId, type Address, type Explorer } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, copyToClipboard, getAccountExplorer, toAddress } from '@/shared/lib/utils'; +import { ContextMenu, ExplorerLink, HelpText, IconButton } from '@/shared/ui'; type Props = { button: ReactNode; diff --git a/src/renderer/entities/wallet/ui/MultiAccountsList/MultiAccountsList.tsx b/src/renderer/entities/wallet/ui/MultiAccountsList/MultiAccountsList.tsx index 599046e5ab..501bd6bf90 100644 --- a/src/renderer/entities/wallet/ui/MultiAccountsList/MultiAccountsList.tsx +++ b/src/renderer/entities/wallet/ui/MultiAccountsList/MultiAccountsList.tsx @@ -1,9 +1,9 @@ -import { useI18n } from '@app/providers'; +import { type AccountId, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, toAddress } from '@/shared/lib/utils'; +import { FootnoteText } from '@/shared/ui'; import { AccountExplorers, Address } from '@/shared/ui-entities'; -import { type AccountId, type Chain } from '@shared/core'; -import { cnTw, toAddress } from '@shared/lib/utils'; -import { FootnoteText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; +import { ChainTitle } from '@/entities/chain'; type Props = { accounts: { diff --git a/src/renderer/entities/wallet/ui/MultishardAccountsList/MultishardAccountsList.tsx b/src/renderer/entities/wallet/ui/MultishardAccountsList/MultishardAccountsList.tsx index a5694b8681..59b6d028e0 100644 --- a/src/renderer/entities/wallet/ui/MultishardAccountsList/MultishardAccountsList.tsx +++ b/src/renderer/entities/wallet/ui/MultishardAccountsList/MultishardAccountsList.tsx @@ -1,11 +1,12 @@ import { useMemo } from 'react'; -import { useI18n } from '@app/providers'; -import { type BaseAccount, type Chain, type ChainAccount, type ChainId } from '@shared/core'; -import { RootExplorers, cnTw } from '@shared/lib/utils'; -import { Accordion, FootnoteText, HelpText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { ContactItem, ExplorersPopover } from '@entities/wallet'; +import { type BaseAccount, type Chain, type ChainAccount, type ChainId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { RootExplorers, cnTw } from '@/shared/lib/utils'; +import { Accordion, FootnoteText, HelpText } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { ContactItem } from '../ContactItem/ContactItem'; +import { ExplorersPopover } from '../ExplorersPopover/ExplorersPopover'; type Props = { chains: Chain[]; diff --git a/src/renderer/entities/wallet/ui/ProxyWalletAlert/ProxyWalletAlert.tsx b/src/renderer/entities/wallet/ui/ProxyWalletAlert/ProxyWalletAlert.tsx index eccec73e2f..28a31b4247 100644 --- a/src/renderer/entities/wallet/ui/ProxyWalletAlert/ProxyWalletAlert.tsx +++ b/src/renderer/entities/wallet/ui/ProxyWalletAlert/ProxyWalletAlert.tsx @@ -1,8 +1,8 @@ import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type Wallet } from '@shared/core'; -import { Alert, FootnoteText } from '@shared/ui'; +import { type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Alert, FootnoteText } from '@/shared/ui'; import { WalletIcon } from '../../index'; type Props = { diff --git a/src/renderer/entities/wallet/ui/VaultAccountsList/VaultAccountsList.tsx b/src/renderer/entities/wallet/ui/VaultAccountsList/VaultAccountsList.tsx index ee38ceb008..9dc7169b15 100644 --- a/src/renderer/entities/wallet/ui/VaultAccountsList/VaultAccountsList.tsx +++ b/src/renderer/entities/wallet/ui/VaultAccountsList/VaultAccountsList.tsx @@ -1,9 +1,11 @@ -import { useI18n } from '@app/providers'; -import { type Chain, type ChainAccount, type ChainId, type ShardAccount } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Accordion, FootnoteText, HelpText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { DerivedAccount, ExplorersPopover, accountUtils } from '@entities/wallet'; +import { type Chain, type ChainAccount, type ChainId, type ShardAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Accordion, FootnoteText, HelpText } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { accountUtils } from '../../lib/account-utils'; +import { DerivedAccount } from '../Cards/DerivedAccount'; +import { ExplorersPopover } from '../ExplorersPopover/ExplorersPopover'; type Props = { chains: Chain[]; diff --git a/src/renderer/entities/wallet/ui/WalletIcon/WalletIcon.tsx b/src/renderer/entities/wallet/ui/WalletIcon/WalletIcon.tsx index ce45380778..b89ad84bdc 100644 --- a/src/renderer/entities/wallet/ui/WalletIcon/WalletIcon.tsx +++ b/src/renderer/entities/wallet/ui/WalletIcon/WalletIcon.tsx @@ -1,6 +1,6 @@ -import { WalletType } from '@shared/core'; -import { Icon } from '@shared/ui'; -import { type IconNames } from '@shared/ui/Icon/data'; +import { WalletType } from '@/shared/core'; +import { Icon } from '@/shared/ui'; +import { type IconNames } from '@/shared/ui/Icon/data'; const WalletIconNames: Record = { [WalletType.POLKADOT_VAULT]: 'vaultBackground', diff --git a/src/renderer/entities/walletConnect/lib/__tests__/utils.test.ts b/src/renderer/entities/walletConnect/lib/__tests__/utils.test.ts index 301cc3c5dd..34c437ef76 100644 --- a/src/renderer/entities/walletConnect/lib/__tests__/utils.test.ts +++ b/src/renderer/entities/walletConnect/lib/__tests__/utils.test.ts @@ -1,6 +1,6 @@ import type Client from '@walletconnect/sign-client'; -import { type Chain } from '@shared/core'; +import { type Chain } from '@/shared/core'; import { walletConnectUtils } from '../utils'; describe('entities/walletConnect/lib/onChainUtils', () => { diff --git a/src/renderer/entities/walletConnect/lib/utils.ts b/src/renderer/entities/walletConnect/lib/utils.ts index a38654dc06..9af69beeca 100644 --- a/src/renderer/entities/walletConnect/lib/utils.ts +++ b/src/renderer/entities/walletConnect/lib/utils.ts @@ -1,7 +1,7 @@ import type Client from '@walletconnect/sign-client'; -import { type Chain, type ChainId, type Wallet } from '@shared/core'; -import { walletUtils } from '@entities/wallet'; +import { type Chain, type ChainId, type Wallet } from '@/shared/core'; +import { walletUtils } from '@/entities/wallet'; import { FIRST_CHAIN_ID_SYMBOL, LAST_CHAIN_ID_SYMBOL } from './constants'; diff --git a/src/renderer/entities/walletConnect/model/wallet-connect-model.ts b/src/renderer/entities/walletConnect/model/wallet-connect-model.ts index a128af64c4..ecb8f519de 100644 --- a/src/renderer/entities/walletConnect/model/wallet-connect-model.ts +++ b/src/renderer/entities/walletConnect/model/wallet-connect-model.ts @@ -4,11 +4,11 @@ import { getSdkError } from '@walletconnect/utils'; import { createEffect, createEvent, createStore, sample, scopeBind } from 'effector'; import keyBy from 'lodash/keyBy'; -import { localStorageService } from '@shared/api/local-storage'; -import { storageService } from '@shared/api/storage'; -import { type Account, type ID, type Wallet, type WcAccount, kernelModel } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { localStorageService } from '@/shared/api/local-storage'; +import { storageService } from '@/shared/api/storage'; +import { type Account, type ID, type Wallet, type WcAccount, kernelModel } from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { walletModel, walletUtils } from '@/entities/wallet'; import { DEFAULT_APP_METADATA, DEFAULT_LOGGER, diff --git a/src/renderer/entities/xcm/model/xcm-model.ts b/src/renderer/entities/xcm/model/xcm-model.ts index a49b0de4cc..35c8f4c86a 100644 --- a/src/renderer/entities/xcm/model/xcm-model.ts +++ b/src/renderer/entities/xcm/model/xcm-model.ts @@ -1,7 +1,7 @@ import { createEffect, sample } from 'effector'; -import { type XcmConfig, xcmService } from '@shared/api/xcm'; -import { kernelModel } from '@shared/core'; +import { type XcmConfig, xcmService } from '@/shared/api/xcm'; +import { kernelModel } from '@/shared/core'; const getConfigFx = createEffect((): XcmConfig | null => { return xcmService.getXcmConfig(); diff --git a/src/renderer/features/assets/AssetRouteGuard/model/asset-guard.ts b/src/renderer/features/assets/AssetRouteGuard/model/asset-guard.ts index de5c0e13e0..41fa51d14c 100644 --- a/src/renderer/features/assets/AssetRouteGuard/model/asset-guard.ts +++ b/src/renderer/features/assets/AssetRouteGuard/model/asset-guard.ts @@ -1,8 +1,8 @@ import { attach, createApi, createEffect, createEvent, createStore, sample } from 'effector'; import { type NavigateFunction } from 'react-router-dom'; -import { chainsService } from '@shared/api/network'; -import { type Asset, type Chain, type ChainId } from '@shared/core'; +import { chainsService } from '@/shared/api/network'; +import { type Asset, type Chain, type ChainId } from '@/shared/core'; const validateUrlParams = createEvent(); const storeCleared = createEvent(); diff --git a/src/renderer/features/assets/AssetRouteGuard/ui/AssetRouteGuard.tsx b/src/renderer/features/assets/AssetRouteGuard/ui/AssetRouteGuard.tsx index 47d5a19da4..31ee1cd126 100644 --- a/src/renderer/features/assets/AssetRouteGuard/ui/AssetRouteGuard.tsx +++ b/src/renderer/features/assets/AssetRouteGuard/ui/AssetRouteGuard.tsx @@ -2,7 +2,7 @@ import { useUnit } from 'effector-react'; import { type ReactNode, useEffect } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; -import { type Asset, type Chain } from '@shared/core'; +import { type Asset, type Chain } from '@/shared/core'; import * as assetGuardModel from '../model/asset-guard'; type Props = { diff --git a/src/renderer/features/assets/AssetsChainView/lib/utils.ts b/src/renderer/features/assets/AssetsChainView/lib/utils.ts index 58cae122a7..cbb55fb2c7 100644 --- a/src/renderer/features/assets/AssetsChainView/lib/utils.ts +++ b/src/renderer/features/assets/AssetsChainView/lib/utils.ts @@ -1,8 +1,8 @@ import { default as BigNumber } from 'bignumber.js'; -import { type PriceObject } from '@shared/api/price-provider'; -import { type Asset, type Balance } from '@shared/core'; -import { getBalanceBn, totalAmount } from '@shared/lib/utils'; +import { type PriceObject } from '@/shared/api/price-provider'; +import { type Asset, type Balance } from '@/shared/core'; +import { getBalanceBn, totalAmount } from '@/shared/lib/utils'; export const balanceSorter = ( first: Asset, diff --git a/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.test.tsx b/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.test.tsx index 5bc97fb415..f3a09f5f0b 100644 --- a/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.test.tsx +++ b/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.test.tsx @@ -4,14 +4,14 @@ import { fork } from 'effector'; import { Provider } from 'effector-react'; import { BrowserRouter } from 'react-router-dom'; -import chains from '@shared/config/chains/chains.json'; -import { type Asset, type Balance, type Chain, WalletType } from '@shared/core'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; -import { walletModel } from '@entities/wallet'; +import chains from '@/shared/config/chains/chains.json'; +import { type Asset, type Balance, type Chain, WalletType } from '@/shared/core'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; +import { walletModel } from '@/entities/wallet'; import { AssetCard } from './AssetCard'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.tsx b/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.tsx index 54c403f7db..0271f4fd08 100644 --- a/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.tsx +++ b/src/renderer/features/assets/AssetsChainView/ui/AssetCard/AssetCard.tsx @@ -1,13 +1,13 @@ import { useUnit } from 'effector-react'; import { type KeyboardEvent } from 'react'; -import { useI18n } from '@app/providers'; -import { type Asset, type Balance, type ChainId } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { KeyboardKey, cnTw, totalAmount, transferableAmount } from '@shared/lib/utils'; -import { BodyText, Shimmering } from '@shared/ui'; -import { AssetBalance, AssetDetails, AssetIcon, AssetLinks } from '@entities/asset'; -import { AssetFiatBalance, TokenPrice, priceProviderModel } from '@entities/price'; +import { type Asset, type Balance, type ChainId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { KeyboardKey, cnTw, totalAmount, transferableAmount } from '@/shared/lib/utils'; +import { BodyText, Shimmering } from '@/shared/ui'; +import { AssetBalance, AssetDetails, AssetIcon, AssetLinks } from '@/entities/asset'; +import { AssetFiatBalance, TokenPrice, priceProviderModel } from '@/entities/price'; type Props = { chainId: ChainId; diff --git a/src/renderer/features/assets/AssetsChainView/ui/AssetsChainView.tsx b/src/renderer/features/assets/AssetsChainView/ui/AssetsChainView.tsx index 8955764501..391f2b4c9d 100644 --- a/src/renderer/features/assets/AssetsChainView/ui/AssetsChainView.tsx +++ b/src/renderer/features/assets/AssetsChainView/ui/AssetsChainView.tsx @@ -1,14 +1,14 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { chainsService } from '@shared/api/network'; -import { type Account, type Chain } from '@shared/core'; -import { isStringsMatchQuery } from '@shared/lib/utils'; -import { AssetsListView, EmptyAssetsState } from '@entities/asset'; -import { balanceModel } from '@entities/balance'; -import { networkModel, networkUtils } from '@entities/network'; -import { currencyModel, priceProviderModel } from '@entities/price'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +import { chainsService } from '@/shared/api/network'; +import { type Account, type Chain } from '@/shared/core'; +import { isStringsMatchQuery } from '@/shared/lib/utils'; +import { AssetsListView, EmptyAssetsState } from '@/entities/asset'; +import { balanceModel } from '@/entities/balance'; +import { networkModel, networkUtils } from '@/entities/network'; +import { currencyModel, priceProviderModel } from '@/entities/price'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { NetworkAssets } from './NetworkAssets/NetworkAssets'; diff --git a/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.test.tsx b/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.test.tsx index 51b771a6b2..709a2a27df 100644 --- a/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.test.tsx +++ b/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.test.tsx @@ -2,11 +2,11 @@ import { act, render, screen } from '@testing-library/react'; import { fork } from 'effector'; import { Provider } from 'effector-react'; -import chains from '@shared/config/chains/chains.json'; -import { type BaseAccount, type Chain, type ChainAccount, type ShardAccount } from '@shared/core'; -import { AccountType, ChainType, CryptoType } from '@shared/core'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; +import chains from '@/shared/config/chains/chains.json'; +import { type BaseAccount, type Chain, type ChainAccount, type ShardAccount } from '@/shared/core'; +import { AccountType, ChainType, CryptoType } from '@/shared/core'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; import { NetworkAssets } from './NetworkAssets'; @@ -14,7 +14,7 @@ const testChain = chains.find((chain) => chain.assets.length > 1) as Chain; const testAsset = testChain.assets[0]; const testAsset2 = testChain.assets[1]; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.tsx b/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.tsx index 5123c5cd05..8079a40042 100644 --- a/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.tsx +++ b/src/renderer/features/assets/AssetsChainView/ui/NetworkAssets/NetworkAssets.tsx @@ -2,16 +2,16 @@ import { useUnit } from 'effector-react'; import groupBy from 'lodash/groupBy'; import { useEffect, useMemo, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { sumBalances } from '@shared/api/network/service/chainsService'; -import { type Account, type AccountId, type Asset, type Balance, type Chain } from '@shared/core'; -import { ZERO_BALANCE, cnTw, includes, totalAmount } from '@shared/lib/utils'; -import { Accordion, CaptionText, Icon, Tooltip } from '@shared/ui'; -import { balanceModel } from '@entities/balance'; -import { ChainTitle } from '@entities/chain'; -import { type ExtendedChain } from '@entities/network'; -import { currencyModel, priceProviderModel } from '@entities/price'; -import { accountUtils } from '@entities/wallet'; +import { sumBalances } from '@/shared/api/network/service/chainsService'; +import { type Account, type AccountId, type Asset, type Balance, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { ZERO_BALANCE, cnTw, includes, totalAmount } from '@/shared/lib/utils'; +import { Accordion, CaptionText, Icon, Tooltip } from '@/shared/ui'; +import { balanceModel } from '@/entities/balance'; +import { ChainTitle } from '@/entities/chain'; +import { type ExtendedChain } from '@/entities/network'; +import { currencyModel, priceProviderModel } from '@/entities/price'; +import { accountUtils } from '@/entities/wallet'; import { balanceSorter } from '../../lib/utils'; import { AssetCard } from '../AssetCard/AssetCard'; import { NetworkFiatBalance } from '../NetworkFiatBalance'; diff --git a/src/renderer/features/assets/AssetsChainView/ui/NetworkFiatBalance.tsx b/src/renderer/features/assets/AssetsChainView/ui/NetworkFiatBalance.tsx index d71ddfc011..d9b5eb9c66 100644 --- a/src/renderer/features/assets/AssetsChainView/ui/NetworkFiatBalance.tsx +++ b/src/renderer/features/assets/AssetsChainView/ui/NetworkFiatBalance.tsx @@ -2,11 +2,10 @@ import BN from 'bignumber.js'; import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type Asset, type Balance } from '@shared/core'; -import { formatFiatBalance, getRoundedValue, totalAmount } from '@shared/lib/utils'; -import { currencyModel, priceProviderModel } from '@entities/price'; -import { FiatBalance } from '@entities/price/ui/FiatBalance'; +import { type Asset, type Balance } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { formatFiatBalance, getRoundedValue, totalAmount } from '@/shared/lib/utils'; +import { FiatBalance, currencyModel, priceProviderModel } from '@/entities/price'; type Props = { assets: Asset[]; diff --git a/src/renderer/features/assets/AssetsPortfolioView/lib/tokensService.ts b/src/renderer/features/assets/AssetsPortfolioView/lib/tokensService.ts index e729991f27..bcaf8c3b91 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/lib/tokensService.ts +++ b/src/renderer/features/assets/AssetsPortfolioView/lib/tokensService.ts @@ -1,11 +1,11 @@ import { default as BigNumber } from 'bignumber.js'; import { concat, orderBy, sortBy } from 'lodash'; -import { isKusama, isNameStartsWithNumber, isPolkadot } from '@shared/api/network/lib/utils'; -import { sumValues } from '@shared/api/network/service/chainsService'; -import { type PriceObject } from '@shared/api/price-provider'; -import tokensProd from '@shared/config/tokens/tokens.json'; -import tokensDev from '@shared/config/tokens/tokens_dev.json'; +import { isKusama, isNameStartsWithNumber, isPolkadot } from '@/shared/api/network/lib/utils'; +import { sumValues } from '@/shared/api/network/service/chainsService'; +import { type PriceObject } from '@/shared/api/price-provider'; +import tokensProd from '@/shared/config/tokens/tokens.json'; +import tokensDev from '@/shared/config/tokens/tokens_dev.json'; import { type Account, type AccountId, @@ -13,10 +13,10 @@ import { type AssetByChains, type Balance, type ChainId, -} from '@shared/core'; -import { ZERO_BALANCE, getBalanceBn, totalAmount } from '@shared/lib/utils'; -import { balanceUtils } from '@entities/balance'; -import { accountUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { ZERO_BALANCE, getBalanceBn, totalAmount } from '@/shared/lib/utils'; +import { balanceUtils } from '@/entities/balance'; +import { accountUtils } from '@/entities/wallet'; import { type AssetByChainsWithBalance, type AssetByChainsWithFiatBalance, type AssetChain } from './types'; diff --git a/src/renderer/features/assets/AssetsPortfolioView/lib/types.ts b/src/renderer/features/assets/AssetsPortfolioView/lib/types.ts index 6e38b33534..fa941b68ce 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/lib/types.ts +++ b/src/renderer/features/assets/AssetsPortfolioView/lib/types.ts @@ -1,6 +1,6 @@ import { type default as BigNumber } from 'bignumber.js'; -import { type AssetBalance, type AssetByChains, type ChainId } from '@shared/core'; +import { type AssetBalance, type AssetByChains, type ChainId } from '@/shared/core'; export type AssetChain = { chainId: ChainId; diff --git a/src/renderer/features/assets/AssetsPortfolioView/model/__tests__/portfolio-model.test.ts b/src/renderer/features/assets/AssetsPortfolioView/model/__tests__/portfolio-model.test.ts index 282dc85244..f8ff7f4184 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/model/__tests__/portfolio-model.test.ts +++ b/src/renderer/features/assets/AssetsPortfolioView/model/__tests__/portfolio-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { type AssetByChains } from '@shared/core'; -import { AssetsListView } from '@entities/asset'; +import { type AssetByChains } from '@/shared/core'; +import { AssetsListView } from '@/entities/asset'; import { portfolioModel } from '../portfolio-model'; const mockTokens = [ diff --git a/src/renderer/features/assets/AssetsPortfolioView/model/portfolio-model.ts b/src/renderer/features/assets/AssetsPortfolioView/model/portfolio-model.ts index 0ffde8c030..b263571d31 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/model/portfolio-model.ts +++ b/src/renderer/features/assets/AssetsPortfolioView/model/portfolio-model.ts @@ -1,13 +1,13 @@ import { createEffect, createEvent, createStore, restore, sample } from 'effector'; import { once } from 'patronum'; -import { type Account, type AssetByChains, type Balance, type Chain, type ChainId, type Wallet } from '@shared/core'; -import { includes } from '@shared/lib/utils'; -import { AssetsListView } from '@entities/asset'; -import { balanceModel } from '@entities/balance'; -import { networkModel, networkUtils } from '@entities/network'; -import { currencyModel, priceProviderModel } from '@entities/price'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +import { type Account, type AssetByChains, type Balance, type Chain, type ChainId, type Wallet } from '@/shared/core'; +import { includes } from '@/shared/lib/utils'; +import { AssetsListView } from '@/entities/asset'; +import { balanceModel } from '@/entities/balance'; +import { networkModel, networkUtils } from '@/entities/network'; +import { currencyModel, priceProviderModel } from '@/entities/price'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { tokensService } from '../lib/tokensService'; const activeViewChanged = createEvent(); diff --git a/src/renderer/features/assets/AssetsPortfolioView/ui/AssembledAssetAmount.tsx b/src/renderer/features/assets/AssetsPortfolioView/ui/AssembledAssetAmount.tsx index 8e9b144a56..618ea04ed3 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/ui/AssembledAssetAmount.tsx +++ b/src/renderer/features/assets/AssetsPortfolioView/ui/AssembledAssetAmount.tsx @@ -2,12 +2,12 @@ import { useUnit } from 'effector-react'; import { type PropsWithChildren } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type AssetByChains, type AssetBalance as Balance } from '@shared/core'; -import { totalAmount, transferableAmount } from '@shared/lib/utils'; -import { Shimmering, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { AssetFiatBalance, priceProviderModel } from '@entities/price'; +import { type AssetByChains, type AssetBalance as Balance } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { totalAmount, transferableAmount } from '@/shared/lib/utils'; +import { Shimmering, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; type Props = PropsWithChildren & { asset: AssetByChains; diff --git a/src/renderer/features/assets/AssetsPortfolioView/ui/AssetsPortfolioView.tsx b/src/renderer/features/assets/AssetsPortfolioView/ui/AssetsPortfolioView.tsx index 8cbfdd5f40..c806e59b58 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/ui/AssetsPortfolioView.tsx +++ b/src/renderer/features/assets/AssetsPortfolioView/ui/AssetsPortfolioView.tsx @@ -1,11 +1,11 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type Wallet, WalletType } from '@shared/core'; -import { FootnoteText } from '@shared/ui'; -import { AssetsListView, EmptyAssetsState } from '@entities/asset'; -import { priceProviderModel } from '@entities/price'; -import { walletModel } from '@entities/wallet'; +import { type Wallet, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText } from '@/shared/ui'; +import { AssetsListView, EmptyAssetsState } from '@/entities/asset'; +import { priceProviderModel } from '@/entities/price'; +import { walletModel } from '@/entities/wallet'; import { portfolioModel } from '../model/portfolio-model'; import { TokenBalance } from './TokenBalance'; diff --git a/src/renderer/features/assets/AssetsPortfolioView/ui/NetworkCard.tsx b/src/renderer/features/assets/AssetsPortfolioView/ui/NetworkCard.tsx index 6748f240ca..78bfdb06b6 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/ui/NetworkCard.tsx +++ b/src/renderer/features/assets/AssetsPortfolioView/ui/NetworkCard.tsx @@ -1,10 +1,10 @@ import { useUnit } from 'effector-react'; -import { type AssetByChains } from '@shared/core'; -import { BodyText, FootnoteText } from '@shared/ui'; -import { AssetLinks } from '@entities/asset'; -import { ChainIcon } from '@entities/chain'; -import { networkModel } from '@entities/network'; +import { type AssetByChains } from '@/shared/core'; +import { BodyText, FootnoteText } from '@/shared/ui'; +import { AssetLinks } from '@/entities/asset'; +import { ChainIcon } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; import { type AssetChain } from '../lib/types'; import { AssembledAssetAmount } from './AssembledAssetAmount'; diff --git a/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalance.tsx b/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalance.tsx index b862732987..417ee432c6 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalance.tsx +++ b/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalance.tsx @@ -1,12 +1,12 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type AssetByChains } from '@shared/core'; -import { BodyText, CaptionText, FootnoteText, Icon, Plate, Tooltip } from '@shared/ui'; -import { AssetIcon, AssetLinks } from '@entities/asset'; -import { ChainIcon } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { TokenPrice } from '@entities/price'; +import { type AssetByChains } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, CaptionText, FootnoteText, Icon, Plate, Tooltip } from '@/shared/ui'; +import { AssetIcon, AssetLinks } from '@/entities/asset'; +import { ChainIcon } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { TokenPrice } from '@/entities/price'; import { AssembledAssetAmount } from './AssembledAssetAmount'; diff --git a/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalanceList.tsx b/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalanceList.tsx index 0bb06d8fcf..485fd576fa 100644 --- a/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalanceList.tsx +++ b/src/renderer/features/assets/AssetsPortfolioView/ui/TokenBalanceList.tsx @@ -1,13 +1,13 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type AssetByChains } from '@shared/core'; -import { Accordion, BodyText, FootnoteText, HelpText, Icon, IconButton, Plate, Tooltip } from '@shared/ui'; -import { AssetIcon } from '@entities/asset'; -import { ChainIcon } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { TokenPrice } from '@entities/price'; -import { CheckPermission, OperationType, walletModel } from '@entities/wallet'; +import { type AssetByChains } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Accordion, BodyText, FootnoteText, HelpText, Icon, IconButton, Plate, Tooltip } from '@/shared/ui'; +import { AssetIcon } from '@/entities/asset'; +import { ChainIcon } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { TokenPrice } from '@/entities/price'; +import { CheckPermission, OperationType, walletModel } from '@/entities/wallet'; import { portfolioModel } from '../model/portfolio-model'; import { AssembledAssetAmount } from './AssembledAssetAmount'; diff --git a/src/renderer/features/assets/AssetsSearch/ui/AssetsSearch.tsx b/src/renderer/features/assets/AssetsSearch/ui/AssetsSearch.tsx index 0d9ae33fc0..c7883742ac 100644 --- a/src/renderer/features/assets/AssetsSearch/ui/AssetsSearch.tsx +++ b/src/renderer/features/assets/AssetsSearch/ui/AssetsSearch.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { SearchInput } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { SearchInput } from '@/shared/ui'; import { assetsSearchModel } from '../model/assets-search-model'; export const AssetsSearch = () => { diff --git a/src/renderer/features/assets/AssetsSettings/model/__tests__/assets-settings-modal.test.ts b/src/renderer/features/assets/AssetsSettings/model/__tests__/assets-settings-modal.test.ts index a78f4801b9..e6281a601f 100644 --- a/src/renderer/features/assets/AssetsSettings/model/__tests__/assets-settings-modal.test.ts +++ b/src/renderer/features/assets/AssetsSettings/model/__tests__/assets-settings-modal.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { localStorageService } from '@shared/api/local-storage'; -import { AssetsListView } from '@entities/asset'; +import { localStorageService } from '@/shared/api/local-storage'; +import { AssetsListView } from '@/entities/asset'; import { assetsSettingsModel } from '../assets-settings-modal'; describe('features/assets/AssetsSettings/model/assets-settings-model', () => { diff --git a/src/renderer/features/assets/AssetsSettings/model/assets-settings-modal.ts b/src/renderer/features/assets/AssetsSettings/model/assets-settings-modal.ts index fadb255088..17618b9416 100644 --- a/src/renderer/features/assets/AssetsSettings/model/assets-settings-modal.ts +++ b/src/renderer/features/assets/AssetsSettings/model/assets-settings-modal.ts @@ -1,7 +1,7 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { localStorageService } from '@shared/api/local-storage'; -import { AssetsListView } from '@entities/asset'; +import { localStorageService } from '@/shared/api/local-storage'; +import { AssetsListView } from '@/entities/asset'; import { ASSETS_PAGE_VIEW, HIDE_ZERO_BALANCES } from '../lib/constants'; const hideZeroBalancesChanged = createEvent(); diff --git a/src/renderer/features/assets/AssetsSettings/ui/AssetsSettings.tsx b/src/renderer/features/assets/AssetsSettings/ui/AssetsSettings.tsx index ae05bb9d6b..17f9f71ea6 100644 --- a/src/renderer/features/assets/AssetsSettings/ui/AssetsSettings.tsx +++ b/src/renderer/features/assets/AssetsSettings/ui/AssetsSettings.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { FootnoteText, IconButton, MenuPopover, Select, Switch } from '@shared/ui'; -import { AssetsListView } from '@entities/asset'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, IconButton, MenuPopover, Select, Switch } from '@/shared/ui'; +import { AssetsListView } from '@/entities/asset'; import { assetsSettingsModel } from '../model/assets-settings-modal'; export const AssetsSettings = () => { diff --git a/src/renderer/features/assets/index.ts b/src/renderer/features/assets/index.ts index bee27dea91..ff2534b318 100644 --- a/src/renderer/features/assets/index.ts +++ b/src/renderer/features/assets/index.ts @@ -2,4 +2,4 @@ export { AssetRouteGuard } from './AssetRouteGuard'; export { AssetsChainView } from './AssetsChainView'; export { AssetsSettings, assetsSettingsModel } from './AssetsSettings'; export { assetsSearchModel, AssetsSearch } from './AssetsSearch'; -export { AssetsPortfolioView, portfolioModel } from './AssetsPortfolioView'; +export { AssetsPortfolioView, portfolioModel, type AssetChain } from './AssetsPortfolioView'; diff --git a/src/renderer/features/balances/subscription/lib/balance-sub-utils.ts b/src/renderer/features/balances/subscription/lib/balance-sub-utils.ts index 61da73cd0b..fe50a46242 100644 --- a/src/renderer/features/balances/subscription/lib/balance-sub-utils.ts +++ b/src/renderer/features/balances/subscription/lib/balance-sub-utils.ts @@ -1,8 +1,8 @@ import uniqBy from 'lodash/uniqBy'; -import { type Account, type Chain, type ChainId, type ID, type MultisigAccount, type Wallet } from '@shared/core'; -import { dictionary } from '@shared/lib/utils'; -import { accountUtils, walletUtils } from '@entities/wallet'; +import { type Account, type Chain, type ChainId, type ID, type MultisigAccount, type Wallet } from '@/shared/core'; +import { dictionary } from '@/shared/lib/utils'; +import { accountUtils, walletUtils } from '@/entities/wallet'; import { type SubAccounts } from './types'; diff --git a/src/renderer/features/balances/subscription/lib/types.ts b/src/renderer/features/balances/subscription/lib/types.ts index 188e90e17e..62f4cd2429 100644 --- a/src/renderer/features/balances/subscription/lib/types.ts +++ b/src/renderer/features/balances/subscription/lib/types.ts @@ -1,6 +1,6 @@ import { type UnsubscribePromise } from '@polkadot/api/types'; -import { type AccountId, type ChainId, type ID } from '@shared/core'; +import { type AccountId, type ChainId, type ID } from '@/shared/core'; export type Subscriptions = { [chainId: ChainId]: { [walletId: ID]: UnsubscribePromise[] } | undefined; diff --git a/src/renderer/features/balances/subscription/model/__tests__/balance-sub-model.test.ts b/src/renderer/features/balances/subscription/model/__tests__/balance-sub-model.test.ts index 51e2044592..8441392548 100644 --- a/src/renderer/features/balances/subscription/model/__tests__/balance-sub-model.test.ts +++ b/src/renderer/features/balances/subscription/model/__tests__/balance-sub-model.test.ts @@ -1,11 +1,11 @@ import { type Scope, allSettled, fork } from 'effector'; -import { balanceService } from '@shared/api/balances'; -import { storageService } from '@shared/api/storage'; -import { type Balance, ConnectionStatus } from '@shared/core'; -import { balanceModel } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { walletModel } from '@entities/wallet'; +import { balanceService } from '@/shared/api/balances'; +import { storageService } from '@/shared/api/storage'; +import { type Balance, ConnectionStatus } from '@/shared/core'; +import { balanceModel } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { walletModel } from '@/entities/wallet'; import { balanceSubModel } from '../balance-sub-model'; import { balanceSubMock } from './mocks/balance-sub-mock'; diff --git a/src/renderer/features/balances/subscription/model/__tests__/mocks/balance-sub-mock.ts b/src/renderer/features/balances/subscription/model/__tests__/mocks/balance-sub-mock.ts index 9267147707..bbd5780dff 100644 --- a/src/renderer/features/balances/subscription/model/__tests__/mocks/balance-sub-mock.ts +++ b/src/renderer/features/balances/subscription/model/__tests__/mocks/balance-sub-mock.ts @@ -1,5 +1,5 @@ -import { type Account, AccountType, type Chain, type ChainId, CryptoType, type Wallet } from '@shared/core'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; +import { type Account, AccountType, type Chain, type ChainId, CryptoType, type Wallet } from '@/shared/core'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; const accounts = [ { diff --git a/src/renderer/features/balances/subscription/model/balance-sub-model.ts b/src/renderer/features/balances/subscription/model/balance-sub-model.ts index 4b4315cb58..9cf9b6521b 100644 --- a/src/renderer/features/balances/subscription/model/balance-sub-model.ts +++ b/src/renderer/features/balances/subscription/model/balance-sub-model.ts @@ -3,8 +3,8 @@ import { attach, createEffect, createEvent, createStore, sample, scopeBind } fro import mapValues from 'lodash/mapValues'; import { combineEvents, once, previous, spread } from 'patronum'; -import { balanceService } from '@shared/api/balances'; -import { storageService } from '@shared/api/storage'; +import { balanceService } from '@/shared/api/balances'; +import { storageService } from '@/shared/api/storage'; import { type AccountId, type Balance, @@ -13,11 +13,11 @@ import { type ConnectionStatus, type ID, type Wallet, -} from '@shared/core'; -import { isFulfilled } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel, networkUtils } from '@entities/network'; -import { walletModel } from '@entities/wallet'; +} from '@/shared/core'; +import { isFulfilled } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel, networkUtils } from '@/entities/network'; +import { walletModel } from '@/entities/wallet'; import { balanceSubUtils } from '../lib/balance-sub-utils'; import { type SubAccounts, type Subscriptions } from '../lib/types'; diff --git a/src/renderer/features/basket/BasketFilter/common/types.ts b/src/renderer/features/basket/BasketFilter/common/types.ts index cd8a2299d0..d29cafc862 100644 --- a/src/renderer/features/basket/BasketFilter/common/types.ts +++ b/src/renderer/features/basket/BasketFilter/common/types.ts @@ -1,4 +1,4 @@ -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; export type FilterName = 'status' | 'network' | 'type'; diff --git a/src/renderer/features/basket/BasketFilter/lib/constants.ts b/src/renderer/features/basket/BasketFilter/lib/constants.ts index e94d8070c9..d81c946806 100644 --- a/src/renderer/features/basket/BasketFilter/lib/constants.ts +++ b/src/renderer/features/basket/BasketFilter/lib/constants.ts @@ -1,4 +1,4 @@ -import { TransactionType } from '@shared/core'; +import { TransactionType } from '@/shared/core'; export const UNKNOWN_TYPE = 'UNKNOWN_TYPE'; diff --git a/src/renderer/features/basket/BasketFilter/lib/utils.ts b/src/renderer/features/basket/BasketFilter/lib/utils.ts index a2a8216d44..b95e622842 100644 --- a/src/renderer/features/basket/BasketFilter/lib/utils.ts +++ b/src/renderer/features/basket/BasketFilter/lib/utils.ts @@ -1,8 +1,8 @@ import { type TFunction } from 'i18next'; -import { type BasketTransaction, type Chain, TransactionType } from '@shared/core'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; -import { XcmTypes, findCoreBatchAll } from '@entities/transaction'; +import { type BasketTransaction, type Chain, TransactionType } from '@/shared/core'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; +import { XcmTypes, findCoreBatchAll } from '@/entities/transaction'; import { type SelectedFilters } from '../common/types'; import { TransferTypes, TxStatus, UNKNOWN_TYPE } from './constants'; diff --git a/src/renderer/features/basket/BasketFilter/model/baket-filter-model.ts b/src/renderer/features/basket/BasketFilter/model/baket-filter-model.ts index d9190f01f9..b120dc6e6d 100644 --- a/src/renderer/features/basket/BasketFilter/model/baket-filter-model.ts +++ b/src/renderer/features/basket/BasketFilter/model/baket-filter-model.ts @@ -1,7 +1,7 @@ import { combine, createEvent, restore } from 'effector'; -import { basketModel } from '@entities/basket'; -import { walletModel } from '@entities/wallet'; +import { basketModel } from '@/entities/basket'; +import { walletModel } from '@/entities/wallet'; import { type SelectedFilters } from '../common/types'; import { filterTx } from '../lib/utils'; diff --git a/src/renderer/features/basket/BasketFilter/ui/BasketFilter.tsx b/src/renderer/features/basket/BasketFilter/ui/BasketFilter.tsx index 9d2f785195..1d09b9a527 100644 --- a/src/renderer/features/basket/BasketFilter/ui/BasketFilter.tsx +++ b/src/renderer/features/basket/BasketFilter/ui/BasketFilter.tsx @@ -1,10 +1,10 @@ import { useStoreMap, useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, MultiSelect } from '@shared/ui'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; -import { networkModel } from '@entities/network'; +import { useI18n } from '@/shared/i18n'; +import { Button, MultiSelect } from '@/shared/ui'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; +import { networkModel } from '@/entities/network'; import { type FilterName, type FiltersOptions } from '../common/types'; import { getAvailableFiltersOptions } from '../lib/utils'; import { basketFilterModel } from '../model/baket-filter-model'; diff --git a/src/renderer/features/basket/index.ts b/src/renderer/features/basket/index.ts new file mode 100644 index 0000000000..e943792282 --- /dev/null +++ b/src/renderer/features/basket/index.ts @@ -0,0 +1 @@ +export { BasketFilter, basketFilterModel } from './BasketFilter'; diff --git a/src/renderer/features/contacts/ContactFilter/model/__tests__/contact-filter.test.tsx b/src/renderer/features/contacts/ContactFilter/model/__tests__/contact-filter.test.tsx index 7684a09e27..fef17daca1 100644 --- a/src/renderer/features/contacts/ContactFilter/model/__tests__/contact-filter.test.tsx +++ b/src/renderer/features/contacts/ContactFilter/model/__tests__/contact-filter.test.tsx @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { contactModel } from '@entities/contact'; +import { contactModel } from '@/entities/contact'; import { filterModel } from '../contact-filter'; const contacts = [ diff --git a/src/renderer/features/contacts/ContactFilter/model/contact-filter.ts b/src/renderer/features/contacts/ContactFilter/model/contact-filter.ts index a6a588727f..a80b197fe6 100644 --- a/src/renderer/features/contacts/ContactFilter/model/contact-filter.ts +++ b/src/renderer/features/contacts/ContactFilter/model/contact-filter.ts @@ -1,7 +1,7 @@ import { combine, createEvent, createStore, sample } from 'effector'; -import { includes } from '@shared/lib/utils'; -import { contactModel } from '@entities/contact'; +import { includes } from '@/shared/lib/utils'; +import { contactModel } from '@/entities/contact'; const formInitiated = createEvent(); diff --git a/src/renderer/features/contacts/ContactFilter/ui/ContactFilter.tsx b/src/renderer/features/contacts/ContactFilter/ui/ContactFilter.tsx index c5e187b142..a82ae8f556 100644 --- a/src/renderer/features/contacts/ContactFilter/ui/ContactFilter.tsx +++ b/src/renderer/features/contacts/ContactFilter/ui/ContactFilter.tsx @@ -1,7 +1,7 @@ import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { SearchInput } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { SearchInput } from '@/shared/ui'; import { filterModel } from '../model/contact-filter'; export const ContactFilter = () => { diff --git a/src/renderer/features/contacts/CreateContactForm/model/contact-form.ts b/src/renderer/features/contacts/CreateContactForm/model/contact-form.ts index 4c1abef32a..e5c39e4d61 100644 --- a/src/renderer/features/contacts/CreateContactForm/model/contact-form.ts +++ b/src/renderer/features/contacts/CreateContactForm/model/contact-form.ts @@ -1,9 +1,9 @@ import { attach, createApi, createStore, sample } from 'effector'; import { createForm } from 'effector-forms'; -import { type Contact } from '@shared/core'; -import { toAccountId, validateAddress } from '@shared/lib/utils'; -import { contactModel } from '@entities/contact'; +import { type Contact } from '@/shared/core'; +import { toAccountId, validateAddress } from '@/shared/lib/utils'; +import { contactModel } from '@/entities/contact'; export type Callbacks = { onSubmit: () => void; diff --git a/src/renderer/features/contacts/CreateContactForm/ui/CreateContactForm.tsx b/src/renderer/features/contacts/CreateContactForm/ui/CreateContactForm.tsx index 5f17a4f770..6c01193497 100644 --- a/src/renderer/features/contacts/CreateContactForm/ui/CreateContactForm.tsx +++ b/src/renderer/features/contacts/CreateContactForm/ui/CreateContactForm.tsx @@ -2,8 +2,8 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, Icon, Identicon, Input, InputHint } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Button, Icon, Identicon, Input, InputHint } from '@/shared/ui'; import { type Callbacks, createFormModel } from '../model/contact-form'; type Props = Callbacks; diff --git a/src/renderer/features/contacts/CreateContactForm/ui/CreateContactNavigation.tsx b/src/renderer/features/contacts/CreateContactForm/ui/CreateContactNavigation.tsx index f2c8f9fed8..464da13d76 100644 --- a/src/renderer/features/contacts/CreateContactForm/ui/CreateContactNavigation.tsx +++ b/src/renderer/features/contacts/CreateContactForm/ui/CreateContactNavigation.tsx @@ -1,8 +1,8 @@ import { useNavigate } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { Paths } from '@shared/routes'; -import { Button } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Paths } from '@/shared/routes'; +import { Button } from '@/shared/ui'; export const CreateContactNavigation = () => { const { t } = useI18n(); diff --git a/src/renderer/features/contacts/EditContactForm/model/contact-form.ts b/src/renderer/features/contacts/EditContactForm/model/contact-form.ts index 241098c4bb..dc6926d70e 100644 --- a/src/renderer/features/contacts/EditContactForm/model/contact-form.ts +++ b/src/renderer/features/contacts/EditContactForm/model/contact-form.ts @@ -2,9 +2,9 @@ import { attach, combine, createApi, createStore, sample } from 'effector'; import { createForm } from 'effector-forms'; import { not } from 'patronum'; -import { type Contact } from '@shared/core'; -import { toAccountId, validateAddress } from '@shared/lib/utils'; -import { contactModel } from '@entities/contact'; +import { type Contact } from '@/shared/core'; +import { toAccountId, validateAddress } from '@/shared/lib/utils'; +import { contactModel } from '@/entities/contact'; export type Callbacks = { onSubmit: () => void; diff --git a/src/renderer/features/contacts/EditContactForm/ui/EditContactForm.tsx b/src/renderer/features/contacts/EditContactForm/ui/EditContactForm.tsx index ffcb293609..9c16c6ed14 100644 --- a/src/renderer/features/contacts/EditContactForm/ui/EditContactForm.tsx +++ b/src/renderer/features/contacts/EditContactForm/ui/EditContactForm.tsx @@ -2,9 +2,9 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { type Contact } from '@shared/core'; -import { Button, Icon, Identicon, Input, InputHint } from '@shared/ui'; +import { type Contact } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button, Icon, Identicon, Input, InputHint } from '@/shared/ui'; import { type Callbacks, editFormModel } from '../model/contact-form'; type Props = Callbacks & { diff --git a/src/renderer/features/contacts/EditContactForm/ui/EditContactNavigation.tsx b/src/renderer/features/contacts/EditContactForm/ui/EditContactNavigation.tsx index 2d5494a136..61b658f1b8 100644 --- a/src/renderer/features/contacts/EditContactForm/ui/EditContactNavigation.tsx +++ b/src/renderer/features/contacts/EditContactForm/ui/EditContactNavigation.tsx @@ -1,8 +1,8 @@ import { useNavigate } from 'react-router-dom'; -import { type Contact } from '@shared/core'; -import { Paths, createLink } from '@shared/routes'; -import { IconButton } from '@shared/ui'; +import { type Contact } from '@/shared/core'; +import { Paths, createLink } from '@/shared/routes'; +import { IconButton } from '@/shared/ui'; type Props = { contactId: Contact['id']; diff --git a/src/renderer/features/contacts/EditRouteGuard/model/edit-guard.ts b/src/renderer/features/contacts/EditRouteGuard/model/edit-guard.ts index ac70c58369..49443ad59e 100644 --- a/src/renderer/features/contacts/EditRouteGuard/model/edit-guard.ts +++ b/src/renderer/features/contacts/EditRouteGuard/model/edit-guard.ts @@ -1,8 +1,8 @@ import { attach, createApi, createEffect, createEvent, createStore, sample } from 'effector'; import { type NavigateFunction } from 'react-router-dom'; -import { type Contact } from '@shared/core'; -import { contactModel } from '@entities/contact'; +import { type Contact } from '@/shared/core'; +import { contactModel } from '@/entities/contact'; const validateUrlParams = createEvent(); const storeCleared = createEvent(); diff --git a/src/renderer/features/contacts/EditRouteGuard/ui/EditRouteGuard.tsx b/src/renderer/features/contacts/EditRouteGuard/ui/EditRouteGuard.tsx index 5e3c245f5e..421ce693f2 100644 --- a/src/renderer/features/contacts/EditRouteGuard/ui/EditRouteGuard.tsx +++ b/src/renderer/features/contacts/EditRouteGuard/ui/EditRouteGuard.tsx @@ -2,7 +2,7 @@ import { useUnit } from 'effector-react'; import { type ReactNode, useEffect } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; -import { type Contact } from '@shared/core'; +import { type Contact } from '@/shared/core'; import * as editGuardModel from '../model/edit-guard'; type Props = { diff --git a/src/renderer/features/currency/CurrencyForm/model/__tests__/currency-form.test.ts b/src/renderer/features/currency/CurrencyForm/model/__tests__/currency-form.test.ts index 0832a72ce8..58f0445171 100644 --- a/src/renderer/features/currency/CurrencyForm/model/__tests__/currency-form.test.ts +++ b/src/renderer/features/currency/CurrencyForm/model/__tests__/currency-form.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { currencyModel, priceProviderModel } from '@entities/price'; +import { currencyModel, priceProviderModel } from '@/entities/price'; import { currencyFormModel } from '../currency-form'; describe('features/currency/model/currency-form', () => { diff --git a/src/renderer/features/currency/CurrencyForm/model/currency-form.ts b/src/renderer/features/currency/CurrencyForm/model/currency-form.ts index f5dc2a0dc7..808cf33ee0 100644 --- a/src/renderer/features/currency/CurrencyForm/model/currency-form.ts +++ b/src/renderer/features/currency/CurrencyForm/model/currency-form.ts @@ -2,8 +2,8 @@ import { attach, combine, createApi, createEvent, createStore, sample } from 'ef import { createForm } from 'effector-forms'; import { combineEvents, spread } from 'patronum'; -import { type CurrencyItem } from '@shared/api/price-provider'; -import { currencyModel, priceProviderModel } from '@entities/price'; +import { type CurrencyItem } from '@/shared/api/price-provider'; +import { currencyModel, priceProviderModel } from '@/entities/price'; export type Callbacks = { onSubmit: () => void; diff --git a/src/renderer/features/currency/CurrencyForm/ui/CurrencyForm.tsx b/src/renderer/features/currency/CurrencyForm/ui/CurrencyForm.tsx index d6a12f24fe..0ad2713bb9 100644 --- a/src/renderer/features/currency/CurrencyForm/ui/CurrencyForm.tsx +++ b/src/renderer/features/currency/CurrencyForm/ui/CurrencyForm.tsx @@ -2,10 +2,10 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { type CurrencyItem } from '@shared/api/price-provider'; -import { Button, FootnoteText, HelpText, Select, Switch } from '@shared/ui'; -import { type DropdownOption } from '@shared/ui/types'; +import { type CurrencyItem } from '@/shared/api/price-provider'; +import { useI18n } from '@/shared/i18n'; +import { Button, FootnoteText, HelpText, Select, Switch } from '@/shared/ui'; +import { type DropdownOption } from '@/shared/ui/types'; import { type Callbacks, currencyFormModel } from '../model/currency-form'; const getCurrencyOption = (currency: CurrencyItem): DropdownOption => ({ diff --git a/src/renderer/features/emptyList/ui/EmptyAccountMessage.tsx b/src/renderer/features/emptyList/ui/EmptyAccountMessage.tsx index 228d14a991..dd655d07d2 100644 --- a/src/renderer/features/emptyList/ui/EmptyAccountMessage.tsx +++ b/src/renderer/features/emptyList/ui/EmptyAccountMessage.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@/app/providers'; import { WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; const Messages: Record = { [WalletType.POLKADOT_VAULT]: 'emptyState.createOrImportAccount', diff --git a/src/renderer/features/fellowship-members/components/Member.tsx b/src/renderer/features/fellowship-members/components/Member.tsx index 84f16a6566..36bf113ba3 100644 --- a/src/renderer/features/fellowship-members/components/Member.tsx +++ b/src/renderer/features/fellowship-members/components/Member.tsx @@ -2,10 +2,10 @@ import { useStoreMap } from 'effector-react'; import { type ComponentProps } from 'react'; import { type Chain } from '@/shared/core'; +import { cnTw, toAddress } from '@/shared/lib/utils'; import { Identicon } from '@/shared/ui'; import { AccountExplorers, Address } from '@/shared/ui-entities'; import { Label } from '@/shared/ui-kit'; -import { cnTw, toAddress } from '@shared/lib/utils'; import { type Member as MemberType } from '@/domains/collectives'; import { identityModel } from '../model/identity'; diff --git a/src/renderer/features/fellowship-members/components/MembersCard.tsx b/src/renderer/features/fellowship-members/components/MembersCard.tsx index 747a2181a6..fd3fe8a48c 100644 --- a/src/renderer/features/fellowship-members/components/MembersCard.tsx +++ b/src/renderer/features/fellowship-members/components/MembersCard.tsx @@ -1,7 +1,7 @@ import { useGate, useUnit } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { FootnoteText, Icon, SmallTitleText } from '@/shared/ui'; import { Box, Skeleton, Surface } from '@/shared/ui-kit'; import { ERROR } from '../constants'; diff --git a/src/renderer/features/fellowship-members/components/MembersListEmptyState.tsx b/src/renderer/features/fellowship-members/components/MembersListEmptyState.tsx index 9b84e9a94d..8e13bbea2e 100644 --- a/src/renderer/features/fellowship-members/components/MembersListEmptyState.tsx +++ b/src/renderer/features/fellowship-members/components/MembersListEmptyState.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon } from '@/shared/ui'; export const MembersListEmptyState = () => { const { t } = useI18n(); diff --git a/src/renderer/features/fellowship-members/components/MembersModal.tsx b/src/renderer/features/fellowship-members/components/MembersModal.tsx index 32083e9ee5..6879e38f37 100644 --- a/src/renderer/features/fellowship-members/components/MembersModal.tsx +++ b/src/renderer/features/fellowship-members/components/MembersModal.tsx @@ -1,7 +1,7 @@ import { useGate, useUnit } from 'effector-react'; import { type PropsWithChildren, useDeferredValue, useMemo, useState } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { nonNullable, performSearch, toAddress } from '@/shared/lib/utils'; import { FootnoteText, SearchInput } from '@/shared/ui'; import { Box, Modal } from '@/shared/ui-kit'; diff --git a/src/renderer/features/fellowship-members/model/identity.ts b/src/renderer/features/fellowship-members/model/identity.ts index c5f6a194d3..02446606f3 100644 --- a/src/renderer/features/fellowship-members/model/identity.ts +++ b/src/renderer/features/fellowship-members/model/identity.ts @@ -1,6 +1,6 @@ import { combine, sample } from 'effector'; -import { attachToFeatureInput } from '@shared/effector'; +import { attachToFeatureInput } from '@/shared/effector'; import { identityDomain } from '@/domains/identity'; import { membersModel } from './members'; diff --git a/src/renderer/features/fellowship-network/model/fellowshipNetwork.ts b/src/renderer/features/fellowship-network/model/fellowshipNetwork.ts index 1d5fd1b1c6..e087346db4 100644 --- a/src/renderer/features/fellowship-network/model/fellowshipNetwork.ts +++ b/src/renderer/features/fellowship-network/model/fellowshipNetwork.ts @@ -1,9 +1,9 @@ import { combine, createEvent, createStore, sample } from 'effector'; import { or } from 'patronum'; +import { type ChainId, ConnectionStatus } from '@/shared/core'; import { nullable } from '@/shared/lib/utils'; -import { type ChainId, ConnectionStatus } from '@shared/core'; -import { networkModel, networkUtils } from '@entities/network'; +import { networkModel, networkUtils } from '@/entities/network'; const selectCollective = createEvent<{ chainId: ChainId }>(); diff --git a/src/renderer/features/fellowship-profile/components/ProfileCard.tsx b/src/renderer/features/fellowship-profile/components/ProfileCard.tsx index 65e1c86456..fd40de3c7a 100644 --- a/src/renderer/features/fellowship-profile/components/ProfileCard.tsx +++ b/src/renderer/features/fellowship-profile/components/ProfileCard.tsx @@ -1,11 +1,11 @@ import { useGate, useUnit } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; import { FootnoteText, Icon, Identicon, SmallTitleText } from '@/shared/ui'; import { Address } from '@/shared/ui-entities'; import { Box, Skeleton, Surface } from '@/shared/ui-kit'; -import { toAddress } from '@shared/lib/utils'; import { ERROR } from '../constants'; import { profileModel } from '../model/profile'; import { profileFeatureStatus } from '../model/status'; diff --git a/src/renderer/features/fellowship-profile/model/fellowship.ts b/src/renderer/features/fellowship-profile/model/fellowship.ts index c09950c0a2..6f1d97741d 100644 --- a/src/renderer/features/fellowship-profile/model/fellowship.ts +++ b/src/renderer/features/fellowship-profile/model/fellowship.ts @@ -1,6 +1,6 @@ import { combine } from 'effector'; -import { nullable } from '@shared/lib/utils'; +import { nullable } from '@/shared/lib/utils'; import { collectiveDomain } from '@/domains/collectives'; import { profileFeatureStatus } from './status'; diff --git a/src/renderer/features/fellowship-profile/model/profile.ts b/src/renderer/features/fellowship-profile/model/profile.ts index b757103ffb..8041ee636d 100644 --- a/src/renderer/features/fellowship-profile/model/profile.ts +++ b/src/renderer/features/fellowship-profile/model/profile.ts @@ -1,8 +1,8 @@ import { combine, sample } from 'effector'; import { or } from 'patronum'; -import { attachToFeatureInput } from '@shared/effector'; -import { nullable } from '@shared/lib/utils'; +import { attachToFeatureInput } from '@/shared/effector'; +import { nullable } from '@/shared/lib/utils'; import { collectiveDomain } from '@/domains/collectives'; import { identityDomain } from '@/domains/identity'; diff --git a/src/renderer/features/fellowship-profile/model/status.ts b/src/renderer/features/fellowship-profile/model/status.ts index 4f0adeacba..b1e3a25891 100644 --- a/src/renderer/features/fellowship-profile/model/status.ts +++ b/src/renderer/features/fellowship-profile/model/status.ts @@ -1,8 +1,8 @@ import { combine, sample } from 'effector'; -import { createFeature } from '@shared/effector'; -import { nullable } from '@shared/lib/utils'; -import { walletModel } from '@entities/wallet'; +import { createFeature } from '@/shared/effector'; +import { nullable } from '@/shared/lib/utils'; +import { walletModel } from '@/entities/wallet'; import { fellowshipNetworkFeature } from '@/features/fellowship-network'; import { ERROR } from '../constants'; diff --git a/src/renderer/features/fellowship-referendum-details/components/ProposerName.tsx b/src/renderer/features/fellowship-referendum-details/components/ProposerName.tsx index 126315e739..37c5697a11 100644 --- a/src/renderer/features/fellowship-referendum-details/components/ProposerName.tsx +++ b/src/renderer/features/fellowship-referendum-details/components/ProposerName.tsx @@ -1,6 +1,6 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { nullable, toAddress } from '@/shared/lib/utils'; import { Identicon } from '@/shared/ui'; import { Address } from '@/shared/ui-entities'; diff --git a/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumTrackInfo.tsx b/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumTrackInfo.tsx index c78e0ba120..153feb8cc4 100644 --- a/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumTrackInfo.tsx +++ b/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumTrackInfo.tsx @@ -1,10 +1,10 @@ import { useGate, useStoreMap } from 'effector-react'; import { memo } from 'react'; +import { type TrackId } from '@/shared/pallet/referenda'; +import { FootnoteText, Icon } from '@/shared/ui'; +import { type IconNames } from '@/shared/ui/Icon/data'; import { Box } from '@/shared/ui-kit'; -import { type TrackId } from '@shared/pallet/referenda'; -import { FootnoteText, Icon } from '@shared/ui'; -import { type IconNames } from '@shared/ui/Icon/data'; import { referendumsDetailsFeatureStatus } from '../../model/status'; import { tracksModel } from '../../model/tracks'; diff --git a/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVoteChart.tsx b/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVoteChart.tsx index 3d8cf948dd..868061c839 100644 --- a/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVoteChart.tsx +++ b/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVoteChart.tsx @@ -2,11 +2,11 @@ import { BN_BILLION, BN_MILLION } from '@polkadot/util'; import { useGate, useStoreMap } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { nullable } from '@shared/lib/utils'; -import { FootnoteText } from '@shared/ui'; -import { VoteChart } from '@shared/ui-entities'; -import { Skeleton, Tooltip } from '@shared/ui-kit'; +import { useI18n } from '@/shared/i18n'; +import { nullable } from '@/shared/lib/utils'; +import { FootnoteText } from '@/shared/ui'; +import { VoteChart } from '@/shared/ui-entities'; +import { Skeleton, Tooltip } from '@/shared/ui-kit'; import { type Referendum, collectiveDomain } from '@/domains/collectives'; import { referendumsDetailsFeatureStatus } from '../../model/status'; import { thresholdsModel } from '../../model/thresholds'; diff --git a/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVotingStatusBadge.tsx b/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVotingStatusBadge.tsx index f05460d7ba..35cbbad801 100644 --- a/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVotingStatusBadge.tsx +++ b/src/renderer/features/fellowship-referendum-details/components/shared/ReferendumVotingStatusBadge.tsx @@ -1,10 +1,10 @@ import { memo } from 'react'; -import { useI18n } from '@/app/providers'; import { type ReferendumType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { nonNullable, nullable } from '@/shared/lib/utils'; import { OperationStatus } from '@/shared/ui'; -import { Skeleton } from '@shared/ui-kit'; +import { Skeleton } from '@/shared/ui-kit'; import { type Referendum, collectiveDomain } from '@/domains/collectives'; type Props = { diff --git a/src/renderer/features/fellowship-referendum-details/model/details.ts b/src/renderer/features/fellowship-referendum-details/model/details.ts index 5bade758d9..fe34541be7 100644 --- a/src/renderer/features/fellowship-referendum-details/model/details.ts +++ b/src/renderer/features/fellowship-referendum-details/model/details.ts @@ -2,8 +2,8 @@ import { combine } from 'effector'; import { createGate } from 'effector-react'; import { and, or } from 'patronum'; +import { nullable } from '@/shared/lib/utils'; import { type ReferendumId } from '@/shared/pallet/referenda'; -import { nullable } from '@shared/lib/utils'; import { collectiveDomain } from '@/domains/collectives'; import { identityDomain } from '@/domains/identity'; diff --git a/src/renderer/features/fellowship-referendum-details/model/fellowship.ts b/src/renderer/features/fellowship-referendum-details/model/fellowship.ts index 92e67accd7..6bd62157fe 100644 --- a/src/renderer/features/fellowship-referendum-details/model/fellowship.ts +++ b/src/renderer/features/fellowship-referendum-details/model/fellowship.ts @@ -1,6 +1,6 @@ import { combine } from 'effector'; -import { nullable } from '@shared/lib/utils'; +import { nullable } from '@/shared/lib/utils'; import { collectiveDomain } from '@/domains/collectives'; import { referendumsDetailsFeatureStatus } from './status'; diff --git a/src/renderer/features/fellowship-referendums/components/Filter/Filters.tsx b/src/renderer/features/fellowship-referendums/components/Filter/Filters.tsx index f3750b8e39..4c5cc17cce 100644 --- a/src/renderer/features/fellowship-referendums/components/Filter/Filters.tsx +++ b/src/renderer/features/fellowship-referendums/components/Filter/Filters.tsx @@ -1,6 +1,6 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; import { Button, MultiSelect, Select } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; import { filterModel } from '../../model/filter'; diff --git a/src/renderer/features/fellowship-referendums/components/Filter/Search.tsx b/src/renderer/features/fellowship-referendums/components/Filter/Search.tsx index c488ba5446..928b97f771 100644 --- a/src/renderer/features/fellowship-referendums/components/Filter/Search.tsx +++ b/src/renderer/features/fellowship-referendums/components/Filter/Search.tsx @@ -1,6 +1,6 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; import { SearchInput } from '@/shared/ui'; import { filterModel } from '../../model/filter'; diff --git a/src/renderer/features/fellowship-referendums/components/List/CompletedReferendums.tsx b/src/renderer/features/fellowship-referendums/components/List/CompletedReferendums.tsx index e1eb80ea80..bff5f3ea5e 100644 --- a/src/renderer/features/fellowship-referendums/components/List/CompletedReferendums.tsx +++ b/src/renderer/features/fellowship-referendums/components/List/CompletedReferendums.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; import { useDeferredList } from '@/shared/lib/hooks'; import { Accordion, CaptionText } from '@/shared/ui'; import { Box, Skeleton } from '@/shared/ui-kit'; diff --git a/src/renderer/features/fellowship-referendums/components/List/DisconnectAlert.tsx b/src/renderer/features/fellowship-referendums/components/List/DisconnectAlert.tsx index 5fc01b04c1..fc2c4ffb2c 100644 --- a/src/renderer/features/fellowship-referendums/components/List/DisconnectAlert.tsx +++ b/src/renderer/features/fellowship-referendums/components/List/DisconnectAlert.tsx @@ -1,6 +1,6 @@ -import { useI18n } from '@app/providers'; -import { Paths } from '@shared/routes'; -import { Alert, ButtonLink, FootnoteText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Paths } from '@/shared/routes'; +import { Alert, ButtonLink, FootnoteText } from '@/shared/ui'; type Props = { active: boolean; diff --git a/src/renderer/features/fellowship-referendums/components/List/EmptyState.tsx b/src/renderer/features/fellowship-referendums/components/List/EmptyState.tsx index 9e427d4a6d..c64ac5a4a5 100644 --- a/src/renderer/features/fellowship-referendums/components/List/EmptyState.tsx +++ b/src/renderer/features/fellowship-referendums/components/List/EmptyState.tsx @@ -1,4 +1,4 @@ -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; import { BodyText, Icon } from '@/shared/ui'; export const EmptyState = () => { diff --git a/src/renderer/features/fellowship-referendums/components/List/OngoingReferendums.tsx b/src/renderer/features/fellowship-referendums/components/List/OngoingReferendums.tsx index 402439dbfd..016a3b3466 100644 --- a/src/renderer/features/fellowship-referendums/components/List/OngoingReferendums.tsx +++ b/src/renderer/features/fellowship-referendums/components/List/OngoingReferendums.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; import { useDeferredList } from '@/shared/lib/hooks'; import { Accordion, CaptionText } from '@/shared/ui'; import { Box, Skeleton } from '@/shared/ui-kit'; diff --git a/src/renderer/features/fellowship-referendums/components/List/ReferendumItem.tsx b/src/renderer/features/fellowship-referendums/components/List/ReferendumItem.tsx index a65b196cad..2d5372cda3 100644 --- a/src/renderer/features/fellowship-referendums/components/List/ReferendumItem.tsx +++ b/src/renderer/features/fellowship-referendums/components/List/ReferendumItem.tsx @@ -1,7 +1,7 @@ import { useStoreMap } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { nonNullable } from '@/shared/lib/utils'; import { FootnoteText, HeadlineText } from '@/shared/ui'; import { Box, Skeleton, Surface } from '@/shared/ui-kit'; diff --git a/src/renderer/features/fellowship-referendums/components/List/WalletVoted.tsx b/src/renderer/features/fellowship-referendums/components/List/WalletVoted.tsx index 119f1792e2..c689d5c21a 100644 --- a/src/renderer/features/fellowship-referendums/components/List/WalletVoted.tsx +++ b/src/renderer/features/fellowship-referendums/components/List/WalletVoted.tsx @@ -1,6 +1,6 @@ import { useStoreMap } from 'effector-react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { FootnoteText, Icon } from '@/shared/ui'; import { type Referendum } from '@/domains/collectives'; import { votingModel } from '../../model/voting'; diff --git a/src/renderer/features/governance/aggregates/delegation.ts b/src/renderer/features/governance/aggregates/delegation.ts index 7d52b27c56..f92f3a123b 100644 --- a/src/renderer/features/governance/aggregates/delegation.ts +++ b/src/renderer/features/governance/aggregates/delegation.ts @@ -4,8 +4,8 @@ import uniq from 'lodash/uniq'; import { type DelegatingVoting, type DelegationBalanceMap, type DelegationTracksMap } from '@/shared/core'; import { toAccountId, toAddress } from '@/shared/lib/utils'; +import { votingService } from '@/entities/governance'; import { permissionUtils, walletModel } from '@/entities/wallet'; -import { votingService } from '@entities/governance'; import { networkSelectorModel } from '../model/networkSelector'; import { votingAggregate } from './voting'; diff --git a/src/renderer/features/governance/aggregates/details.ts b/src/renderer/features/governance/aggregates/details.ts index a410ead537..6e1cd32e07 100644 --- a/src/renderer/features/governance/aggregates/details.ts +++ b/src/renderer/features/governance/aggregates/details.ts @@ -1,8 +1,8 @@ import { combine, sample } from 'effector'; import { createGate } from 'effector-react'; -import { type Chain, type Referendum } from '@shared/core'; -import { permissionUtils, walletModel } from '@entities/wallet'; +import { type Chain, type Referendum } from '@/shared/core'; +import { permissionUtils, walletModel } from '@/entities/wallet'; import { descriptionsModel } from '../model/description'; import { networkSelectorModel } from '../model/networkSelector'; import { timelineModel } from '../model/timeline'; diff --git a/src/renderer/features/governance/aggregates/list.ts b/src/renderer/features/governance/aggregates/list.ts index c92eec908c..2e2b85ac25 100644 --- a/src/renderer/features/governance/aggregates/list.ts +++ b/src/renderer/features/governance/aggregates/list.ts @@ -8,7 +8,7 @@ import { referendumService, supportThresholdModel, votingService, -} from '@entities/governance'; +} from '@/entities/governance'; import { networkSelectorModel } from '../model/networkSelector'; import { titleModel } from '../model/title'; import { type AggregatedReferendum } from '../types/structs'; diff --git a/src/renderer/features/governance/aggregates/locks.ts b/src/renderer/features/governance/aggregates/locks.ts index a9bf9a57df..d9dd6fd873 100644 --- a/src/renderer/features/governance/aggregates/locks.ts +++ b/src/renderer/features/governance/aggregates/locks.ts @@ -3,9 +3,9 @@ import { combine, createStore, sample } from 'effector'; import { createGate } from 'effector-react'; import { type Chain } from '@/shared/core'; -import { nonNullable } from '@shared/lib/utils'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { accountUtils, walletModel } from '@/entities/wallet'; -import { networkModel } from '@entities/network'; import { locksModel } from '../model/locks'; import { networkSelectorModel } from '../model/networkSelector'; diff --git a/src/renderer/features/governance/aggregates/locksPeriod.ts b/src/renderer/features/governance/aggregates/locksPeriod.ts index d885e69352..b4b2a46640 100644 --- a/src/renderer/features/governance/aggregates/locksPeriod.ts +++ b/src/renderer/features/governance/aggregates/locksPeriod.ts @@ -3,8 +3,8 @@ import { createStore, sample } from 'effector'; import { createGate } from 'effector-react'; import { type Chain } from '@/shared/core'; -import { nonNullable } from '@shared/lib/utils'; -import { networkModel } from '@entities/network'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { lockPeriodsModel } from '../model/lockPeriods'; import { networkSelectorModel } from '../model/networkSelector'; diff --git a/src/renderer/features/governance/aggregates/proposerIdentity.ts b/src/renderer/features/governance/aggregates/proposerIdentity.ts index 138c190cac..d5bb0e3ecb 100644 --- a/src/renderer/features/governance/aggregates/proposerIdentity.ts +++ b/src/renderer/features/governance/aggregates/proposerIdentity.ts @@ -1,8 +1,8 @@ import { combine, createEvent, sample } from 'effector'; -import { type Address, type Referendum } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; -import { proposerIdentityModel } from '@entities/governance'; +import { type Address, type Referendum } from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { proposerIdentityModel } from '@/entities/governance'; import { networkSelectorModel } from '../model/networkSelector'; const $proposers = combine( diff --git a/src/renderer/features/governance/aggregates/tracks.ts b/src/renderer/features/governance/aggregates/tracks.ts index bcb3d8d12c..96f9c5f051 100644 --- a/src/renderer/features/governance/aggregates/tracks.ts +++ b/src/renderer/features/governance/aggregates/tracks.ts @@ -1,6 +1,6 @@ import { sample } from 'effector'; -import { tracksModel } from '@entities/governance'; +import { tracksModel } from '@/entities/governance'; import { networkSelectorModel } from '../model/networkSelector'; sample({ diff --git a/src/renderer/features/governance/aggregates/voteHistory.ts b/src/renderer/features/governance/aggregates/voteHistory.ts index f89d399ab0..e60be9ebc6 100644 --- a/src/renderer/features/governance/aggregates/voteHistory.ts +++ b/src/renderer/features/governance/aggregates/voteHistory.ts @@ -1,8 +1,8 @@ import { combine, createEvent, sample } from 'effector'; import { createGate } from 'effector-react'; -import { type Referendum, type ReferendumId } from '@shared/core'; -import { voteHistoryModel } from '@entities/governance'; +import { type Referendum, type ReferendumId } from '@/shared/core'; +import { voteHistoryModel } from '@/entities/governance'; import { votingListService } from '../lib/votingListService'; import { networkSelectorModel } from '../model/networkSelector'; import { votingAssetModel } from '../model/votingAsset'; diff --git a/src/renderer/features/governance/aggregates/voting.ts b/src/renderer/features/governance/aggregates/voting.ts index 39d09f6adc..0072bcce19 100644 --- a/src/renderer/features/governance/aggregates/voting.ts +++ b/src/renderer/features/governance/aggregates/voting.ts @@ -1,9 +1,9 @@ import { combine, createEvent, sample } from 'effector'; -import { type Address, type TrackId, type VotingMap } from '@shared/core'; -import { nonNullable, nullable } from '@shared/lib/utils'; -import { votingModel } from '@entities/governance'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +import { type Address, type TrackId, type VotingMap } from '@/shared/core'; +import { nonNullable, nullable } from '@/shared/lib/utils'; +import { votingModel } from '@/entities/governance'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { networkSelectorModel } from '../model/networkSelector'; import { tracksAggregate } from './tracks'; diff --git a/src/renderer/features/governance/components/AccountsMultiSelector/AccountsMultiSelector.tsx b/src/renderer/features/governance/components/AccountsMultiSelector/AccountsMultiSelector.tsx index 5f7b4f0000..392dc57cd7 100644 --- a/src/renderer/features/governance/components/AccountsMultiSelector/AccountsMultiSelector.tsx +++ b/src/renderer/features/governance/components/AccountsMultiSelector/AccountsMultiSelector.tsx @@ -1,7 +1,8 @@ import { Listbox, Transition } from '@headlessui/react'; import { Fragment, type ReactNode, useId } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; import { CaptionText, Checkbox, FootnoteText, Icon, LabelText } from '@/shared/ui'; import { OptionStyle, @@ -13,7 +14,6 @@ import { } from '@/shared/ui/Dropdowns/common/constants'; import { type DropdownResult, type Position, type Theme } from '@/shared/ui/Dropdowns/common/types'; import { CommonInputStyles, CommonInputStylesTheme } from '@/shared/ui/Inputs/common/styles'; -import { cnTw } from '@shared/lib/utils'; type DropdownOption = { id: string; diff --git a/src/renderer/features/governance/components/Delegations/DelegateBadge.tsx b/src/renderer/features/governance/components/Delegations/DelegateBadge.tsx index 34dcc84112..a8d588609f 100644 --- a/src/renderer/features/governance/components/Delegations/DelegateBadge.tsx +++ b/src/renderer/features/governance/components/Delegations/DelegateBadge.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@/app/providers'; import { type DelegateAccount } from '@/shared/api/governance'; +import { useI18n } from '@/shared/i18n'; import { cnTw } from '@/shared/lib/utils'; import { CaptionText } from '@/shared/ui'; diff --git a/src/renderer/features/governance/components/Delegations/DelegateIcon.tsx b/src/renderer/features/governance/components/Delegations/DelegateIcon.tsx index 916c42e673..27f341d4cf 100644 --- a/src/renderer/features/governance/components/Delegations/DelegateIcon.tsx +++ b/src/renderer/features/governance/components/Delegations/DelegateIcon.tsx @@ -1,7 +1,8 @@ import { type DelegateAccount } from '@/shared/api/governance'; import { cnTw } from '@/shared/lib/utils'; import { Icon, Identicon } from '@/shared/ui'; -import { addDelegationUtils } from '@/widgets/DelegationModal/common/utils'; + +const isDefaultImage = (image?: string) => !image || image.includes('default'); type Props = { delegate: DelegateAccount; @@ -11,7 +12,7 @@ type Props = { export const DelegateIcon = ({ delegate, className }: Props) => { if (!delegate.name) return ; - if (addDelegationUtils.isDefaultImage(delegate.image)) { + if (isDefaultImage(delegate.image)) {
{ diff --git a/src/renderer/features/governance/components/OffChainDataSource/OffChainDataSource.tsx b/src/renderer/features/governance/components/OffChainDataSource/OffChainDataSource.tsx index 793a1ac41a..d8004b9f2c 100644 --- a/src/renderer/features/governance/components/OffChainDataSource/OffChainDataSource.tsx +++ b/src/renderer/features/governance/components/OffChainDataSource/OffChainDataSource.tsx @@ -2,9 +2,9 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { useModalClose } from '@shared/lib/hooks'; -import { BaseModal, Button, FootnoteText, HelpText, Icon, InputHint, Select } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { BaseModal, Button, FootnoteText, HelpText, Icon, InputHint, Select } from '@/shared/ui'; import { offChainModel } from '../../model/offChain'; import { Sources } from './constants'; diff --git a/src/renderer/features/governance/components/OffChainDataSource/constants.ts b/src/renderer/features/governance/components/OffChainDataSource/constants.ts index d1d4151acb..fe293f721f 100644 --- a/src/renderer/features/governance/components/OffChainDataSource/constants.ts +++ b/src/renderer/features/governance/components/OffChainDataSource/constants.ts @@ -1,5 +1,5 @@ -import { type IconNames } from '@shared/ui/Icon/data'; -import { type GovernanceApiSource } from '@entities/governance'; +import { type IconNames } from '@/shared/ui/Icon/data'; +import { type GovernanceApiSource } from '@/entities/governance'; export const Sources: Record = { polkassembly: { diff --git a/src/renderer/features/governance/components/ReferendumDetails/AdvancedModal.tsx b/src/renderer/features/governance/components/ReferendumDetails/AdvancedModal.tsx index 0e7dba6098..bc94355719 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/AdvancedModal.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/AdvancedModal.tsx @@ -1,11 +1,11 @@ import { BN, BN_ZERO } from '@polkadot/util'; -import { useI18n } from '@app/providers'; -import { type Asset, type OngoingReferendum } from '@shared/core'; -import { useModalClose } from '@shared/lib/hooks'; -import { copyToClipboard, formatAsset } from '@shared/lib/utils'; -import { BaseModal, DetailRow, IconButton, Separator, Truncate } from '@shared/ui'; -import { AddressWithName } from '@entities/wallet'; +import { type Asset, type OngoingReferendum } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { copyToClipboard, formatAsset } from '@/shared/lib/utils'; +import { BaseModal, DetailRow, IconButton, Separator, Truncate } from '@/shared/ui'; +import { AddressWithName } from '@/entities/wallet'; import { type AggregatedReferendum } from '../../types/structs'; type Props = { diff --git a/src/renderer/features/governance/components/ReferendumDetails/DetailsCard.tsx b/src/renderer/features/governance/components/ReferendumDetails/DetailsCard.tsx index 6229abcd73..b854811998 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/DetailsCard.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/DetailsCard.tsx @@ -1,6 +1,6 @@ import { type PropsWithChildren, type ReactNode } from 'react'; -import { Plate, SmallTitleText } from '@shared/ui'; +import { Plate, SmallTitleText } from '@/shared/ui'; type Props = PropsWithChildren<{ title?: ReactNode; diff --git a/src/renderer/features/governance/components/ReferendumDetails/MyVotesModal.tsx b/src/renderer/features/governance/components/ReferendumDetails/MyVotesModal.tsx index e9699749b8..4aceb39668 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/MyVotesModal.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/MyVotesModal.tsx @@ -1,14 +1,14 @@ import { useStoreMap, useUnit } from 'effector-react'; import { useMemo } from 'react'; -import { useI18n } from '@app/providers'; -import { type Asset, type Chain, type Referendum } from '@shared/core'; -import { useModalClose } from '@shared/lib/hooks'; -import { formatAsset, formatBalance, toAccountId } from '@shared/lib/utils'; -import { BaseModal, BodyText, FootnoteText } from '@shared/ui'; -import { votingService } from '@entities/governance'; -import { SignatoryCard } from '@entities/signatory'; -import { AddressWithName, walletModel, walletUtils } from '@entities/wallet'; +import { type Asset, type Chain, type Referendum } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { formatAsset, formatBalance, toAccountId } from '@/shared/lib/utils'; +import { BaseModal, BodyText, FootnoteText } from '@/shared/ui'; +import { votingService } from '@/entities/governance'; +import { SignatoryCard } from '@/entities/signatory'; +import { AddressWithName, walletModel, walletUtils } from '@/entities/wallet'; import { detailsAggregate } from '../../aggregates/details'; import { votingListService } from '../../lib/votingListService'; diff --git a/src/renderer/features/governance/components/ReferendumDetails/ProposalDescription.tsx b/src/renderer/features/governance/components/ReferendumDetails/ProposalDescription.tsx index e32a677cd6..8dea51dc68 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/ProposalDescription.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/ProposalDescription.tsx @@ -1,9 +1,9 @@ import { useStoreMap, useUnit } from 'effector-react'; -import { type ChainId, type Referendum } from '@shared/core'; -import { pickNestedValue } from '@shared/lib/utils'; -import { HeaderTitleText, Markdown, Shimmering } from '@shared/ui'; -import { TrackInfo, referendumService } from '@entities/governance'; +import { type ChainId, type Referendum } from '@/shared/core'; +import { pickNestedValue } from '@/shared/lib/utils'; +import { HeaderTitleText, Markdown, Shimmering } from '@/shared/ui'; +import { TrackInfo, referendumService } from '@/entities/governance'; import { detailsAggregate } from '../../aggregates/details'; import { ProposerName } from './ProposerName'; diff --git a/src/renderer/features/governance/components/ReferendumDetails/ProposerName.tsx b/src/renderer/features/governance/components/ReferendumDetails/ProposerName.tsx index 5afb8ceb46..6ec221a48a 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/ProposerName.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/ProposerName.tsx @@ -1,11 +1,11 @@ import { useStoreMap } from 'effector-react'; -import { useI18n } from '@app/providers'; +import { type Referendum } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { toAddress } from '@/shared/lib/utils'; -import { type Referendum } from '@shared/core'; -import { FootnoteText, Shimmering } from '@shared/ui'; -import { referendumService } from '@entities/governance'; -import { AccountAddress } from '@entities/wallet'; +import { FootnoteText, Shimmering } from '@/shared/ui'; +import { referendumService } from '@/entities/governance'; +import { AccountAddress } from '@/entities/wallet'; import { detailsAggregate } from '../../aggregates/details'; type Props = { diff --git a/src/renderer/features/governance/components/ReferendumDetails/ReferendumAdditional.tsx b/src/renderer/features/governance/components/ReferendumDetails/ReferendumAdditional.tsx index ecdbb33ffc..2efa7a3417 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/ReferendumAdditional.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/ReferendumAdditional.tsx @@ -1,6 +1,6 @@ -import { useI18n } from '@app/providers'; -import { type ReferendumId } from '@shared/core'; -import { BlockExplorer } from '@shared/ui'; +import { type ReferendumId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BlockExplorer } from '@/shared/ui'; type Props = { referendumId: ReferendumId; diff --git a/src/renderer/features/governance/components/ReferendumDetails/ReferendumDetailsModal.tsx b/src/renderer/features/governance/components/ReferendumDetails/ReferendumDetailsModal.tsx index faf4f9c107..6fb45ddcb8 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/ReferendumDetailsModal.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/ReferendumDetailsModal.tsx @@ -2,12 +2,12 @@ import { type ApiPromise } from '@polkadot/api'; import { BN_ZERO } from '@polkadot/util'; import { useGate, useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type Asset, type Chain } from '@shared/core'; -import { useModalClose, useToggle } from '@shared/lib/hooks'; -import { BaseModal, Button, Plate } from '@shared/ui'; +import { type Asset, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose, useToggle } from '@/shared/lib/hooks'; +import { BaseModal, Button, Plate } from '@/shared/ui'; +import { referendumService, votingService } from '@/entities/governance'; import { walletModel } from '@/entities/wallet'; -import { referendumService, votingService } from '@entities/governance'; import { detailsAggregate } from '../../aggregates/details'; import { type AggregatedReferendum } from '../../types/structs'; import { VotingHistoryDialog } from '../VotingHistory/VotingHistoryDialog'; diff --git a/src/renderer/features/governance/components/ReferendumDetails/Threshold.tsx b/src/renderer/features/governance/components/ReferendumDetails/Threshold.tsx index a84bfe15b9..58c6653a59 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/Threshold.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/Threshold.tsx @@ -1,9 +1,9 @@ import { type BN } from '@polkadot/util'; -import { useI18n } from '@app/providers'; import { type Asset } from '@/shared/core'; -import { formatAsset, formatBalance } from '@shared/lib/utils'; -import { FootnoteText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { formatAsset, formatBalance } from '@/shared/lib/utils'; +import { FootnoteText, Icon } from '@/shared/ui'; type Props = { voited: BN; diff --git a/src/renderer/features/governance/components/ReferendumDetails/Timeline.tsx b/src/renderer/features/governance/components/ReferendumDetails/Timeline.tsx index 97afb291ab..874135198c 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/Timeline.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/Timeline.tsx @@ -1,7 +1,7 @@ import { useStoreMap, useUnit } from 'effector-react'; -import { type ReferendumId } from '@shared/core'; -import { Shimmering } from '@shared/ui'; +import { type ReferendumId } from '@/shared/core'; +import { Shimmering } from '@/shared/ui'; import { detailsAggregate } from '../../aggregates/details'; import { TimelineItem } from './TimelineItem'; diff --git a/src/renderer/features/governance/components/ReferendumDetails/TimelineItem.tsx b/src/renderer/features/governance/components/ReferendumDetails/TimelineItem.tsx index bdbb681c90..5f1d3aa9e6 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/TimelineItem.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/TimelineItem.tsx @@ -1,6 +1,6 @@ -import { useI18n } from '@app/providers'; -import { type ReferendumTimelineRecord, type ReferendumTimelineRecordStatus } from '@shared/api/governance'; -import { FootnoteText, OperationStatus } from '@shared/ui'; +import { type ReferendumTimelineRecord, type ReferendumTimelineRecordStatus } from '@/shared/api/governance'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, OperationStatus } from '@/shared/ui'; type Props = { item: ReferendumTimelineRecord; diff --git a/src/renderer/features/governance/components/ReferendumDetails/VotingBalance.tsx b/src/renderer/features/governance/components/ReferendumDetails/VotingBalance.tsx index c51e5b4af7..833f363c51 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/VotingBalance.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/VotingBalance.tsx @@ -1,9 +1,9 @@ import { type BN } from '@polkadot/util'; -import { useI18n } from '@app/providers'; -import { type Asset } from '@shared/core'; -import { formatBalance, toNumberWithPrecision } from '@shared/lib/utils'; -import { FootnoteText, Icon, IconButton } from '@shared/ui'; +import { type Asset } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { formatBalance, toNumberWithPrecision } from '@/shared/lib/utils'; +import { FootnoteText, Icon, IconButton } from '@/shared/ui'; type Props = { votes: BN; diff --git a/src/renderer/features/governance/components/ReferendumDetails/VotingStatus.tsx b/src/renderer/features/governance/components/ReferendumDetails/VotingStatus.tsx index 5ec3dfb07d..95b25cc0f7 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/VotingStatus.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/VotingStatus.tsx @@ -1,10 +1,10 @@ import { type ApiPromise } from '@polkadot/api'; -import { useI18n } from '@app/providers'; -import { type Asset, type Wallet } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; -import { Button, FootnoteText } from '@shared/ui'; -import { ReferendumVoteChart, referendumService, votingService } from '@entities/governance'; +import { type Asset, type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { nonNullable } from '@/shared/lib/utils'; +import { Button, FootnoteText } from '@/shared/ui'; +import { ReferendumVoteChart, referendumService, votingService } from '@/entities/governance'; import { EmptyAccountMessage } from '@/features/emptyList'; import { type AggregatedReferendum } from '../../types/structs'; import { ReferendumEndTimer } from '../ReferendumEndTimer/ReferendumEndTimer'; diff --git a/src/renderer/features/governance/components/ReferendumDetails/VotingSummary.tsx b/src/renderer/features/governance/components/ReferendumDetails/VotingSummary.tsx index 0eeb02c778..1f84754622 100644 --- a/src/renderer/features/governance/components/ReferendumDetails/VotingSummary.tsx +++ b/src/renderer/features/governance/components/ReferendumDetails/VotingSummary.tsx @@ -1,7 +1,7 @@ import { useGate, useStoreMap } from 'effector-react'; -import { useI18n } from '@/app/providers'; import { type Asset, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { formatAsset } from '@/shared/lib/utils'; import { FootnoteText } from '@/shared/ui'; import { votingSummaryModel } from '../../model/votingSummary'; diff --git a/src/renderer/features/governance/components/ReferendumEndTimer/ReferendumEndTimer.tsx b/src/renderer/features/governance/components/ReferendumEndTimer/ReferendumEndTimer.tsx index daadfa1adf..bd8c104d8e 100644 --- a/src/renderer/features/governance/components/ReferendumEndTimer/ReferendumEndTimer.tsx +++ b/src/renderer/features/governance/components/ReferendumEndTimer/ReferendumEndTimer.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; import { type ReferendumStatus } from '@/shared/core'; import { getTimeToBlock } from '@/shared/lib/utils'; -import { ReferendumTimer } from '@entities/governance'; +import { ReferendumTimer } from '@/entities/governance'; type Props = { api: ApiPromise; diff --git a/src/renderer/features/governance/components/ReferendumFilter/ReferendumFilters.tsx b/src/renderer/features/governance/components/ReferendumFilter/ReferendumFilters.tsx index dc80bdc634..f173f24491 100644 --- a/src/renderer/features/governance/components/ReferendumFilter/ReferendumFilters.tsx +++ b/src/renderer/features/governance/components/ReferendumFilter/ReferendumFilters.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { Button, MultiSelect, Select } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Button, MultiSelect, Select } from '@/shared/ui'; import { filterModel } from '../../model/filter'; import { trackOptions, voteOptions } from './constants'; diff --git a/src/renderer/features/governance/components/ReferendumFilter/ReferendumSearch.tsx b/src/renderer/features/governance/components/ReferendumFilter/ReferendumSearch.tsx index cf06bed8f6..013e9d4f55 100644 --- a/src/renderer/features/governance/components/ReferendumFilter/ReferendumSearch.tsx +++ b/src/renderer/features/governance/components/ReferendumFilter/ReferendumSearch.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { SearchInput } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { SearchInput } from '@/shared/ui'; import { filterModel } from '../../model/filter'; export const ReferendumSearch = () => { diff --git a/src/renderer/features/governance/components/ReferendumList/CompletedReferendums.tsx b/src/renderer/features/governance/components/ReferendumList/CompletedReferendums.tsx index 0caa5b0743..d41ec95fff 100644 --- a/src/renderer/features/governance/components/ReferendumList/CompletedReferendums.tsx +++ b/src/renderer/features/governance/components/ReferendumList/CompletedReferendums.tsx @@ -1,9 +1,9 @@ import { type ApiPromise } from '@polkadot/api'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { useDeferredList } from '@shared/lib/hooks'; -import { Accordion, CaptionText, Shimmering } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { useDeferredList } from '@/shared/lib/hooks'; +import { Accordion, CaptionText, Shimmering } from '@/shared/ui'; import { type AggregatedReferendum } from '../../types/structs'; import { ListItemPlaceholder } from './ListItemPlaceholder'; diff --git a/src/renderer/features/governance/components/ReferendumList/ListItemPlaceholder.tsx b/src/renderer/features/governance/components/ReferendumList/ListItemPlaceholder.tsx index d58da62d03..0b55708e73 100644 --- a/src/renderer/features/governance/components/ReferendumList/ListItemPlaceholder.tsx +++ b/src/renderer/features/governance/components/ReferendumList/ListItemPlaceholder.tsx @@ -1,4 +1,4 @@ -import { HeaderTitleText, Shimmering } from '@shared/ui'; +import { HeaderTitleText, Shimmering } from '@/shared/ui'; export const ListItemPlaceholder = () => { return ( diff --git a/src/renderer/features/governance/components/ReferendumList/OngoingReferendums.tsx b/src/renderer/features/governance/components/ReferendumList/OngoingReferendums.tsx index 64cfe51e57..d5ac618bf6 100644 --- a/src/renderer/features/governance/components/ReferendumList/OngoingReferendums.tsx +++ b/src/renderer/features/governance/components/ReferendumList/OngoingReferendums.tsx @@ -1,8 +1,8 @@ import { type ApiPromise } from '@polkadot/api'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { Accordion, CaptionText, Shimmering } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Accordion, CaptionText, Shimmering } from '@/shared/ui'; import { type AggregatedReferendum } from '../../types/structs'; import { ListItemPlaceholder } from './ListItemPlaceholder'; diff --git a/src/renderer/features/governance/components/ReferendumList/ReferendumItem.tsx b/src/renderer/features/governance/components/ReferendumList/ReferendumItem.tsx index 16d7071741..e813061438 100644 --- a/src/renderer/features/governance/components/ReferendumList/ReferendumItem.tsx +++ b/src/renderer/features/governance/components/ReferendumList/ReferendumItem.tsx @@ -1,9 +1,9 @@ import { type ApiPromise } from '@polkadot/api'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { FootnoteText, HeadlineText, Shimmering } from '@shared/ui'; -import { ReferendumVoteChart, TrackInfo, Voted, referendumService, votingService } from '@entities/governance'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, HeadlineText, Shimmering } from '@/shared/ui'; +import { ReferendumVoteChart, TrackInfo, Voted, referendumService, votingService } from '@/entities/governance'; import { type AggregatedReferendum } from '../../types/structs'; import { ReferendumEndTimer } from '../ReferendumEndTimer/ReferendumEndTimer'; import { VotingStatusBadge } from '../VotingStatusBadge'; diff --git a/src/renderer/features/governance/components/ReferendumList/VotedBy.tsx b/src/renderer/features/governance/components/ReferendumList/VotedBy.tsx index 40f7c886ee..5ef8eb0dea 100644 --- a/src/renderer/features/governance/components/ReferendumList/VotedBy.tsx +++ b/src/renderer/features/governance/components/ReferendumList/VotedBy.tsx @@ -1,10 +1,10 @@ import { useStoreMap } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { type Address } from '@shared/core'; -import { FootnoteText, Icon } from '@shared/ui'; -import { AccountAddress } from '@entities/wallet'; +import { type Address } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon } from '@/shared/ui'; +import { AccountAddress } from '@/entities/wallet'; import { proposerIdentityAggregate } from '../../aggregates/proposerIdentity'; type Props = { diff --git a/src/renderer/features/governance/components/ReferendumList/VotedReferendumItem.tsx b/src/renderer/features/governance/components/ReferendumList/VotedReferendumItem.tsx index b9408b3f9b..7b6b135b87 100644 --- a/src/renderer/features/governance/components/ReferendumList/VotedReferendumItem.tsx +++ b/src/renderer/features/governance/components/ReferendumList/VotedReferendumItem.tsx @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type BN } from '@polkadot/util'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; import { type Asset, type Chain } from '@/shared/core'; -import { formatBalance, toNumberWithPrecision } from '@shared/lib/utils'; -import { FootnoteText, HeadlineText, Icon } from '@shared/ui'; -import { ReferendumVoteChart, TrackInfo, referendumService, votingService } from '@entities/governance'; +import { useI18n } from '@/shared/i18n'; +import { formatBalance, toNumberWithPrecision } from '@/shared/lib/utils'; +import { FootnoteText, HeadlineText, Icon } from '@/shared/ui'; +import { ReferendumVoteChart, TrackInfo, referendumService, votingService } from '@/entities/governance'; import { type AggregatedReferendum } from '../../types/structs'; import { ReferendumEndTimer } from '../ReferendumEndTimer/ReferendumEndTimer'; import { VotingStatusBadge } from '../VotingStatusBadge'; diff --git a/src/renderer/features/governance/components/VotingHistory/VoteCount.tsx b/src/renderer/features/governance/components/VotingHistory/VoteCount.tsx index 2f970aa993..9eb728d080 100644 --- a/src/renderer/features/governance/components/VotingHistory/VoteCount.tsx +++ b/src/renderer/features/governance/components/VotingHistory/VoteCount.tsx @@ -1,4 +1,4 @@ -import { FootnoteText, Shimmering } from '@shared/ui'; +import { FootnoteText, Shimmering } from '@/shared/ui'; type Props = { count: number; diff --git a/src/renderer/features/governance/components/VotingHistory/VotingHistoryDialog.tsx b/src/renderer/features/governance/components/VotingHistory/VotingHistoryDialog.tsx index fab2c14a73..0f0df76389 100644 --- a/src/renderer/features/governance/components/VotingHistory/VotingHistoryDialog.tsx +++ b/src/renderer/features/governance/components/VotingHistory/VotingHistoryDialog.tsx @@ -1,12 +1,12 @@ import { useGate, useStoreMap, useUnit } from 'effector-react'; import { useMemo, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type Referendum } from '@shared/core'; -import { useModalClose } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; -import { BaseModal, Button, FootnoteText, Icon, SmallTitleText, Tabs } from '@shared/ui'; -import { type TabItem } from '@shared/ui/Tabs/common/types'; +import { type Referendum } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; +import { BaseModal, Button, FootnoteText, Icon, SmallTitleText, Tabs } from '@/shared/ui'; +import { type TabItem } from '@/shared/ui/Tabs/common/types'; import { voteHistoryAggregate } from '../../aggregates/voteHistory'; import { VoteCount } from './VoteCount'; diff --git a/src/renderer/features/governance/components/VotingHistory/VotingHistoryList.tsx b/src/renderer/features/governance/components/VotingHistory/VotingHistoryList.tsx index c230d02be6..f1a18b070e 100644 --- a/src/renderer/features/governance/components/VotingHistory/VotingHistoryList.tsx +++ b/src/renderer/features/governance/components/VotingHistory/VotingHistoryList.tsx @@ -1,11 +1,11 @@ import { memo, useMemo, useState } from 'react'; -import { useI18n } from '@app/providers'; +import { type Asset, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useDeferredList } from '@/shared/lib/hooks'; +import { formatAsset, formatBalance, performSearch, toAccountId } from '@/shared/lib/utils'; +import { BodyText, FootnoteText, SearchInput } from '@/shared/ui'; import { AccountExplorers, Address } from '@/shared/ui-entities'; -import { type Asset, type Chain } from '@shared/core'; -import { useDeferredList } from '@shared/lib/hooks'; -import { formatAsset, formatBalance, performSearch, toAccountId } from '@shared/lib/utils'; -import { BodyText, FootnoteText, SearchInput } from '@shared/ui'; import { type AggregatedVoteHistory } from '../../types/structs'; import { VotingHistoryListEmptyState } from './VotingHistoryListEmptyState'; diff --git a/src/renderer/features/governance/components/VotingHistory/VotingHistoryListEmptyState.tsx b/src/renderer/features/governance/components/VotingHistory/VotingHistoryListEmptyState.tsx index c6b1632b89..968907c5e9 100644 --- a/src/renderer/features/governance/components/VotingHistory/VotingHistoryListEmptyState.tsx +++ b/src/renderer/features/governance/components/VotingHistory/VotingHistoryListEmptyState.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon } from '@/shared/ui'; export const VotingHistoryListEmptyState = () => { const { t } = useI18n(); diff --git a/src/renderer/features/governance/components/VotingHistory/VotingHistoryListPlaceholder.tsx b/src/renderer/features/governance/components/VotingHistory/VotingHistoryListPlaceholder.tsx index 45bd0b2b2b..8ba5396d82 100644 --- a/src/renderer/features/governance/components/VotingHistory/VotingHistoryListPlaceholder.tsx +++ b/src/renderer/features/governance/components/VotingHistory/VotingHistoryListPlaceholder.tsx @@ -1,4 +1,4 @@ -import { Shimmering } from '@shared/ui'; +import { Shimmering } from '@/shared/ui'; export const VotingHistoryListPlaceholder = () => { return ( diff --git a/src/renderer/features/governance/components/VotingHistory/VotingHistoryLoadingScreen.tsx b/src/renderer/features/governance/components/VotingHistory/VotingHistoryLoadingScreen.tsx index c3a6d68684..ab07e02684 100644 --- a/src/renderer/features/governance/components/VotingHistory/VotingHistoryLoadingScreen.tsx +++ b/src/renderer/features/governance/components/VotingHistory/VotingHistoryLoadingScreen.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@shared/ui'; +import { Loader } from '@/shared/ui'; export const VotingHistoryLoadingScreen = () => { return ( diff --git a/src/renderer/features/governance/components/VotingStatusBadge/VotingStatusBadge.tsx b/src/renderer/features/governance/components/VotingStatusBadge/VotingStatusBadge.tsx index 44145c3740..1c50d00c4d 100644 --- a/src/renderer/features/governance/components/VotingStatusBadge/VotingStatusBadge.tsx +++ b/src/renderer/features/governance/components/VotingStatusBadge/VotingStatusBadge.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@app/providers'; -import { type CompletedReferendum, type OngoingReferendum, type ReferendumType } from '@shared/core'; -import { OperationStatus } from '@shared/ui'; -import { referendumService } from '@entities/governance'; +import { type CompletedReferendum, type OngoingReferendum, type ReferendumType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { OperationStatus } from '@/shared/ui'; +import { referendumService } from '@/entities/governance'; type Props = { passing?: boolean; diff --git a/src/renderer/features/governance/index.ts b/src/renderer/features/governance/index.ts index 71d0ff1963..fe70cf2c19 100644 --- a/src/renderer/features/governance/index.ts +++ b/src/renderer/features/governance/index.ts @@ -16,6 +16,7 @@ export { voteValidateModel } from './model/vote/voteValidateModel'; export { votingAssetModel } from './model/votingAsset'; export { lockPeriodsModel } from './model/lockPeriods'; export { locksModel } from './model/locks'; +export { unlockModel } from './model/unlock/unlock'; export { Locks } from './components/Locks'; export { AccountsMultiSelector } from './components/AccountsMultiSelector/AccountsMultiSelector'; diff --git a/src/renderer/features/governance/lib/createFeeCalculator.ts b/src/renderer/features/governance/lib/createFeeCalculator.ts index 5a5d28824f..4471740605 100644 --- a/src/renderer/features/governance/lib/createFeeCalculator.ts +++ b/src/renderer/features/governance/lib/createFeeCalculator.ts @@ -3,9 +3,9 @@ import { type SignerOptions } from '@polkadot/api/types/submittable'; import { BN, BN_ZERO } from '@polkadot/util'; import { type Store, combine, createEffect, createStore, sample } from 'effector'; -import { type Transaction } from '@shared/core'; -import { nonNullable, nullable } from '@shared/lib/utils'; -import { transactionService } from '@entities/transaction'; +import { type Transaction } from '@/shared/core'; +import { nonNullable, nullable } from '@/shared/lib/utils'; +import { transactionService } from '@/entities/transaction'; type Params = { $transaction: Store; diff --git a/src/renderer/features/governance/lib/createMultipleTxStore.ts b/src/renderer/features/governance/lib/createMultipleTxStore.ts index 69806ef2e6..39f95e624d 100644 --- a/src/renderer/features/governance/lib/createMultipleTxStore.ts +++ b/src/renderer/features/governance/lib/createMultipleTxStore.ts @@ -1,10 +1,10 @@ import { type ApiPromise } from '@polkadot/api'; import { type Store, combine, createStore } from 'effector'; +import { type Account, type Chain, type Transaction, type Wallet } from '@/shared/core'; import { nullable } from '@/shared/lib/utils'; -import { type Account, type Chain, type Transaction, type Wallet } from '@shared/core'; -import { transactionService } from '@entities/transaction'; -import { accountUtils, walletUtils } from '@entities/wallet'; +import { transactionService } from '@/entities/transaction'; +import { accountUtils, walletUtils } from '@/entities/wallet'; import { createFeeCalculator } from './createFeeCalculator'; diff --git a/src/renderer/features/governance/lib/createTransactionForm.ts b/src/renderer/features/governance/lib/createTransactionForm.ts index ed6128e6db..09039201da 100644 --- a/src/renderer/features/governance/lib/createTransactionForm.ts +++ b/src/renderer/features/governance/lib/createTransactionForm.ts @@ -12,11 +12,11 @@ import { type Chain, type Transaction, type Wallet, -} from '@shared/core'; -import { nullable, toAddress, transferableAmountBN } from '@shared/lib/utils'; -import { balanceUtils } from '@entities/balance'; -import { transactionService } from '@entities/transaction'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { nullable, toAddress, transferableAmountBN } from '@/shared/lib/utils'; +import { balanceUtils } from '@/entities/balance'; +import { transactionService } from '@/entities/transaction'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { createTxStore } from './createTxStore'; diff --git a/src/renderer/features/governance/lib/createTxStore.ts b/src/renderer/features/governance/lib/createTxStore.ts index 244349b6f9..73324629e8 100644 --- a/src/renderer/features/governance/lib/createTxStore.ts +++ b/src/renderer/features/governance/lib/createTxStore.ts @@ -1,10 +1,10 @@ import { type ApiPromise } from '@polkadot/api'; import { type Store, combine, createStore } from 'effector'; +import { type Account, type Chain, type Transaction, type Wallet } from '@/shared/core'; import { nullable } from '@/shared/lib/utils'; -import { type Account, type Chain, type Transaction, type Wallet } from '@shared/core'; -import { transactionService } from '@entities/transaction'; -import { accountUtils, walletUtils } from '@entities/wallet'; +import { transactionService } from '@/entities/transaction'; +import { accountUtils, walletUtils } from '@/entities/wallet'; import { createFeeCalculator } from './createFeeCalculator'; diff --git a/src/renderer/features/governance/lib/unlock-rules.ts b/src/renderer/features/governance/lib/unlock-rules.ts index 669bc775ae..53421e5d54 100644 --- a/src/renderer/features/governance/lib/unlock-rules.ts +++ b/src/renderer/features/governance/lib/unlock-rules.ts @@ -1,14 +1,14 @@ import { BN, BN_ZERO } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; +import { type Account } from '@/shared/core'; import { type AmountFeeStore, type ShardsProxyFeeStore, type SignatoryFeeStore, balanceValidation, descriptionValidation, -} from '@features/operations/OperationsValidation'; +} from '@/features/operations/OperationsValidation'; export const UnlockRules = { shards: { diff --git a/src/renderer/features/governance/lib/unlockService.ts b/src/renderer/features/governance/lib/unlockService.ts index f638f136a6..b4741c53ee 100644 --- a/src/renderer/features/governance/lib/unlockService.ts +++ b/src/renderer/features/governance/lib/unlockService.ts @@ -1,5 +1,5 @@ -import { type Chunks, type UnlockChunk } from '@shared/api/governance'; -import { type Address } from '@shared/core'; +import { type Chunks, type UnlockChunk } from '@/shared/api/governance'; +import { type Address } from '@/shared/core'; export const unlockService = { filterClaims, diff --git a/src/renderer/features/governance/lib/votingListService.ts b/src/renderer/features/governance/lib/votingListService.ts index 7db0295914..c433b77832 100644 --- a/src/renderer/features/governance/lib/votingListService.ts +++ b/src/renderer/features/governance/lib/votingListService.ts @@ -1,6 +1,6 @@ -import { type ReferendumId, type Voting } from '@shared/core'; -import { votingService } from '@entities/governance'; -import { type VoteHistoryRecord } from '@entities/governance/model/voteHistory'; +import { type ReferendumId, type Voting } from '@/shared/core'; +import { votingService } from '@/entities/governance'; +import { type VoteHistoryRecord } from '@/entities/governance'; import { type DecoupledVote } from '../types/structs'; const getDecoupledVotesFromVote = (referendumId: ReferendumId, voting: Voting) => { diff --git a/src/renderer/features/governance/model/delegatedVotes.ts b/src/renderer/features/governance/model/delegatedVotes.ts index 6dd77c06b8..299e508cc4 100644 --- a/src/renderer/features/governance/model/delegatedVotes.ts +++ b/src/renderer/features/governance/model/delegatedVotes.ts @@ -1,8 +1,8 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; import { readonly } from 'patronum'; -import { delegationService } from '@shared/api/governance'; -import { type Address, type Chain, type ChainId, type ReferendumId } from '@shared/core'; +import { delegationService } from '@/shared/api/governance'; +import { type Address, type Chain, type ChainId, type ReferendumId } from '@/shared/core'; const $delegatedVotes = createStore>>({}); diff --git a/src/renderer/features/governance/model/description.ts b/src/renderer/features/governance/model/description.ts index dbac194f50..010e2eab7d 100644 --- a/src/renderer/features/governance/model/description.ts +++ b/src/renderer/features/governance/model/description.ts @@ -1,9 +1,9 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { type GovernanceApi } from '@shared/api/governance'; -import { type Chain, type ChainId, type Referendum, type ReferendumId } from '@shared/core'; -import { pickNestedValue, setNestedValue } from '@shared/lib/utils'; -import { governanceModel } from '@entities/governance'; +import { type GovernanceApi } from '@/shared/api/governance'; +import { type Chain, type ChainId, type Referendum, type ReferendumId } from '@/shared/core'; +import { pickNestedValue, setNestedValue } from '@/shared/lib/utils'; +import { governanceModel } from '@/entities/governance'; const $descriptions = createStore>>({}); diff --git a/src/renderer/features/governance/model/filter.ts b/src/renderer/features/governance/model/filter.ts index 5e4b8fdd81..77bc6df495 100644 --- a/src/renderer/features/governance/model/filter.ts +++ b/src/renderer/features/governance/model/filter.ts @@ -1,7 +1,7 @@ import { combine, createEvent, createStore, restore, sample } from 'effector'; import { debounce } from 'patronum'; -import { type DropdownResult } from '@shared/ui/types'; +import { type DropdownResult } from '@/shared/ui/types'; const queryChanged = createEvent(); const selectedTracksChanged = createEvent(); diff --git a/src/renderer/features/governance/model/lockPeriods.ts b/src/renderer/features/governance/model/lockPeriods.ts index dc7f71c475..cc90d2be4a 100644 --- a/src/renderer/features/governance/model/lockPeriods.ts +++ b/src/renderer/features/governance/model/lockPeriods.ts @@ -2,8 +2,8 @@ import { type ApiPromise } from '@polkadot/api'; import { createEffect, createEvent, createStore, sample } from 'effector'; import { readonly } from 'patronum'; -import { type Chain, type ChainId, type Conviction } from '@shared/core'; -import { locksService } from '@entities/governance'; +import { type Chain, type ChainId, type Conviction } from '@/shared/core'; +import { locksService } from '@/entities/governance'; type Store = Record>; type RequestParams = { api: ApiPromise; chain: Chain }; diff --git a/src/renderer/features/governance/model/locks.ts b/src/renderer/features/governance/model/locks.ts index 7fdf9f4ac3..837c9a5322 100644 --- a/src/renderer/features/governance/model/locks.ts +++ b/src/renderer/features/governance/model/locks.ts @@ -3,10 +3,10 @@ import { BN, BN_ZERO } from '@polkadot/util'; import { combine, createEffect, createEvent, createStore, sample } from 'effector'; import { readonly } from 'patronum'; -import { type Address, type Chain, type ChainId, type TrackId } from '@shared/core'; -import { nonNullable, nullable } from '@shared/lib/utils'; +import { type Address, type Chain, type ChainId, type TrackId } from '@/shared/core'; +import { nonNullable, nullable } from '@/shared/lib/utils'; import { createSubscriber, governanceService, governanceSubscribeService } from '@/entities/governance'; -import { accountUtils, walletModel } from '@entities/wallet'; +import { accountUtils, walletModel } from '@/entities/wallet'; import { networkSelectorModel } from './networkSelector'; diff --git a/src/renderer/features/governance/model/networkSelector.ts b/src/renderer/features/governance/model/networkSelector.ts index 4c711f955f..e7c78045f8 100644 --- a/src/renderer/features/governance/model/networkSelector.ts +++ b/src/renderer/features/governance/model/networkSelector.ts @@ -1,9 +1,9 @@ import { combine, createEvent, restore, sample } from 'effector'; -import { type Chain, type ConnectionStatus } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; +import { type Chain, type ConnectionStatus } from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel, networkUtils } from '@/entities/network'; import { accountUtils, walletModel } from '@/entities/wallet'; -import { networkModel, networkUtils } from '@entities/network'; const selectNetwork = createEvent(); const resetNetwork = createEvent(); diff --git a/src/renderer/features/governance/model/offChain.ts b/src/renderer/features/governance/model/offChain.ts index 69e7b62b96..ef44f1b3af 100644 --- a/src/renderer/features/governance/model/offChain.ts +++ b/src/renderer/features/governance/model/offChain.ts @@ -1,7 +1,7 @@ import { combine, createEvent, createStore, sample } from 'effector'; import { createForm } from 'effector-forms'; -import { type GovernanceApiSource, governanceModel } from '@entities/governance'; +import { type GovernanceApiSource, governanceModel } from '@/entities/governance'; const flowStarted = createEvent(); const flowClosed = createEvent(); diff --git a/src/renderer/features/governance/model/timeline.ts b/src/renderer/features/governance/model/timeline.ts index a5755c1cf0..7f6514e0a9 100644 --- a/src/renderer/features/governance/model/timeline.ts +++ b/src/renderer/features/governance/model/timeline.ts @@ -3,10 +3,10 @@ import { combine, createEffect, createEvent, createStore, sample } from 'effecto import { produce } from 'immer'; import { readonly } from 'patronum'; -import { type GovernanceApi, type ReferendumTimelineRecord } from '@shared/api/governance'; -import { type Chain, type ChainId, type Referendum, type ReferendumId } from '@shared/core'; -import { getCreatedDateFromApi, nonNullable } from '@shared/lib/utils'; -import { governanceModel, referendumService } from '@entities/governance'; +import { type GovernanceApi, type ReferendumTimelineRecord } from '@/shared/api/governance'; +import { type Chain, type ChainId, type Referendum, type ReferendumId } from '@/shared/core'; +import { getCreatedDateFromApi, nonNullable } from '@/shared/lib/utils'; +import { governanceModel, referendumService } from '@/entities/governance'; import { networkSelectorModel } from './networkSelector'; diff --git a/src/renderer/features/governance/model/title.ts b/src/renderer/features/governance/model/title.ts index e0992a77f8..5d66ecdb2e 100644 --- a/src/renderer/features/governance/model/title.ts +++ b/src/renderer/features/governance/model/title.ts @@ -1,9 +1,9 @@ import { createStore, sample } from 'effector'; -import { type GovernanceApi } from '@shared/api/governance'; -import { type Chain, type ChainId, type ReferendumId } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; -import { governanceModel } from '@entities/governance'; +import { type GovernanceApi } from '@/shared/api/governance'; +import { type Chain, type ChainId, type ReferendumId } from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { governanceModel } from '@/entities/governance'; import { createChunksEffect } from '../utils/createChunksEffect'; import { networkSelectorModel } from './networkSelector'; diff --git a/src/renderer/features/governance/model/unlock/unlock-validate-model.ts b/src/renderer/features/governance/model/unlock/unlock-validate-model.ts index fceea3943a..cde1cf5b2d 100644 --- a/src/renderer/features/governance/model/unlock/unlock-validate-model.ts +++ b/src/renderer/features/governance/model/unlock/unlock-validate-model.ts @@ -4,12 +4,12 @@ import { BN, BN_ZERO } from '@polkadot/util'; import { type Store, createEffect, createEvent, sample } from 'effector'; import { combineEvents } from 'patronum'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId, transferableAmount } from '@shared/lib/utils'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; import { governanceService } from '@/entities/governance'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; // TODO: fix it after DDD refactoring import { type AmountFeeStore, diff --git a/src/renderer/features/governance/model/unlock/unlock.ts b/src/renderer/features/governance/model/unlock/unlock.ts index e335f08168..c991be8b24 100644 --- a/src/renderer/features/governance/model/unlock/unlock.ts +++ b/src/renderer/features/governance/model/unlock/unlock.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type BN, BN_ZERO } from '@polkadot/util'; import { combine, createEffect, createStore, sample } from 'effector'; -import { type ClaimTimeAt, type UnlockChunk, UnlockChunkType } from '@shared/api/governance'; -import { type Address, type Referendum, type TrackId, type TrackInfo, type VotingMap } from '@shared/core'; -import { getCreatedDateFromApi, getCurrentBlockNumber, nonNullable, nullable } from '@shared/lib/utils'; -import { claimScheduleService, referendumModel, tracksModel, votingModel } from '@entities/governance'; -import { walletModel } from '@entities/wallet'; +import { type ClaimTimeAt, type UnlockChunk, UnlockChunkType } from '@/shared/api/governance'; +import { type Address, type Referendum, type TrackId, type TrackInfo, type VotingMap } from '@/shared/core'; +import { getCreatedDateFromApi, getCurrentBlockNumber, nonNullable, nullable } from '@/shared/lib/utils'; +import { claimScheduleService, referendumModel, tracksModel, votingModel } from '@/entities/governance'; +import { walletModel } from '@/entities/wallet'; import { unlockService } from '../../lib/unlockService'; import { locksModel } from '../locks'; import { networkSelectorModel } from '../networkSelector'; diff --git a/src/renderer/features/governance/model/vote/voteValidateModel.ts b/src/renderer/features/governance/model/vote/voteValidateModel.ts index a32c608f81..890502e5b8 100644 --- a/src/renderer/features/governance/model/vote/voteValidateModel.ts +++ b/src/renderer/features/governance/model/vote/voteValidateModel.ts @@ -3,12 +3,12 @@ import { type SignerOptions } from '@polkadot/api/submittable/types'; import { BN, BN_ZERO } from '@polkadot/util'; import { createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { governanceService, referendumService, votingService } from '@entities/governance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { governanceService, referendumService, votingService } from '@/entities/governance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { type AmountFeeStore, type Validation, diff --git a/src/renderer/features/governance/model/votingSummary.ts b/src/renderer/features/governance/model/votingSummary.ts index 113b9b2ffe..2f58588aa1 100644 --- a/src/renderer/features/governance/model/votingSummary.ts +++ b/src/renderer/features/governance/model/votingSummary.ts @@ -2,10 +2,10 @@ import { createEffect, createEvent, createStore, sample, split } from 'effector' import { createGate } from 'effector-react'; import { readonly } from 'patronum'; -import { type GovernanceApi } from '@shared/api/governance'; -import { type Chain, type ChainId, type Referendum, type ReferendumId, type Tally } from '@shared/core'; -import { nonNullable, setNestedValue } from '@shared/lib/utils'; -import { governanceModel, referendumService } from '@entities/governance'; +import { type GovernanceApi } from '@/shared/api/governance'; +import { type Chain, type ChainId, type Referendum, type ReferendumId, type Tally } from '@/shared/core'; +import { nonNullable, setNestedValue } from '@/shared/lib/utils'; +import { governanceModel, referendumService } from '@/entities/governance'; const flow = createGate<{ chain: Chain; referendum: Referendum }>(); diff --git a/src/renderer/features/governance/types/structs.ts b/src/renderer/features/governance/types/structs.ts index d9255fd197..9d578e400e 100644 --- a/src/renderer/features/governance/types/structs.ts +++ b/src/renderer/features/governance/types/structs.ts @@ -13,7 +13,7 @@ import { type ReferendumStatus, type Transaction, type VotingThreshold, -} from '@shared/core'; +} from '@/shared/core'; export type AggregatedReferendum = T & { title: string | null; diff --git a/src/renderer/features/governance/utils/getLocksForAddress.ts b/src/renderer/features/governance/utils/getLocksForAddress.ts index 9b58979faf..b655914659 100644 --- a/src/renderer/features/governance/utils/getLocksForAddress.ts +++ b/src/renderer/features/governance/utils/getLocksForAddress.ts @@ -1,7 +1,7 @@ import { BN, BN_ZERO } from '@polkadot/util'; -import { type Address, type TrackId } from '@shared/core'; -import { nullable } from '@shared/lib/utils'; +import { type Address, type TrackId } from '@/shared/core'; +import { nullable } from '@/shared/lib/utils'; export const getLocksForAddress = (address: string, trackLocks: Record>): BN => { const locks = trackLocks[address]; diff --git a/src/renderer/features/navigation/ui/NavItem.tsx b/src/renderer/features/navigation/ui/NavItem.tsx index a65ac6d460..7170cc407b 100644 --- a/src/renderer/features/navigation/ui/NavItem.tsx +++ b/src/renderer/features/navigation/ui/NavItem.tsx @@ -1,10 +1,10 @@ import { type ReactNode } from 'react'; import { NavLink } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { BodyText, Icon } from '@shared/ui'; -import { type IconNames } from '@shared/ui/Icon/data'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BodyText, Icon } from '@/shared/ui'; +import { type IconNames } from '@/shared/ui/Icon/data'; export type Props = { title: string; diff --git a/src/renderer/features/navigation/ui/Navigation.tsx b/src/renderer/features/navigation/ui/Navigation.tsx index b985509ec4..47324eb940 100644 --- a/src/renderer/features/navigation/ui/Navigation.tsx +++ b/src/renderer/features/navigation/ui/Navigation.tsx @@ -1,12 +1,12 @@ import { useUnit } from 'effector-react'; -import { MultisigTxInitStatus } from '@shared/core'; -import { Paths } from '@shared/routes'; -import { BodyText } from '@shared/ui'; -import { basketModel } from '@entities/basket'; -import { useMultisigTx } from '@entities/multisig'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { MultisigTxInitStatus } from '@/shared/core'; +import { Paths } from '@/shared/routes'; +import { BodyText } from '@/shared/ui'; +import { basketModel } from '@/entities/basket'; +import { useMultisigTx } from '@/entities/multisig'; +import { networkModel } from '@/entities/network'; +import { walletModel, walletUtils } from '@/entities/wallet'; import { basketUtils } from '../../operations/OperationsConfirm'; import { NavItem, type Props as NavItemProps } from './NavItem'; diff --git a/src/renderer/features/network/ManageCustomRpcNode/lib/custom-rpc-utils.ts b/src/renderer/features/network/ManageCustomRpcNode/lib/custom-rpc-utils.ts index 607a416db2..95e5ea8ed1 100644 --- a/src/renderer/features/network/ManageCustomRpcNode/lib/custom-rpc-utils.ts +++ b/src/renderer/features/network/ManageCustomRpcNode/lib/custom-rpc-utils.ts @@ -1,4 +1,4 @@ -import { type RpcNode } from '@shared/core'; +import { type RpcNode } from '@/shared/core'; import { RpcValidation } from './types'; diff --git a/src/renderer/features/network/ManageCustomRpcNode/model/add-custom-rpc-model.ts b/src/renderer/features/network/ManageCustomRpcNode/model/add-custom-rpc-model.ts index 2ac3e505b8..8518db0860 100644 --- a/src/renderer/features/network/ManageCustomRpcNode/model/add-custom-rpc-model.ts +++ b/src/renderer/features/network/ManageCustomRpcNode/model/add-custom-rpc-model.ts @@ -4,9 +4,9 @@ import { combine, createEffect, createEvent, createStore, merge, sample, scopeBi import { createForm } from 'effector-forms'; import { delay, spread } from 'patronum'; -import { storageService } from '@shared/api/storage'; -import { type ChainId, type Connection, type HexString, type RpcNode } from '@shared/core'; -import { networkModel } from '@entities/network'; +import { storageService } from '@/shared/api/storage'; +import { type ChainId, type Connection, type HexString, type RpcNode } from '@/shared/core'; +import { networkModel } from '@/entities/network'; import { CONNECTION_TIMEOUT, FieldRules } from '../lib/constants'; import { customRpcUtils } from '../lib/custom-rpc-utils'; import { RpcValidation } from '../lib/types'; diff --git a/src/renderer/features/network/ManageCustomRpcNode/model/edit-custom-rpc-model.ts b/src/renderer/features/network/ManageCustomRpcNode/model/edit-custom-rpc-model.ts index 4a3f5662e5..04f0507b2d 100644 --- a/src/renderer/features/network/ManageCustomRpcNode/model/edit-custom-rpc-model.ts +++ b/src/renderer/features/network/ManageCustomRpcNode/model/edit-custom-rpc-model.ts @@ -4,9 +4,9 @@ import { combine, createEffect, createEvent, createStore, merge, sample, scopeBi import { createForm } from 'effector-forms'; import { delay, spread } from 'patronum'; -import { storageService } from '@shared/api/storage'; -import { type ChainId, type Connection, type HexString, type RpcNode } from '@shared/core'; -import { networkModel } from '@entities/network'; +import { storageService } from '@/shared/api/storage'; +import { type ChainId, type Connection, type HexString, type RpcNode } from '@/shared/core'; +import { networkModel } from '@/entities/network'; import { CONNECTION_TIMEOUT, FieldRules } from '../lib/constants'; import { customRpcUtils } from '../lib/custom-rpc-utils'; import { RpcValidation } from '../lib/types'; diff --git a/src/renderer/features/network/ManageCustomRpcNode/model/remove-custom-rpc-model.ts b/src/renderer/features/network/ManageCustomRpcNode/model/remove-custom-rpc-model.ts index 224d74ef36..455bbec1fe 100644 --- a/src/renderer/features/network/ManageCustomRpcNode/model/remove-custom-rpc-model.ts +++ b/src/renderer/features/network/ManageCustomRpcNode/model/remove-custom-rpc-model.ts @@ -1,8 +1,8 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type ChainId, type Connection, type RpcNode } from '@shared/core'; -import { networkModel } from '@entities/network'; +import { storageService } from '@/shared/api/storage'; +import { type ChainId, type Connection, type RpcNode } from '@/shared/core'; +import { networkModel } from '@/entities/network'; const flowFinished = createEvent<{ chainId: ChainId; node: RpcNode }>(); diff --git a/src/renderer/features/network/ManageCustomRpcNode/ui/AddCustomRpcModal.tsx b/src/renderer/features/network/ManageCustomRpcNode/ui/AddCustomRpcModal.tsx index 5a1934f7be..c09e07127c 100644 --- a/src/renderer/features/network/ManageCustomRpcNode/ui/AddCustomRpcModal.tsx +++ b/src/renderer/features/network/ManageCustomRpcNode/ui/AddCustomRpcModal.tsx @@ -2,10 +2,10 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent } from 'react'; -import { useI18n } from '@app/providers'; -import { useModalClose } from '@shared/lib/hooks'; -import { Alert, BaseModal, Button, Input, InputHint } from '@shared/ui'; -import { OperationTitle } from '@entities/chain'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { Alert, BaseModal, Button, Input, InputHint } from '@/shared/ui'; +import { OperationTitle } from '@/entities/chain'; import { customRpcUtils } from '../lib/custom-rpc-utils'; import { addCustomRpcModel } from '../model/add-custom-rpc-model'; diff --git a/src/renderer/features/network/ManageCustomRpcNode/ui/EditCustomRpcModal.tsx b/src/renderer/features/network/ManageCustomRpcNode/ui/EditCustomRpcModal.tsx index 26aad33433..36d77e7ada 100644 --- a/src/renderer/features/network/ManageCustomRpcNode/ui/EditCustomRpcModal.tsx +++ b/src/renderer/features/network/ManageCustomRpcNode/ui/EditCustomRpcModal.tsx @@ -2,10 +2,10 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent } from 'react'; -import { useI18n } from '@app/providers'; -import { useModalClose } from '@shared/lib/hooks'; -import { Alert, BaseModal, Button, Input, InputHint } from '@shared/ui'; -import { OperationTitle } from '@entities/chain'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { Alert, BaseModal, Button, Input, InputHint } from '@/shared/ui'; +import { OperationTitle } from '@/entities/chain'; import { customRpcUtils } from '../lib/custom-rpc-utils'; import { editCustomRpcModel } from '../model/edit-custom-rpc-model'; diff --git a/src/renderer/features/network/NetworkList/lib/networks-list-utils.ts b/src/renderer/features/network/NetworkList/lib/networks-list-utils.ts index 3c85c8c668..9a1b4d6617 100644 --- a/src/renderer/features/network/NetworkList/lib/networks-list-utils.ts +++ b/src/renderer/features/network/NetworkList/lib/networks-list-utils.ts @@ -1,5 +1,5 @@ -import { type Chain, type ChainId, type Connection, type ConnectionStatus } from '@shared/core'; -import { type ExtendedChain, networkUtils } from '@entities/network'; +import { type Chain, type ChainId, type Connection, type ConnectionStatus } from '@/shared/core'; +import { type ExtendedChain, networkUtils } from '@/entities/network'; export const networksListUtils = { getExtendedChain, diff --git a/src/renderer/features/network/NetworkList/model/__tests__/active-networks-model.test.ts b/src/renderer/features/network/NetworkList/model/__tests__/active-networks-model.test.ts index a37ab0fe54..883dc17a83 100644 --- a/src/renderer/features/network/NetworkList/model/__tests__/active-networks-model.test.ts +++ b/src/renderer/features/network/NetworkList/model/__tests__/active-networks-model.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { networkModel } from '@entities/network'; +import { networkModel } from '@/entities/network'; import { activeNetworksModel } from '../active-networks-model'; import { networksMock } from './mocks/networks-mock'; diff --git a/src/renderer/features/network/NetworkList/model/__tests__/inactive-networks-model.test.ts b/src/renderer/features/network/NetworkList/model/__tests__/inactive-networks-model.test.ts index 0c8857fd4e..879475b0ec 100644 --- a/src/renderer/features/network/NetworkList/model/__tests__/inactive-networks-model.test.ts +++ b/src/renderer/features/network/NetworkList/model/__tests__/inactive-networks-model.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { networkModel } from '@entities/network'; +import { networkModel } from '@/entities/network'; import { inactiveNetworksModel } from '../inactive-networks-model'; import { networksMock } from './mocks/networks-mock'; diff --git a/src/renderer/features/network/NetworkList/model/__tests__/mocks/networks-mock.ts b/src/renderer/features/network/NetworkList/model/__tests__/mocks/networks-mock.ts index a5d217d28a..584e7ce019 100644 --- a/src/renderer/features/network/NetworkList/model/__tests__/mocks/networks-mock.ts +++ b/src/renderer/features/network/NetworkList/model/__tests__/mocks/networks-mock.ts @@ -1,4 +1,4 @@ -import { ConnectionStatus, ConnectionType } from '@shared/core'; +import { ConnectionStatus, ConnectionType } from '@/shared/core'; const chains = [ { name: 'Test chain 1', chainId: '0x01' }, diff --git a/src/renderer/features/network/NetworkList/model/active-networks-model.ts b/src/renderer/features/network/NetworkList/model/active-networks-model.ts index 9823ea574b..08916ec2d4 100644 --- a/src/renderer/features/network/NetworkList/model/active-networks-model.ts +++ b/src/renderer/features/network/NetworkList/model/active-networks-model.ts @@ -1,7 +1,7 @@ import { combine, createEvent, createStore, sample } from 'effector'; -import { type Chain } from '@shared/core'; -import { networkModel, networkUtils } from '@entities/network'; +import { type Chain } from '@/shared/core'; +import { networkModel, networkUtils } from '@/entities/network'; import { networksListUtils } from '../lib/networks-list-utils'; const networksChanged = createEvent(); diff --git a/src/renderer/features/network/NetworkList/model/inactive-networks-model.ts b/src/renderer/features/network/NetworkList/model/inactive-networks-model.ts index 13b9c573d8..76cf2c70e7 100644 --- a/src/renderer/features/network/NetworkList/model/inactive-networks-model.ts +++ b/src/renderer/features/network/NetworkList/model/inactive-networks-model.ts @@ -1,7 +1,7 @@ import { combine, createEvent, createStore, sample } from 'effector'; -import { type Chain } from '@shared/core'; -import { networkModel, networkUtils } from '@entities/network'; +import { type Chain } from '@/shared/core'; +import { networkModel, networkUtils } from '@/entities/network'; import { networksListUtils } from '../lib/networks-list-utils'; const networksChanged = createEvent(); diff --git a/src/renderer/features/network/NetworkList/ui/ActiveNetwork.tsx b/src/renderer/features/network/NetworkList/ui/ActiveNetwork.tsx index e1d2f1900a..ceee82f52e 100644 --- a/src/renderer/features/network/NetworkList/ui/ActiveNetwork.tsx +++ b/src/renderer/features/network/NetworkList/ui/ActiveNetwork.tsx @@ -1,11 +1,11 @@ import { type TFunction } from 'i18next'; import { type PropsWithChildren } from 'react'; -import { useI18n } from '@app/providers'; -import { ConnectionStatus } from '@shared/core'; -import { BodyText, FootnoteText, HelpText, StatusLabel } from '@shared/ui'; -import { ChainIcon } from '@entities/chain'; -import { type ExtendedChain } from '@entities/network'; +import { ConnectionStatus } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, FootnoteText, HelpText, StatusLabel } from '@/shared/ui'; +import { ChainIcon } from '@/entities/chain'; +import { type ExtendedChain } from '@/entities/network'; import './styles.css'; const Status = { diff --git a/src/renderer/features/network/NetworkList/ui/EmptyNetworks.tsx b/src/renderer/features/network/NetworkList/ui/EmptyNetworks.tsx index 4e31719d06..4259841e67 100644 --- a/src/renderer/features/network/NetworkList/ui/EmptyNetworks.tsx +++ b/src/renderer/features/network/NetworkList/ui/EmptyNetworks.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; import { activeNetworksModel } from '../model/active-networks-model'; import { inactiveNetworksModel } from '../model/inactive-networks-model'; diff --git a/src/renderer/features/network/NetworkList/ui/InactiveNetwork.tsx b/src/renderer/features/network/NetworkList/ui/InactiveNetwork.tsx index ea567a5c9e..6771ab851c 100644 --- a/src/renderer/features/network/NetworkList/ui/InactiveNetwork.tsx +++ b/src/renderer/features/network/NetworkList/ui/InactiveNetwork.tsx @@ -1,8 +1,8 @@ import { type PropsWithChildren } from 'react'; -import { BodyText, HelpText } from '@shared/ui'; -import { ChainIcon } from '@entities/chain'; -import { type ExtendedChain } from '@entities/network'; +import { BodyText, HelpText } from '@/shared/ui'; +import { ChainIcon } from '@/entities/chain'; +import { type ExtendedChain } from '@/entities/network'; type Props = { networkItem: ExtendedChain; diff --git a/src/renderer/features/network/NetworkList/ui/NetworkList.tsx b/src/renderer/features/network/NetworkList/ui/NetworkList.tsx index d6ae31555b..5a3551c67c 100644 --- a/src/renderer/features/network/NetworkList/ui/NetworkList.tsx +++ b/src/renderer/features/network/NetworkList/ui/NetworkList.tsx @@ -1,8 +1,8 @@ import { type ReactNode, useEffect, useRef } from 'react'; -import { useToggle } from '@shared/lib/hooks'; -import { Accordion, CaptionText, Counter } from '@shared/ui'; -import { type ExtendedChain } from '@entities/network'; +import { useToggle } from '@/shared/lib/hooks'; +import { Accordion, CaptionText, Counter } from '@/shared/ui'; +import { type ExtendedChain } from '@/entities/network'; import { networksListUtils } from '../lib/networks-list-utils'; type Props = { diff --git a/src/renderer/features/network/NetworkSelector/lib/__tests__/network-selector-utils.test.ts b/src/renderer/features/network/NetworkSelector/lib/__tests__/network-selector-utils.test.ts index a164083ce2..6248e3e8fe 100644 --- a/src/renderer/features/network/NetworkSelector/lib/__tests__/network-selector-utils.test.ts +++ b/src/renderer/features/network/NetworkSelector/lib/__tests__/network-selector-utils.test.ts @@ -1,5 +1,5 @@ -import { ConnectionStatus, ConnectionType } from '@shared/core'; -import { type ExtendedChain } from '@entities/network'; +import { ConnectionStatus, ConnectionType } from '@/shared/core'; +import { type ExtendedChain } from '@/entities/network'; import { networkSelectorUtils } from '../network-selector-utils'; const defaultNetwork: ExtendedChain = { diff --git a/src/renderer/features/network/NetworkSelector/lib/network-selector-utils.ts b/src/renderer/features/network/NetworkSelector/lib/network-selector-utils.ts index 7ab011f318..67d6f53af4 100644 --- a/src/renderer/features/network/NetworkSelector/lib/network-selector-utils.ts +++ b/src/renderer/features/network/NetworkSelector/lib/network-selector-utils.ts @@ -1,5 +1,5 @@ -import { ConnectionType } from '@shared/core'; -import { type ExtendedChain } from '@entities/network'; +import { ConnectionType } from '@/shared/core'; +import { type ExtendedChain } from '@/entities/network'; import { type ConnectionItem } from './types'; diff --git a/src/renderer/features/network/NetworkSelector/lib/types.ts b/src/renderer/features/network/NetworkSelector/lib/types.ts index dcd1a31bb4..3d9ec0928a 100644 --- a/src/renderer/features/network/NetworkSelector/lib/types.ts +++ b/src/renderer/features/network/NetworkSelector/lib/types.ts @@ -1,4 +1,4 @@ -import { type ConnectionType, type RpcNode } from '@shared/core'; +import { type ConnectionType, type RpcNode } from '@/shared/core'; export type SelectorPayload = { type: ConnectionType; diff --git a/src/renderer/features/network/NetworkSelector/model/__tests__/network-selector-model.test.ts b/src/renderer/features/network/NetworkSelector/model/__tests__/network-selector-model.test.ts index 2ccf14d790..78cd68e81a 100644 --- a/src/renderer/features/network/NetworkSelector/model/__tests__/network-selector-model.test.ts +++ b/src/renderer/features/network/NetworkSelector/model/__tests__/network-selector-model.test.ts @@ -1,8 +1,8 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { type Connection, ConnectionType, type RpcNode } from '@shared/core'; -import { networkModel } from '@entities/network'; +import { storageService } from '@/shared/api/storage'; +import { type Connection, ConnectionType, type RpcNode } from '@/shared/core'; +import { networkModel } from '@/entities/network'; import { networkSelectorModel } from '../network-selector-model'; describe('features/network/NetworkSelector/model/network-selector-model', () => { diff --git a/src/renderer/features/network/NetworkSelector/model/network-selector-model.ts b/src/renderer/features/network/NetworkSelector/model/network-selector-model.ts index bacabca6d1..57f8005f01 100644 --- a/src/renderer/features/network/NetworkSelector/model/network-selector-model.ts +++ b/src/renderer/features/network/NetworkSelector/model/network-selector-model.ts @@ -1,9 +1,9 @@ import { createEffect, createEvent, createStore, sample } from 'effector'; import { spread } from 'patronum'; -import { storageService } from '@shared/api/storage'; -import { type ChainId, type Connection, ConnectionType, type RpcNode } from '@shared/core'; -import { networkModel, networkUtils } from '@entities/network'; +import { storageService } from '@/shared/api/storage'; +import { type ChainId, type Connection, ConnectionType, type RpcNode } from '@/shared/core'; +import { networkModel, networkUtils } from '@/entities/network'; const lightClientSelected = createEvent(); const autoBalanceSelected = createEvent(); diff --git a/src/renderer/features/network/NetworkSelector/ui/NetworkSelector.tsx b/src/renderer/features/network/NetworkSelector/ui/NetworkSelector.tsx index e295bac52f..35d53e8f5c 100644 --- a/src/renderer/features/network/NetworkSelector/ui/NetworkSelector.tsx +++ b/src/renderer/features/network/NetworkSelector/ui/NetworkSelector.tsx @@ -2,15 +2,15 @@ import { Listbox, Transition } from '@headlessui/react'; import { type TFunction } from 'i18next'; import { Fragment } from 'react'; -import { useI18n } from '@app/providers'; -import { type RpcNode } from '@shared/core'; -import { ConnectionType } from '@shared/core'; -import { useScrollTo } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; -import { Button, FootnoteText, HelpText, Icon, IconButton } from '@shared/ui'; -import { OptionStyle, SelectButtonStyle } from '@shared/ui/Dropdowns/common/constants'; -import { CommonInputStyles, CommonInputStylesTheme } from '@shared/ui/Inputs/common/styles'; -import { type Theme } from '@shared/ui/types'; +import { type RpcNode } from '@/shared/core'; +import { ConnectionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useScrollTo } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; +import { Button, FootnoteText, HelpText, Icon, IconButton } from '@/shared/ui'; +import { OptionStyle, SelectButtonStyle } from '@/shared/ui/Dropdowns/common/constants'; +import { CommonInputStyles, CommonInputStylesTheme } from '@/shared/ui/Inputs/common/styles'; +import { type Theme } from '@/shared/ui/types'; import { type ConnectionItem, type SelectorPayload } from '../lib/types'; const TRANSITION_DURATION = 100; diff --git a/src/renderer/features/network/NetworksFilter/model/networks-filter-model.ts b/src/renderer/features/network/NetworksFilter/model/networks-filter-model.ts index a52dc0646f..d540884cc2 100644 --- a/src/renderer/features/network/NetworksFilter/model/networks-filter-model.ts +++ b/src/renderer/features/network/NetworksFilter/model/networks-filter-model.ts @@ -1,7 +1,7 @@ import { combine, createEvent, createStore, sample } from 'effector'; -import { includes } from '@shared/lib/utils'; -import { networkModel } from '@entities/network'; +import { includes } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; const formInitiated = createEvent(); const queryChanged = createEvent(); diff --git a/src/renderer/features/network/NetworksFilter/ui/NetworksFilter.tsx b/src/renderer/features/network/NetworksFilter/ui/NetworksFilter.tsx index e685e110a9..e1afefea25 100644 --- a/src/renderer/features/network/NetworksFilter/ui/NetworksFilter.tsx +++ b/src/renderer/features/network/NetworksFilter/ui/NetworksFilter.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { SearchInput } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { SearchInput } from '@/shared/ui'; import { networksFilterModel } from '../model/networks-filter-model'; type Props = { diff --git a/src/renderer/features/network/index.ts b/src/renderer/features/network/index.ts index 96d654964d..0c1cb7319a 100644 --- a/src/renderer/features/network/index.ts +++ b/src/renderer/features/network/index.ts @@ -1,5 +1,11 @@ export { NetworksFilter, networksFilterModel } from './NetworksFilter'; -export { NetworkSelector, networkSelectorModel, networkSelectorUtils } from './NetworkSelector'; +export { + NetworkSelector, + networkSelectorModel, + networkSelectorUtils, + type ConnectionItem, + type SelectorPayload, +} from './NetworkSelector'; export { AddCustomRpcModal, EditCustomRpcModal, diff --git a/src/renderer/features/notifications/EmptyNotifications/ui/EmptyNotifications.tsx b/src/renderer/features/notifications/EmptyNotifications/ui/EmptyNotifications.tsx index 719ce2802e..0349180604 100644 --- a/src/renderer/features/notifications/EmptyNotifications/ui/EmptyNotifications.tsx +++ b/src/renderer/features/notifications/EmptyNotifications/ui/EmptyNotifications.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; -import { notificationModel } from '@entities/notification'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; +import { notificationModel } from '@/entities/notification'; export const EmptyNotifications = () => { const { t } = useI18n(); diff --git a/src/renderer/features/notifications/NotificationsList/lib/constants.ts b/src/renderer/features/notifications/NotificationsList/lib/constants.ts index 4d4758095d..a4205b6caa 100644 --- a/src/renderer/features/notifications/NotificationsList/lib/constants.ts +++ b/src/renderer/features/notifications/NotificationsList/lib/constants.ts @@ -1,4 +1,4 @@ -import { ProxyType } from '@shared/core'; +import { ProxyType } from '@/shared/core'; export const ProxyTypeOperation: Record = { [ProxyType.ANY]: 'proxy.operations.any', diff --git a/src/renderer/features/notifications/NotificationsList/model/__tests__/notification-list-model.test.ts b/src/renderer/features/notifications/NotificationsList/model/__tests__/notification-list-model.test.ts index c301739edb..666dbd2522 100644 --- a/src/renderer/features/notifications/NotificationsList/model/__tests__/notification-list-model.test.ts +++ b/src/renderer/features/notifications/NotificationsList/model/__tests__/notification-list-model.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { notificationModel } from '@entities/notification'; +import { notificationModel } from '@/entities/notification'; import { notificationListModel } from '../notification-list-model'; describe('features/notifications/NotificationList/notification-list-model', () => { diff --git a/src/renderer/features/notifications/NotificationsList/model/notification-list-model.ts b/src/renderer/features/notifications/NotificationsList/model/notification-list-model.ts index b216f2c42e..259b5704c2 100644 --- a/src/renderer/features/notifications/NotificationsList/model/notification-list-model.ts +++ b/src/renderer/features/notifications/NotificationsList/model/notification-list-model.ts @@ -6,7 +6,7 @@ import { combine } from 'effector'; import groupBy from 'lodash/groupBy'; import orderBy from 'lodash/orderBy'; -import { notificationModel } from '@entities/notification'; +import { notificationModel } from '@/entities/notification'; const $notificationGroups = combine(notificationModel.$notifications, (notifications) => { if (notifications.length === 0) return []; diff --git a/src/renderer/features/notifications/NotificationsList/ui/NotificationRow.tsx b/src/renderer/features/notifications/NotificationsList/ui/NotificationRow.tsx index 9a16370846..6dde271b1f 100644 --- a/src/renderer/features/notifications/NotificationsList/ui/NotificationRow.tsx +++ b/src/renderer/features/notifications/NotificationsList/ui/NotificationRow.tsx @@ -1,9 +1,9 @@ import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type MultisigCreated, type Notification, type ProxyAction } from '@shared/core'; -import { NotificationType } from '@shared/core'; -import { FootnoteText } from '@shared/ui'; +import { type MultisigCreated, type Notification, type ProxyAction } from '@/shared/core'; +import { NotificationType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText } from '@/shared/ui'; import { MultisigCreatedNotification } from './notifies/MultisigCreatedNotification'; import { ProxyCreatedNotification } from './notifies/ProxyCreatedNotification'; diff --git a/src/renderer/features/notifications/NotificationsList/ui/NotificationsList.tsx b/src/renderer/features/notifications/NotificationsList/ui/NotificationsList.tsx index caa0426110..9f17014e76 100644 --- a/src/renderer/features/notifications/NotificationsList/ui/NotificationsList.tsx +++ b/src/renderer/features/notifications/NotificationsList/ui/NotificationsList.tsx @@ -1,6 +1,6 @@ import { useUnit } from 'effector-react'; -import { FootnoteText } from '@shared/ui'; +import { FootnoteText } from '@/shared/ui'; import { notificationListModel } from '../model/notification-list-model'; import { NotificationRow } from './NotificationRow'; diff --git a/src/renderer/features/notifications/NotificationsList/ui/notifies/MultisigCreatedNotification.tsx b/src/renderer/features/notifications/NotificationsList/ui/notifies/MultisigCreatedNotification.tsx index 02f47cc78c..6d7d326aa5 100644 --- a/src/renderer/features/notifications/NotificationsList/ui/notifies/MultisigCreatedNotification.tsx +++ b/src/renderer/features/notifications/NotificationsList/ui/notifies/MultisigCreatedNotification.tsx @@ -1,11 +1,11 @@ import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type MultisigCreated } from '@shared/core'; -import { WalletType } from '@shared/core'; -import { BodyText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { WalletIcon } from '@entities/wallet'; +import { type MultisigCreated } from '@/shared/core'; +import { WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BodyText } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { WalletIcon } from '@/entities/wallet'; type Props = { notification: MultisigCreated; diff --git a/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyCreatedNotification.tsx b/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyCreatedNotification.tsx index a3badbdfa7..8cb4378423 100644 --- a/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyCreatedNotification.tsx +++ b/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyCreatedNotification.tsx @@ -1,13 +1,13 @@ import { useUnit } from 'effector-react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type ProxyAction, ProxyVariant, WalletType } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { BodyText, Identicon } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { WalletIcon } from '@entities/wallet'; +import { type ProxyAction, ProxyVariant, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; +import { BodyText, Identicon } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { WalletIcon } from '@/entities/wallet'; import { ProxyTypeOperation } from '../../lib/constants'; type Props = { diff --git a/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyRemovedNotification.tsx b/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyRemovedNotification.tsx index b198ba771f..958610ea2c 100644 --- a/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyRemovedNotification.tsx +++ b/src/renderer/features/notifications/NotificationsList/ui/notifies/ProxyRemovedNotification.tsx @@ -1,13 +1,13 @@ import { useStoreMap } from 'effector-react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type ProxyAction, WalletType } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { BodyText, Identicon } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { WalletIcon } from '@entities/wallet'; +import { type ProxyAction, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; +import { BodyText, Identicon } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { WalletIcon } from '@/entities/wallet'; import { ProxyTypeOperation } from '../../lib/constants'; type Props = { diff --git a/src/renderer/features/operations/OperationSign/lib/operation-sign-utils.ts b/src/renderer/features/operations/OperationSign/lib/operation-sign-utils.ts index 9e3481bafd..26be003697 100644 --- a/src/renderer/features/operations/OperationSign/lib/operation-sign-utils.ts +++ b/src/renderer/features/operations/OperationSign/lib/operation-sign-utils.ts @@ -1,7 +1,7 @@ import { hexToU8a, u8aToHex } from '@polkadot/util'; import { type SessionTypes } from '@walletconnect/types'; -import { type HexString } from '@shared/core'; +import { type HexString } from '@/shared/core'; import { ReconnectStep } from './types'; diff --git a/src/renderer/features/operations/OperationSign/lib/types.ts b/src/renderer/features/operations/OperationSign/lib/types.ts index 52b7b71630..fb0e740224 100644 --- a/src/renderer/features/operations/OperationSign/lib/types.ts +++ b/src/renderer/features/operations/OperationSign/lib/types.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; -import { type Account, type Chain, type ChainId, type HexString, type Transaction, type Wallet } from '@shared/core'; -import { type ValidationErrors } from '@shared/lib/utils'; +import { type Account, type Chain, type ChainId, type HexString, type Transaction, type Wallet } from '@/shared/core'; +import { type ValidationErrors } from '@/shared/lib/utils'; export const enum ReconnectStep { NOT_STARTED, diff --git a/src/renderer/features/operations/OperationSign/model/__tests__/sign-model.test.ts b/src/renderer/features/operations/OperationSign/model/__tests__/sign-model.test.ts index 6ee21bde0b..75cdebce64 100644 --- a/src/renderer/features/operations/OperationSign/model/__tests__/sign-model.test.ts +++ b/src/renderer/features/operations/OperationSign/model/__tests__/sign-model.test.ts @@ -1,9 +1,9 @@ import { type ApiPromise } from '@polkadot/api'; import { allSettled, fork } from 'effector'; -import { type Account, type Chain, SigningType, type Transaction, type Wallet, WalletType } from '@shared/core'; -import { networkModel } from '@entities/network'; -import { walletModel } from '@entities/wallet'; +import { type Account, type Chain, SigningType, type Transaction, type Wallet, WalletType } from '@/shared/core'; +import { networkModel } from '@/entities/network'; +import { walletModel } from '@/entities/wallet'; import { type SigningPayload } from '../../lib/types'; import { signModel } from '../sign-model'; diff --git a/src/renderer/features/operations/OperationSign/model/operation-sign-model.ts b/src/renderer/features/operations/OperationSign/model/operation-sign-model.ts index ccf4ffc519..bc5737c602 100644 --- a/src/renderer/features/operations/OperationSign/model/operation-sign-model.ts +++ b/src/renderer/features/operations/OperationSign/model/operation-sign-model.ts @@ -1,7 +1,7 @@ import { createStore, sample } from 'effector'; import { createGate } from 'effector-react'; -import { type Account } from '@shared/core'; +import { type Account } from '@/shared/core'; const SignerGate = createGate('signer'); diff --git a/src/renderer/features/operations/OperationSign/model/sign-model.ts b/src/renderer/features/operations/OperationSign/model/sign-model.ts index ffedffc339..fa3c05a525 100644 --- a/src/renderer/features/operations/OperationSign/model/sign-model.ts +++ b/src/renderer/features/operations/OperationSign/model/sign-model.ts @@ -2,10 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { combine, createEffect, createEvent, createStore, sample } from 'effector'; import { once } from 'patronum'; -import { type ChainId, type HexString, TransactionType } from '@shared/core'; +import { type ChainId, type HexString, TransactionType } from '@/shared/core'; +import { networkModel } from '@/entities/network'; import { transactionBuilder, transactionService } from '@/entities/transaction'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; import { type SigningPayload } from '../lib/types'; // TODO: Use it for signing diff --git a/src/renderer/features/operations/OperationSign/model/sign-wc-model.ts b/src/renderer/features/operations/OperationSign/model/sign-wc-model.ts index 9f55e3fe79..b524916648 100644 --- a/src/renderer/features/operations/OperationSign/model/sign-wc-model.ts +++ b/src/renderer/features/operations/OperationSign/model/sign-wc-model.ts @@ -3,11 +3,11 @@ import { type EngineTypes } from '@walletconnect/types'; import { combine, createEffect, createEvent, createStore, sample } from 'effector'; import { combineEvents } from 'patronum'; -import { chainsService } from '@shared/api/network'; -import { type HexString, type WcAccount } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { walletModel, walletUtils } from '@entities/wallet'; -import { type InitReconnectParams, walletConnectModel } from '@entities/walletConnect'; +import { chainsService } from '@/shared/api/network'; +import { type HexString, type WcAccount } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; +import { walletModel, walletUtils } from '@/entities/wallet'; +import { type InitReconnectParams, walletConnectModel } from '@/entities/walletConnect'; import { operationSignUtils } from '../lib/operation-sign-utils'; import { ReconnectStep } from '../lib/types'; diff --git a/src/renderer/features/operations/OperationSign/ui/OperationSign.tsx b/src/renderer/features/operations/OperationSign/ui/OperationSign.tsx index 7da79d6d91..3c82e99479 100644 --- a/src/renderer/features/operations/OperationSign/ui/OperationSign.tsx +++ b/src/renderer/features/operations/OperationSign/ui/OperationSign.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; +import { type HexString } from '@/shared/core'; import { Loader } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; -import { type HexString } from '@shared/core'; import { walletUtils } from '@/entities/wallet'; import { signModel } from '../model/sign-model'; diff --git a/src/renderer/features/operations/OperationSign/ui/SigningSwitch.tsx b/src/renderer/features/operations/OperationSign/ui/SigningSwitch.tsx index 24b7a57740..9757f772b3 100644 --- a/src/renderer/features/operations/OperationSign/ui/SigningSwitch.tsx +++ b/src/renderer/features/operations/OperationSign/ui/SigningSwitch.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { SigningType } from '@shared/core'; -import { walletModel } from '@entities/wallet'; +import { SigningType } from '@/shared/core'; +import { walletModel } from '@/entities/wallet'; import { type InnerSigningProps, type SigningProps } from '../lib/types'; import { Vault } from './Vault'; diff --git a/src/renderer/features/operations/OperationSign/ui/Vault.tsx b/src/renderer/features/operations/OperationSign/ui/Vault.tsx index d17402f4b2..4a4a4f126f 100644 --- a/src/renderer/features/operations/OperationSign/ui/Vault.tsx +++ b/src/renderer/features/operations/OperationSign/ui/Vault.tsx @@ -1,12 +1,12 @@ import { useEffect, useState } from 'react'; -import { useI18n } from '@/app/providers'; +import { type Address, type HexString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useCountdown } from '@/shared/lib/hooks'; +import { ValidationErrors, toAddress } from '@/shared/lib/utils'; import { FootnoteText } from '@/shared/ui'; -import { type Address, type HexString } from '@shared/core'; -import { useCountdown } from '@shared/lib/hooks'; -import { ValidationErrors, toAddress } from '@shared/lib/utils'; -import { QrReaderWrapper, ScanMultiframeQr, ScanSingleframeQr, transactionService } from '@entities/transaction'; -import { WalletIcon, accountUtils, walletUtils } from '@entities/wallet'; +import { QrReaderWrapper, ScanMultiframeQr, ScanSingleframeQr, transactionService } from '@/entities/transaction'; +import { WalletIcon, accountUtils, walletUtils } from '@/entities/wallet'; import { operationSignUtils } from '../lib/operation-sign-utils'; import { type InnerSigningProps } from '../lib/types'; diff --git a/src/renderer/features/operations/OperationSign/ui/WalletConnect.tsx b/src/renderer/features/operations/OperationSign/ui/WalletConnect.tsx index f964123282..a5b560d35d 100644 --- a/src/renderer/features/operations/OperationSign/ui/WalletConnect.tsx +++ b/src/renderer/features/operations/OperationSign/ui/WalletConnect.tsx @@ -2,18 +2,18 @@ import { type UnsignedTransaction } from '@substrate/txwrapper-polkadot'; import { useGate, useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import wallet_connect_confirm from '@shared/assets/video/wallet_connect_confirm.mp4'; -import wallet_connect_confirm_webm from '@shared/assets/video/wallet_connect_confirm.webm'; -import { type HexString } from '@shared/core'; -import { useCountdown } from '@shared/lib/hooks'; -import { ValidationErrors, createTxMetadata, toAddress, upgradeNonce } from '@shared/lib/utils'; -import { Button, ConfirmModal, Countdown, FootnoteText, SmallTitleText, StatusModal } from '@shared/ui'; -import { Animation } from '@shared/ui/Animation/Animation'; +import wallet_connect_confirm from '@/shared/assets/video/wallet_connect_confirm.mp4'; +import wallet_connect_confirm_webm from '@/shared/assets/video/wallet_connect_confirm.webm'; +import { type HexString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useCountdown } from '@/shared/lib/hooks'; +import { ValidationErrors, createTxMetadata, toAddress, upgradeNonce } from '@/shared/lib/utils'; +import { Button, ConfirmModal, Countdown, FootnoteText, SmallTitleText, StatusModal } from '@/shared/ui'; +import { Animation } from '@/shared/ui/Animation/Animation'; import { networkModel } from '@/entities/network'; -import { transactionService } from '@entities/transaction'; -import { walletModel, walletUtils } from '@entities/wallet'; -import { DEFAULT_POLKADOT_METHODS, walletConnectModel, walletConnectUtils } from '@entities/walletConnect'; +import { transactionService } from '@/entities/transaction'; +import { walletModel, walletUtils } from '@/entities/wallet'; +import { DEFAULT_POLKADOT_METHODS, walletConnectModel, walletConnectUtils } from '@/entities/walletConnect'; import { operationSignUtils } from '../lib/operation-sign-utils'; import { type InnerSigningProps } from '../lib/types'; import { operationSignModel } from '../model/operation-sign-model'; diff --git a/src/renderer/features/operations/OperationSubmit/model/__tests__/submit-model.test.ts b/src/renderer/features/operations/OperationSubmit/model/__tests__/submit-model.test.ts index 5f0b3e9b33..efcbdb8fc6 100644 --- a/src/renderer/features/operations/OperationSubmit/model/__tests__/submit-model.test.ts +++ b/src/renderer/features/operations/OperationSubmit/model/__tests__/submit-model.test.ts @@ -1,13 +1,13 @@ import { type ApiPromise } from '@polkadot/api'; import { allSettled, fork } from 'effector'; -import { type Account, type Chain, SigningType, type Transaction, type Wallet, WalletType } from '@shared/core'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; -import { walletModel } from '@entities/wallet'; +import { type Account, type Chain, SigningType, type Transaction, type Wallet, WalletType } from '@/shared/core'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; +import { walletModel } from '@/entities/wallet'; import { submitModel } from '../submit-model'; -jest.mock('@entities/transaction', () => ({ +jest.mock('@/entities/transaction', () => ({ transactionService: { signAndSubmit: jest.fn(), }, diff --git a/src/renderer/features/operations/OperationSubmit/model/submit-model.ts b/src/renderer/features/operations/OperationSubmit/model/submit-model.ts index ad9b03b236..5759731ead 100644 --- a/src/renderer/features/operations/OperationSubmit/model/submit-model.ts +++ b/src/renderer/features/operations/OperationSubmit/model/submit-model.ts @@ -12,11 +12,11 @@ import { type MultisigTransaction, type Transaction, TransactionType, -} from '@shared/core'; -import { removeFromCollection } from '@shared/lib/utils'; -import { buildMultisigTx } from '@entities/multisig'; -import { networkModel } from '@entities/network'; -import { type ExtrinsicResultParams, transactionBuilder, transactionService } from '@entities/transaction'; +} from '@/shared/core'; +import { removeFromCollection } from '@/shared/lib/utils'; +import { buildMultisigTx } from '@/entities/multisig'; +import { networkModel } from '@/entities/network'; +import { type ExtrinsicResultParams, transactionBuilder, transactionService } from '@/entities/transaction'; import { ExtrinsicResult, SubmitStep } from '../lib/types'; type Input = { diff --git a/src/renderer/features/operations/OperationSubmit/ui/OperationSubmit.tsx b/src/renderer/features/operations/OperationSubmit/ui/OperationSubmit.tsx index f6dd5597b7..b784b998a9 100644 --- a/src/renderer/features/operations/OperationSubmit/ui/OperationSubmit.tsx +++ b/src/renderer/features/operations/OperationSubmit/ui/OperationSubmit.tsx @@ -1,11 +1,11 @@ import { useUnit } from 'effector-react'; import { type ComponentProps, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { useTaskQueue } from '@shared/lib/hooks'; -import { Button } from '@shared/ui'; -import { useMultisigEvent, useMultisigTx } from '@entities/multisig'; -import { OperationResult } from '@entities/transaction'; +import { useI18n } from '@/shared/i18n'; +import { useTaskQueue } from '@/shared/lib/hooks'; +import { Button } from '@/shared/ui'; +import { useMultisigEvent, useMultisigTx } from '@/entities/multisig'; +import { OperationResult } from '@/entities/transaction'; import { submitUtils } from '../lib/submit-utils'; import { type SubmitStep } from '../lib/types'; import { submitModel } from '../model/submit-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/AddProxy/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/AddProxy/model/confirm-model.ts index 84c6a1303c..ebbbf58e8a 100644 --- a/src/renderer/features/operations/OperationsConfirm/AddProxy/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/AddProxy/model/confirm-model.ts @@ -1,7 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Address, @@ -11,10 +10,11 @@ import { type ProxyType, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/AddProxy/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/AddProxy/ui/Confirmation.tsx index ef02561ab0..dff684a7a5 100644 --- a/src/renderer/features/operations/OperationsConfirm/AddProxy/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/AddProxy/ui/Confirmation.tsx @@ -1,14 +1,14 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { proxyUtils } from '@entities/proxy'; -import { FeeWithLabel, MultisigDepositWithLabel } from '@entities/transaction'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { Button, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { proxyUtils } from '@/entities/proxy'; +import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/AddPureProxied/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/AddPureProxied/model/confirm-model.ts index 5d05ecf3c5..4ea4e96c28 100644 --- a/src/renderer/features/operations/OperationsConfirm/AddPureProxied/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/AddPureProxied/model/confirm-model.ts @@ -1,10 +1,10 @@ import { combine, createEvent, restore } from 'effector'; +import { type Account, type Chain, type ProxiedAccount, type Transaction, type Wallet } from '@/shared/core'; import { nonNullable } from '@/shared/lib/utils'; -import { type Account, type Chain, type ProxiedAccount, type Transaction, type Wallet } from '@shared/core'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/AddPureProxied/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/AddPureProxied/ui/Confirmation.tsx index a5bdf11e6a..55997bd4f6 100644 --- a/src/renderer/features/operations/OperationsConfirm/AddPureProxied/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/AddPureProxied/ui/Confirmation.tsx @@ -1,12 +1,12 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { Button, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/BondExtra/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/BondExtra/model/confirm-model.ts index 06144a943a..ea1fe89374 100644 --- a/src/renderer/features/operations/OperationsConfirm/BondExtra/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/BondExtra/model/confirm-model.ts @@ -1,10 +1,17 @@ import { combine, createEvent, restore } from 'effector'; +import { + type Account, + type Asset, + type Chain, + type ProxiedAccount, + type Transaction, + type Wallet, +} from '@/shared/core'; import { nonNullable } from '@/shared/lib/utils'; -import { type Account, type Asset, type Chain, type ProxiedAccount, type Transaction, type Wallet } from '@shared/core'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/BondExtra/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/BondExtra/ui/Confirmation.tsx index 454426847e..4410f4d1cb 100644 --- a/src/renderer/features/operations/OperationsConfirm/BondExtra/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/BondExtra/ui/Confirmation.tsx @@ -1,15 +1,15 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { formatAmount } from '@shared/lib/utils'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal, StakingPopover } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { formatAmount } from '@/shared/lib/utils'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal, StakingPopover } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { type Config } from '../../../OperationsValidation'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/BondNominate/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/BondNominate/model/confirm-model.ts index 92777064ff..5b9ba72e47 100644 --- a/src/renderer/features/operations/OperationsConfirm/BondNominate/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/BondNominate/model/confirm-model.ts @@ -2,7 +2,6 @@ import { type ApiPromise } from '@polkadot/api'; import { type BN } from '@polkadot/util'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Asset, @@ -12,10 +11,11 @@ import { type Transaction, type Validator, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/BondNominate/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/BondNominate/ui/Confirmation.tsx index d52c5177ba..ceaed5ef87 100644 --- a/src/renderer/features/operations/OperationsConfirm/BondNominate/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/BondNominate/ui/Confirmation.tsx @@ -1,15 +1,15 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { formatAmount } from '@shared/lib/utils'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal, SelectedValidatorsModal, StakingPopover, UnstakingDuration } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { formatAmount } from '@/shared/lib/utils'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal, SelectedValidatorsModal, StakingPopover, UnstakingDuration } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { type Config } from '../../../OperationsValidation'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/Delegate/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Delegate/model/confirm-model.ts index d49e42c14d..4b52c00664 100644 --- a/src/renderer/features/operations/OperationsConfirm/Delegate/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Delegate/model/confirm-model.ts @@ -2,7 +2,6 @@ import { type ApiPromise } from '@polkadot/api'; import { type BN } from '@polkadot/util'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Address, @@ -13,10 +12,11 @@ import { type ProxiedAccount, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Delegate/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Delegate/ui/Confirmation.tsx index 0956acaa54..a6ab74a649 100644 --- a/src/renderer/features/operations/OperationsConfirm/Delegate/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Delegate/ui/Confirmation.tsx @@ -3,15 +3,15 @@ import { useGate, useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; +import { formatAmount } from '@/shared/lib/utils'; +import { Button, DetailRow, FootnoteText, HeadlineText, Icon, LargeTitleText, Loader, Tooltip } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; -import { formatAmount } from '@shared/lib/utils'; -import { Button, DetailRow, FootnoteText, HeadlineText, Icon, LargeTitleText, Loader, Tooltip } from '@shared/ui'; +import { AssetBalance } from '@/entities/asset'; import { BalanceDiff, LockPeriodDiff, LockValueDiff, TracksDetails, votingService } from '@/entities/governance'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { lockPeriodsModel, locksPeriodsAggregate } from '@/features/governance'; import { type Config } from '../../../OperationsValidation'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; diff --git a/src/renderer/features/operations/OperationsConfirm/EditDelegation/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/EditDelegation/model/confirm-model.ts index d49e42c14d..4b52c00664 100644 --- a/src/renderer/features/operations/OperationsConfirm/EditDelegation/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/EditDelegation/model/confirm-model.ts @@ -2,7 +2,6 @@ import { type ApiPromise } from '@polkadot/api'; import { type BN } from '@polkadot/util'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Address, @@ -13,10 +12,11 @@ import { type ProxiedAccount, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/EditDelegation/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/EditDelegation/ui/Confirmation.tsx index 92882abbbf..b3607d5a8e 100644 --- a/src/renderer/features/operations/OperationsConfirm/EditDelegation/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/EditDelegation/ui/Confirmation.tsx @@ -3,15 +3,15 @@ import { useGate, useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; +import { formatAmount } from '@/shared/lib/utils'; +import { Button, DetailRow, FootnoteText, HeadlineText, Icon, LargeTitleText, Loader, Tooltip } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; -import { formatAmount } from '@shared/lib/utils'; -import { Button, DetailRow, FootnoteText, HeadlineText, Icon, LargeTitleText, Loader, Tooltip } from '@shared/ui'; +import { AssetBalance } from '@/entities/asset'; import { BalanceDiff, LockPeriodDiff, LockValueDiff, TracksDetails, votingService } from '@/entities/governance'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { lockPeriodsModel, locksPeriodsAggregate } from '@/features/governance'; import { type Config } from '../../../OperationsValidation'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; diff --git a/src/renderer/features/operations/OperationsConfirm/Nominate/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Nominate/model/confirm-model.ts index 31c3d35fe2..5999552bf2 100644 --- a/src/renderer/features/operations/OperationsConfirm/Nominate/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Nominate/model/confirm-model.ts @@ -1,6 +1,5 @@ import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Asset, @@ -9,10 +8,11 @@ import { type Transaction, type Validator, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Nominate/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Nominate/ui/Confirmation.tsx index d1c4d05c4d..38565c6bd0 100644 --- a/src/renderer/features/operations/OperationsConfirm/Nominate/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Nominate/ui/Confirmation.tsx @@ -1,14 +1,14 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal, SelectedValidatorsModal, StakingPopover } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal, SelectedValidatorsModal, StakingPopover } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/Payee/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Payee/model/confirm-model.ts index 03b024754e..6d3c274af3 100644 --- a/src/renderer/features/operations/OperationsConfirm/Payee/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Payee/model/confirm-model.ts @@ -1,10 +1,17 @@ import { combine, createEvent, restore } from 'effector'; +import { + type Account, + type Asset, + type Chain, + type ProxiedAccount, + type Transaction, + type Wallet, +} from '@/shared/core'; import { nonNullable } from '@/shared/lib/utils'; -import { type Account, type Asset, type Chain, type ProxiedAccount, type Transaction, type Wallet } from '@shared/core'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Payee/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Payee/ui/Confirmation.tsx index fd7edcf8d4..02b7dd6513 100644 --- a/src/renderer/features/operations/OperationsConfirm/Payee/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Payee/ui/Confirmation.tsx @@ -1,14 +1,14 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/Referendum/RemoveVote/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Referendum/RemoveVote/ui/Confirmation.tsx index 700c5d5255..8be6b7f083 100644 --- a/src/renderer/features/operations/OperationsConfirm/Referendum/RemoveVote/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Referendum/RemoveVote/ui/Confirmation.tsx @@ -1,7 +1,7 @@ import { useGate, useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { formatAsset, formatBalance, toAddress, toNumberWithPrecision } from '@/shared/lib/utils'; import { DetailRow, HeadlineText, Icon, Loader } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; diff --git a/src/renderer/features/operations/OperationsConfirm/Referendum/Vote/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Referendum/Vote/ui/Confirmation.tsx index 10bbc98d0a..20f82854fc 100644 --- a/src/renderer/features/operations/OperationsConfirm/Referendum/Vote/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Referendum/Vote/ui/Confirmation.tsx @@ -2,7 +2,7 @@ import { BN } from '@polkadot/util'; import { useGate, useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { formatAsset, formatBalance, toAddress, toNumberWithPrecision } from '@/shared/lib/utils'; import { Button, DetailRow, HeadlineText, Icon, Loader } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; diff --git a/src/renderer/features/operations/OperationsConfirm/RemoveProxy/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/RemoveProxy/model/confirm-model.ts index c5c84ef807..8e03ed0310 100644 --- a/src/renderer/features/operations/OperationsConfirm/RemoveProxy/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/RemoveProxy/model/confirm-model.ts @@ -1,7 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Address, @@ -11,10 +10,11 @@ import { type ProxyType, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/RemoveProxy/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/RemoveProxy/ui/Confirmation.tsx index bbda1e29e7..3008dee8f3 100644 --- a/src/renderer/features/operations/OperationsConfirm/RemoveProxy/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/RemoveProxy/ui/Confirmation.tsx @@ -1,13 +1,13 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { toAddress } from '@shared/lib/utils'; -import { Button, DetailRow, FootnoteText, Icon } from '@shared/ui'; -import { SignButton } from '@entities/operations'; -import { proxyUtils } from '@entities/proxy'; -import { FeeWithLabel, MultisigDepositWithLabel } from '@entities/transaction'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; +import { Button, DetailRow, FootnoteText, Icon } from '@/shared/ui'; +import { SignButton } from '@/entities/operations'; +import { proxyUtils } from '@/entities/proxy'; +import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/model/confirm-model.ts index 3a944b1f20..562df36c74 100644 --- a/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/model/confirm-model.ts @@ -1,7 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type AccountId, @@ -11,10 +10,11 @@ import { type ProxyType, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/ui/Confirmation.tsx index 648ca8fd19..08d7bc2a53 100644 --- a/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/RemovePureProxied/ui/Confirmation.tsx @@ -1,14 +1,14 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { ProxyType } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { Button, DetailRow, FootnoteText, Icon } from '@shared/ui'; -import { SignButton } from '@entities/operations'; -import { proxyUtils } from '@entities/proxy'; -import { FeeWithLabel, MultisigDepositWithLabel } from '@entities/transaction'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { ProxyType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; +import { Button, DetailRow, FootnoteText, Icon } from '@/shared/ui'; +import { SignButton } from '@/entities/operations'; +import { proxyUtils } from '@/entities/proxy'; +import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/Restake/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Restake/model/confirm-model.ts index 23b11bdbc3..7bfca90f99 100644 --- a/src/renderer/features/operations/OperationsConfirm/Restake/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Restake/model/confirm-model.ts @@ -1,10 +1,17 @@ import { combine, createEvent, restore, sample } from 'effector'; +import { + type Account, + type Asset, + type Chain, + type ProxiedAccount, + type Transaction, + type Wallet, +} from '@/shared/core'; import { nonNullable } from '@/shared/lib/utils'; -import { type Account, type Asset, type Chain, type ProxiedAccount, type Transaction, type Wallet } from '@shared/core'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Restake/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Restake/ui/Confirmation.tsx index 7a4d2f4843..ffcae61bf5 100644 --- a/src/renderer/features/operations/OperationsConfirm/Restake/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Restake/ui/Confirmation.tsx @@ -1,15 +1,15 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal, StakingPopover } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal, StakingPopover } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/model/confirm-model.ts index 9772b10597..21311a4858 100644 --- a/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/model/confirm-model.ts @@ -2,7 +2,6 @@ import { type ApiPromise } from '@polkadot/api'; import { type BN } from '@polkadot/util'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Address, @@ -13,10 +12,11 @@ import { type ProxiedAccount, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; export type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/ui/Confirmation.tsx index 504466cf3b..89df6546b4 100644 --- a/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/RevokeDelegation/ui/Confirmation.tsx @@ -3,15 +3,15 @@ import { useGate, useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; +import { useI18n } from '@/shared/i18n'; +import { formatAmount } from '@/shared/lib/utils'; +import { Button, DetailRow, FootnoteText, HeadlineText, Icon, LargeTitleText, Loader, Tooltip } from '@/shared/ui'; import { Box } from '@/shared/ui-kit'; -import { formatAmount } from '@shared/lib/utils'; -import { Button, DetailRow, FootnoteText, HeadlineText, Icon, LargeTitleText, Loader, Tooltip } from '@shared/ui'; +import { AssetBalance } from '@/entities/asset'; import { BalanceDiff, LockPeriodDiff, LockValueDiff, TracksDetails, votingService } from '@/entities/governance'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { lockPeriodsModel, locksPeriodsAggregate } from '@/features/governance'; import { type Config } from '../../../OperationsValidation'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; diff --git a/src/renderer/features/operations/OperationsConfirm/Transfer/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Transfer/model/confirm-model.ts index 0a46c3e083..fe8a128b01 100644 --- a/src/renderer/features/operations/OperationsConfirm/Transfer/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Transfer/model/confirm-model.ts @@ -9,12 +9,12 @@ import { type ProxiedAccount, type Transaction, type Wallet, -} from '@shared/core'; -import { nonNullable, transferableAmount } from '@shared/lib/utils'; +} from '@/shared/core'; +import { nonNullable, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; import { type BalanceMap, type NetworkStore, @@ -23,7 +23,7 @@ import { TransferRules, type TransferSignatoryFeeStore, validationUtils, -} from '@features/operations/OperationsValidation'; +} from '@/features/operations/OperationsValidation'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Transfer/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Transfer/ui/Confirmation.tsx index 37194c29e1..860c39f1b1 100644 --- a/src/renderer/features/operations/OperationsConfirm/Transfer/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Transfer/ui/Confirmation.tsx @@ -1,13 +1,13 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { ChainTitle } from '@entities/chain'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { Button, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { ChainTitle } from '@/entities/chain'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/Unstake/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Unstake/model/confirm-model.ts index 53d2b673fc..5edb7acd6e 100644 --- a/src/renderer/features/operations/OperationsConfirm/Unstake/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Unstake/model/confirm-model.ts @@ -1,7 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; import { combine, createEvent, restore } from 'effector'; -import { nonNullable } from '@/shared/lib/utils'; import { type Account, type Asset, @@ -10,10 +9,11 @@ import { type ProxiedAccount, type Transaction, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; +import { nonNullable } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Unstake/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Unstake/ui/Confirmation.tsx index 70bfd2171b..d1c430669e 100644 --- a/src/renderer/features/operations/OperationsConfirm/Unstake/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Unstake/ui/Confirmation.tsx @@ -1,15 +1,15 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal, StakingPopover, UnstakingDuration } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal, StakingPopover, UnstakingDuration } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/Withdraw/model/confirm-model.ts b/src/renderer/features/operations/OperationsConfirm/Withdraw/model/confirm-model.ts index 1a5539eb66..fd82493cee 100644 --- a/src/renderer/features/operations/OperationsConfirm/Withdraw/model/confirm-model.ts +++ b/src/renderer/features/operations/OperationsConfirm/Withdraw/model/confirm-model.ts @@ -1,10 +1,17 @@ import { combine, createEvent, restore, sample } from 'effector'; +import { + type Account, + type Asset, + type Chain, + type ProxiedAccount, + type Transaction, + type Wallet, +} from '@/shared/core'; import { nonNullable } from '@/shared/lib/utils'; -import { type Account, type Asset, type Chain, type ProxiedAccount, type Transaction, type Wallet } from '@shared/core'; import { networkModel } from '@/entities/network'; import { operationsModel, operationsUtils } from '@/entities/operations'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { walletModel, walletUtils } from '@/entities/wallet'; type Input = { id?: number; diff --git a/src/renderer/features/operations/OperationsConfirm/Withdraw/ui/Confirmation.tsx b/src/renderer/features/operations/OperationsConfirm/Withdraw/ui/Confirmation.tsx index ebb626d8b4..041c816ab4 100644 --- a/src/renderer/features/operations/OperationsConfirm/Withdraw/ui/Confirmation.tsx +++ b/src/renderer/features/operations/OperationsConfirm/Withdraw/ui/Confirmation.tsx @@ -1,15 +1,15 @@ import { useStoreMap, useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { useToggle } from '@shared/lib/hooks'; -import { cnTw } from '@shared/lib/utils'; -import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { SignButton } from '@entities/operations'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { AccountsModal } from '@entities/staking'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw } from '@/shared/lib/utils'; +import { Button, CaptionText, DetailRow, FootnoteText, Icon, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { SignButton } from '@/entities/operations'; +import { AssetFiatBalance } from '@/entities/price'; +import { AccountsModal } from '@/entities/staking'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, accountUtils } from '@/entities/wallet'; import { MultisigExistsAlert } from '../../common/MultisigExistsAlert'; import { confirmModel } from '../model/confirm-model'; diff --git a/src/renderer/features/operations/OperationsConfirm/common/ConfirmDetails.tsx b/src/renderer/features/operations/OperationsConfirm/common/ConfirmDetails.tsx index 880d2b82e9..4f1d53eba1 100644 --- a/src/renderer/features/operations/OperationsConfirm/common/ConfirmDetails.tsx +++ b/src/renderer/features/operations/OperationsConfirm/common/ConfirmDetails.tsx @@ -1,8 +1,8 @@ import { type PropsWithChildren } from 'react'; -import { useI18n } from '@app/providers'; -import { DetailRow, FootnoteText } from '@shared/ui'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { DetailRow, FootnoteText } from '@/shared/ui'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon } from '@/entities/wallet'; import { type ConfirmItem } from '../lib/createTransactionConfirmStore'; type Props = PropsWithChildren<{ diff --git a/src/renderer/features/operations/OperationsConfirm/common/MultisigExistsAlert.tsx b/src/renderer/features/operations/OperationsConfirm/common/MultisigExistsAlert.tsx index 1e15fac935..24c0f85937 100644 --- a/src/renderer/features/operations/OperationsConfirm/common/MultisigExistsAlert.tsx +++ b/src/renderer/features/operations/OperationsConfirm/common/MultisigExistsAlert.tsx @@ -1,4 +1,4 @@ -import { useI18n } from '@/app/providers'; +import { useI18n } from '@/shared/i18n'; import { Paths } from '@/shared/routes'; import { Alert, Button } from '@/shared/ui'; import { navigationModel } from '@/features/navigation'; diff --git a/src/renderer/features/operations/OperationsConfirm/lib/basket-utils.ts b/src/renderer/features/operations/OperationsConfirm/lib/basket-utils.ts index 4eab21197b..50eefe4a87 100644 --- a/src/renderer/features/operations/OperationsConfirm/lib/basket-utils.ts +++ b/src/renderer/features/operations/OperationsConfirm/lib/basket-utils.ts @@ -1,5 +1,5 @@ -import { type Wallet } from '@shared/core'; -import { walletUtils } from '@entities/wallet'; +import { type Wallet } from '@/shared/core'; +import { walletUtils } from '@/entities/wallet'; export const basketUtils = { isBasketAvailable, diff --git a/src/renderer/features/operations/OperationsConfirm/lib/createTransactionConfirmStore.ts b/src/renderer/features/operations/OperationsConfirm/lib/createTransactionConfirmStore.ts index 378fcfea28..a101bc0c29 100644 --- a/src/renderer/features/operations/OperationsConfirm/lib/createTransactionConfirmStore.ts +++ b/src/renderer/features/operations/OperationsConfirm/lib/createTransactionConfirmStore.ts @@ -9,11 +9,11 @@ import { type MultisigTransaction, type ProxiedAccount, type Wallet, -} from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; +} from '@/shared/core'; +import { toAddress } from '@/shared/lib/utils'; import { operationsUtils } from '@/entities/operations'; -import { type WrappedTransactions, isProxyTransaction } from '@entities/transaction'; -import { walletUtils } from '@entities/wallet'; +import { type WrappedTransactions, isProxyTransaction } from '@/entities/transaction'; +import { walletUtils } from '@/entities/wallet'; export type ConfirmInfo = { id?: number; diff --git a/src/renderer/features/operations/OperationsFilter/lib/constants.ts b/src/renderer/features/operations/OperationsFilter/lib/constants.ts index 4aeade590f..6c500ef60b 100644 --- a/src/renderer/features/operations/OperationsFilter/lib/constants.ts +++ b/src/renderer/features/operations/OperationsFilter/lib/constants.ts @@ -1,4 +1,4 @@ -import { TransactionType } from '@shared/core'; +import { TransactionType } from '@/shared/core'; export const UNKNOWN_TYPE = 'UNKNOWN_TYPE'; diff --git a/src/renderer/features/operations/OperationsFilter/lib/utils.ts b/src/renderer/features/operations/OperationsFilter/lib/utils.ts index 82b9cefa88..38fc69a329 100644 --- a/src/renderer/features/operations/OperationsFilter/lib/utils.ts +++ b/src/renderer/features/operations/OperationsFilter/lib/utils.ts @@ -1,6 +1,6 @@ import { type TFunction } from 'i18next'; -import { MultisigTxFinalStatus, MultisigTxInitStatus, TransactionType } from '@shared/core'; +import { MultisigTxFinalStatus, MultisigTxInitStatus, TransactionType } from '@/shared/core'; import { UNKNOWN_TYPE } from './constants'; diff --git a/src/renderer/features/operations/OperationsFilter/ui/OperationsFilter.tsx b/src/renderer/features/operations/OperationsFilter/ui/OperationsFilter.tsx index ff9a67e6d0..99b1426f46 100644 --- a/src/renderer/features/operations/OperationsFilter/ui/OperationsFilter.tsx +++ b/src/renderer/features/operations/OperationsFilter/ui/OperationsFilter.tsx @@ -1,13 +1,12 @@ import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { chainsService } from '@shared/api/network'; -import { type MultisigTransactionDS } from '@shared/api/storage'; -import { type ChainId, type MultisigTransaction, TransactionType } from '@shared/core'; -import { Button, MultiSelect } from '@shared/ui'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; -import { findCoreBatchAll } from '@/entities/transaction'; -import { TransferTypes, XcmTypes } from '@entities/transaction/lib/common/constants'; +import { chainsService } from '@/shared/api/network'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; +import { type ChainId, type MultisigTransaction, TransactionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button, MultiSelect } from '@/shared/ui'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; +import { TransferTypes, XcmTypes, findCoreBatchAll } from '@/entities/transaction'; import { UNKNOWN_TYPE } from '../lib/constants'; import { getStatusOptions, getTransactionOptions } from '../lib/utils'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/add-proxy-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/add-proxy-rules.ts index 88492998e0..bb28aa9ce2 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/add-proxy-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/add-proxy-rules.ts @@ -1,9 +1,9 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type AccountId, type Chain } from '@shared/core'; -import { transferableAmount } from '@shared/lib/utils'; -import { balanceUtils } from '@entities/balance'; +import { type AccountId, type Chain } from '@/shared/core'; +import { transferableAmount } from '@/shared/lib/utils'; +import { balanceUtils } from '@/entities/balance'; import { type AccountStore, type ChainProxyStore, type SignatoryStore } from '../types/types'; import { descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/add-pure-proxied-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/add-pure-proxied-rules.ts index da5dc5d8cb..6934ec3b2b 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/add-pure-proxied-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/add-pure-proxied-rules.ts @@ -1,9 +1,9 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type AccountId, type Chain } from '@shared/core'; -import { transferableAmount } from '@shared/lib/utils'; -import { balanceUtils } from '@entities/balance'; +import { type AccountId, type Chain } from '@/shared/core'; +import { transferableAmount } from '@/shared/lib/utils'; +import { balanceUtils } from '@/entities/balance'; import { type AccountStore, type SignatoryStore } from '../types/types'; import { descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/bond-extra-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/bond-extra-rules.ts index 26f1816328..f07e503e1a 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/bond-extra-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/bond-extra-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; -import { formatAmount } from '@shared/lib/utils'; +import { type Account } from '@/shared/core'; +import { formatAmount } from '@/shared/lib/utils'; import { type AmountFeeStore, type BondAmountBalanceStore, diff --git a/src/renderer/features/operations/OperationsValidation/lib/bond-nominate-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/bond-nominate-rules.ts index 23ccdb6adb..65da494a3a 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/bond-nominate-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/bond-nominate-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account, RewardsDestination, type ShardAccount } from '@shared/core'; -import { formatAmount, validateAddress } from '@shared/lib/utils'; +import { type Account, RewardsDestination, type ShardAccount } from '@/shared/core'; +import { formatAmount, validateAddress } from '@/shared/lib/utils'; import { type AmountFeeStore, type BondAmountBalanceStore, diff --git a/src/renderer/features/operations/OperationsValidation/lib/delegate-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/delegate-rules.ts index 114131d5d5..c9b0021c8d 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/delegate-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/delegate-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; -import { formatAmount } from '@shared/lib/utils'; +import { type Account } from '@/shared/core'; +import { formatAmount } from '@/shared/lib/utils'; import { type BalanceMap, type DelegateFeeStore, diff --git a/src/renderer/features/operations/OperationsValidation/lib/nominate-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/nominate-rules.ts index 16a7e74d58..60431e5f00 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/nominate-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/nominate-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; -import { formatAmount } from '@shared/lib/utils'; +import { type Account } from '@/shared/core'; +import { formatAmount } from '@/shared/lib/utils'; import { type ShardsBondBalanceStore, type ShardsProxyFeeStore, type SignatoryFeeStore } from '../types/types'; import { balanceValidation, descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/payee-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/payee-rules.ts index 9bc6cea431..1924bd2f65 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/payee-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/payee-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account, RewardsDestination } from '@shared/core'; -import { formatAmount, validateAddress } from '@shared/lib/utils'; +import { type Account, RewardsDestination } from '@/shared/core'; +import { formatAmount, validateAddress } from '@/shared/lib/utils'; import { type ShardsBondBalanceStore, type ShardsProxyFeeStore, type SignatoryFeeStore } from '../types/types'; import { balanceValidation, descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/remove-proxy-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/remove-proxy-rules.ts index a22f14b90b..569591bcd8 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/remove-proxy-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/remove-proxy-rules.ts @@ -1,9 +1,9 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type AccountId, type Chain } from '@shared/core'; -import { transferableAmount } from '@shared/lib/utils'; -import { balanceUtils } from '@entities/balance'; +import { type AccountId, type Chain } from '@/shared/core'; +import { transferableAmount } from '@/shared/lib/utils'; +import { balanceUtils } from '@/entities/balance'; import { type AccountStore, type SignatoryStore } from '../types/types'; import { descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/remove-pure-proxied-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/remove-pure-proxied-rules.ts index 9f119200b2..365b9526e9 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/remove-pure-proxied-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/remove-pure-proxied-rules.ts @@ -1,9 +1,9 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type AccountId, type Chain } from '@shared/core'; -import { transferableAmount } from '@shared/lib/utils'; -import { balanceUtils } from '@entities/balance'; +import { type AccountId, type Chain } from '@/shared/core'; +import { transferableAmount } from '@/shared/lib/utils'; +import { balanceUtils } from '@/entities/balance'; import { type SignatoryStore } from '../types/types'; import { descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/lib/restake-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/restake-rules.ts index 22f313e249..0445a18b18 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/restake-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/restake-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account, RewardsDestination } from '@shared/core'; -import { formatAmount, validateAddress } from '@shared/lib/utils'; +import { type Account, RewardsDestination } from '@/shared/core'; +import { formatAmount, validateAddress } from '@/shared/lib/utils'; import { type AmountFeeStore, type Config, diff --git a/src/renderer/features/operations/OperationsValidation/lib/transfer-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/transfer-rules.ts index 755b622be5..52609dc3d9 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/transfer-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/transfer-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; -import { formatAmount, validateAddress } from '@shared/lib/utils'; +import { type Account } from '@/shared/core'; +import { formatAmount, validateAddress } from '@/shared/lib/utils'; import { type BalanceMap, type NetworkStore, diff --git a/src/renderer/features/operations/OperationsValidation/lib/unstake-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/unstake-rules.ts index cc293c5d49..b7149116fd 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/unstake-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/unstake-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; -import { formatAmount } from '@shared/lib/utils'; +import { type Account } from '@/shared/core'; +import { formatAmount } from '@/shared/lib/utils'; import { type AmountFeeStore, type Config, diff --git a/src/renderer/features/operations/OperationsValidation/lib/validation/balance.ts b/src/renderer/features/operations/OperationsValidation/lib/validation/balance.ts index 07bd3b2afe..01c9340adb 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/validation/balance.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/validation/balance.ts @@ -1,6 +1,6 @@ import { BN } from '@polkadot/util'; -import { ZERO_BALANCE, formatAmount } from '@shared/lib/utils'; +import { ZERO_BALANCE, formatAmount } from '@/shared/lib/utils'; import { type Config, type TransferFeeStore } from '../../types/types'; export const balanceValidation = { diff --git a/src/renderer/features/operations/OperationsValidation/lib/withdraw-rules.ts b/src/renderer/features/operations/OperationsValidation/lib/withdraw-rules.ts index 2fba021936..17b95a0e5e 100644 --- a/src/renderer/features/operations/OperationsValidation/lib/withdraw-rules.ts +++ b/src/renderer/features/operations/OperationsValidation/lib/withdraw-rules.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { type Store } from 'effector'; -import { type Account } from '@shared/core'; -import { ZERO_BALANCE } from '@shared/lib/utils'; +import { type Account } from '@/shared/core'; +import { ZERO_BALANCE } from '@/shared/lib/utils'; import { type AmountFeeStore, type ShardsProxyFeeStore, type SignatoryFeeStore } from '../types/types'; import { balanceValidation, descriptionValidation } from './validation'; diff --git a/src/renderer/features/operations/OperationsValidation/model/add-proxy-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/add-proxy-validate-model.ts index d5646572af..719cac4dca 100644 --- a/src/renderer/features/operations/OperationsValidation/model/add-proxy-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/add-proxy-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { AddProxyRules } from '../lib/add-proxy-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/add-pure-proxied-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/add-pure-proxied-validate-model.ts index df77cc3a7c..58d19b4dc7 100644 --- a/src/renderer/features/operations/OperationsValidation/model/add-pure-proxied-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/add-pure-proxied-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { AddPureProxiedRules } from '../lib/add-pure-proxied-rules'; import { validationUtils } from '../lib/validation-utils'; import { type AccountStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/model/bond-extra-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/bond-extra-validate-model.ts index 0cd8b04887..2401ae4ba2 100644 --- a/src/renderer/features/operations/OperationsValidation/model/bond-extra-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/bond-extra-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { stakeableAmount, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { stakeableAmount, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { BondExtraRules } from '../lib/bond-extra-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/bond-nominate-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/bond-nominate-validate-model.ts index 81981730e4..57cbe33060 100644 --- a/src/renderer/features/operations/OperationsValidation/model/bond-nominate-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/bond-nominate-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { stakeableAmount, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { stakeableAmount, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { BondNominateRules } from '../lib/bond-nominate-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/delegate-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/delegate-validate-model.ts index 2b6b5ef6f9..84a1327f77 100644 --- a/src/renderer/features/operations/OperationsValidation/model/delegate-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/delegate-validate-model.ts @@ -1,12 +1,12 @@ import { type ApiPromise } from '@polkadot/api'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { getAssetById, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; -import { type BalanceMap, type NetworkStore } from '@widgets/Transfer/lib/types'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { getAssetById, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; +import { type BalanceMap, type NetworkStore } from '@/widgets/Transfer'; import { DelegateRules } from '../lib/delegate-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/nominate-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/nominate-validate-model.ts index cb36be3e03..41b46e00f3 100644 --- a/src/renderer/features/operations/OperationsValidation/model/nominate-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/nominate-validate-model.ts @@ -2,10 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { stakeableAmount, toAccountId } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { stakeableAmount, toAccountId } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; import { NominateRules } from '../lib/nominate-rules'; import { validationUtils } from '../lib/validation-utils'; import { type ShardsBondBalanceStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/model/payee-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/payee-validate-model.ts index 4a15544070..11f1779ebc 100644 --- a/src/renderer/features/operations/OperationsValidation/model/payee-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/payee-validate-model.ts @@ -2,10 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { stakeableAmount, toAccountId } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { stakeableAmount, toAccountId } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; import { PayeeRules } from '../lib/payee-rules'; import { validationUtils } from '../lib/validation-utils'; import { type ShardsBondBalanceStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/model/remove-proxy-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/remove-proxy-validate-model.ts index fb527da69e..d1b86cfb53 100644 --- a/src/renderer/features/operations/OperationsValidation/model/remove-proxy-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/remove-proxy-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { RemoveProxyRules } from '../lib/remove-proxy-rules'; import { validationUtils } from '../lib/validation-utils'; import { type AccountStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/model/remove-pure-proxied-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/remove-pure-proxied-validate-model.ts index 8ea89f5295..a2e60a45b2 100644 --- a/src/renderer/features/operations/OperationsValidation/model/remove-pure-proxied-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/remove-pure-proxied-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { RemovePureProxiedRules } from '../lib/remove-pure-proxied-rules'; import { validationUtils } from '../lib/validation-utils'; import { type SignatoryStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/model/remove-vote-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/remove-vote-validate-model.ts index 30e0e887e8..1efdf0e99b 100644 --- a/src/renderer/features/operations/OperationsValidation/model/remove-vote-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/remove-vote-validate-model.ts @@ -3,13 +3,13 @@ import { type SignerOptions } from '@polkadot/api/submittable/types'; import { BN, BN_ZERO } from '@polkadot/util'; import { createEffect, createEvent, sample } from 'effector'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId, transferableAmount } from '@/shared/lib/utils'; import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { votingService } from '@entities/governance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { votingService } from '@/entities/governance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { type AmountFeeStore, type Validation, diff --git a/src/renderer/features/operations/OperationsValidation/model/restake-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/restake-validate-model.ts index a9435cb6b6..27e6c42e51 100644 --- a/src/renderer/features/operations/OperationsValidation/model/restake-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/restake-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { RestakeRules } from '../lib/restake-rules'; import { validationUtils } from '../lib/validation-utils'; import { type AmountFeeStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/model/revoke-delegation-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/revoke-delegation-validate-model.ts index b7ca2d2456..a5bb34f2e1 100644 --- a/src/renderer/features/operations/OperationsValidation/model/revoke-delegation-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/revoke-delegation-validate-model.ts @@ -1,12 +1,12 @@ import { type ApiPromise } from '@polkadot/api'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { getAssetById, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; -import { type BalanceMap, type NetworkStore } from '@widgets/Transfer/lib/types'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { getAssetById, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; +import { type BalanceMap, type NetworkStore } from '@/widgets/Transfer'; import { DelegateRules } from '../lib/delegate-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/transfer-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/transfer-validate-model.ts index 73b6743b5f..8b520e2e26 100644 --- a/src/renderer/features/operations/OperationsValidation/model/transfer-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/transfer-validate-model.ts @@ -1,12 +1,12 @@ import { type ApiPromise } from '@polkadot/api'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { getAssetById, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; -import { type BalanceMap, type NetworkStore } from '@widgets/Transfer/lib/types'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { getAssetById, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; +import { type BalanceMap, type NetworkStore } from '@/widgets/Transfer'; import { TransferRules } from '../lib/transfer-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/unstake-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/unstake-validate-model.ts index e533993888..ffe046dcdc 100644 --- a/src/renderer/features/operations/OperationsValidation/model/unstake-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/unstake-validate-model.ts @@ -2,11 +2,11 @@ import { type ApiPromise } from '@polkadot/api'; import { type SignerOptions } from '@polkadot/api/submittable/types'; import { type Store, createEffect, createEvent, sample } from 'effector'; -import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@shared/core'; -import { stakedAmount, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { transactionService } from '@entities/transaction'; +import { type Asset, type Balance, type Chain, type ID, type Transaction } from '@/shared/core'; +import { stakedAmount, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { transactionService } from '@/entities/transaction'; import { UnstakeRules } from '../lib/unstake-rules'; import { validationUtils } from '../lib/validation-utils'; import { diff --git a/src/renderer/features/operations/OperationsValidation/model/withdraw-validate-model.ts b/src/renderer/features/operations/OperationsValidation/model/withdraw-validate-model.ts index 804bd14a2d..2cab1a8db0 100644 --- a/src/renderer/features/operations/OperationsValidation/model/withdraw-validate-model.ts +++ b/src/renderer/features/operations/OperationsValidation/model/withdraw-validate-model.ts @@ -11,12 +11,12 @@ import { type ChainId, type ID, type Transaction, -} from '@shared/core'; -import { redeemableAmount, toAccountId, transferableAmount } from '@shared/lib/utils'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { type StakingMap, eraService, useStakingData } from '@entities/staking'; -import { transactionService } from '@entities/transaction'; +} from '@/shared/core'; +import { redeemableAmount, toAccountId, transferableAmount } from '@/shared/lib/utils'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { type StakingMap, eraService, useStakingData } from '@/entities/staking'; +import { transactionService } from '@/entities/transaction'; import { validationUtils } from '../lib/validation-utils'; import { WithdrawRules } from '../lib/withdraw-rules'; import { type AmountFeeStore, type ValidationResult, type ValidationStartedParams } from '../types/types'; diff --git a/src/renderer/features/operations/OperationsValidation/types/types.ts b/src/renderer/features/operations/OperationsValidation/types/types.ts index ffa12a7d4d..c00db5cb9b 100644 --- a/src/renderer/features/operations/OperationsValidation/types/types.ts +++ b/src/renderer/features/operations/OperationsValidation/types/types.ts @@ -8,7 +8,7 @@ import { type ID, type Transaction, type TransactionType, -} from '@shared/core'; +} from '@/shared/core'; export type BalanceMap = Record<'balance' | 'native', string>; diff --git a/src/renderer/features/proxies/index.ts b/src/renderer/features/proxies/index.ts index 39625241be..619b078d47 100644 --- a/src/renderer/features/proxies/index.ts +++ b/src/renderer/features/proxies/index.ts @@ -1 +1,2 @@ export { proxiesModel } from './model/proxies-model'; +export { proxiesUtils } from './lib/proxies-utils'; diff --git a/src/renderer/features/proxies/lib/__tests__/proxies-utils.test.ts b/src/renderer/features/proxies/lib/__tests__/proxies-utils.test.ts index 2bd23aa27d..8e94314b09 100644 --- a/src/renderer/features/proxies/lib/__tests__/proxies-utils.test.ts +++ b/src/renderer/features/proxies/lib/__tests__/proxies-utils.test.ts @@ -1,4 +1,4 @@ -import { type Chain, ChainOptions, type Wallet, WalletType } from '@shared/core'; +import { type Chain, ChainOptions, type Wallet, WalletType } from '@/shared/core'; import { proxiesUtils } from '../proxies-utils'; describe('features/proxies/lib/proxies-utils', () => { diff --git a/src/renderer/features/proxies/lib/__tests__/worker-utils.test.ts b/src/renderer/features/proxies/lib/__tests__/worker-utils.test.ts index 265e91f399..5e15fb78a0 100644 --- a/src/renderer/features/proxies/lib/__tests__/worker-utils.test.ts +++ b/src/renderer/features/proxies/lib/__tests__/worker-utils.test.ts @@ -1,6 +1,6 @@ -import { type NoID, type PartialProxiedAccount, type ProxyAccount } from '@shared/core'; -import { AccountType, ChainType, CryptoType, ProxyVariant } from '@shared/core'; -import { TEST_ACCOUNTS, TEST_ADDRESS } from '@shared/lib/utils'; +import { type NoID, type PartialProxiedAccount, type ProxyAccount } from '@/shared/core'; +import { AccountType, ChainType, CryptoType, ProxyVariant } from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_ADDRESS } from '@/shared/lib/utils'; import { proxyWorkerUtils } from '../worker-utils'; describe('features/proxies/lib/worker-utils', () => { diff --git a/src/renderer/features/proxies/lib/proxies-utils.ts b/src/renderer/features/proxies/lib/proxies-utils.ts index 7b3e7065e8..c3614ce857 100644 --- a/src/renderer/features/proxies/lib/proxies-utils.ts +++ b/src/renderer/features/proxies/lib/proxies-utils.ts @@ -9,9 +9,9 @@ import { type ProxyAction, type Wallet, type WalletType, -} from '@shared/core'; -import { proxyUtils } from '@entities/proxy'; -import { walletUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { proxyUtils } from '@/entities/proxy'; +import { walletUtils } from '@/entities/wallet'; export const proxiesUtils = { isRegularProxy, diff --git a/src/renderer/features/proxies/lib/worker-utils.ts b/src/renderer/features/proxies/lib/worker-utils.ts index 854d907fc3..2b4524ec95 100644 --- a/src/renderer/features/proxies/lib/worker-utils.ts +++ b/src/renderer/features/proxies/lib/worker-utils.ts @@ -3,7 +3,7 @@ import { u8aToHex } from '@polkadot/util'; import { decodeAddress } from '@polkadot/util-crypto'; import { WellKnownChain } from '@substrate/connect'; -import { type AccountId, type ChainId, type NoID, type PartialProxiedAccount, type ProxyAccount } from '@shared/core'; +import { type AccountId, type ChainId, type NoID, type PartialProxiedAccount, type ProxyAccount } from '@/shared/core'; export const proxyWorkerUtils = { toAccountId, diff --git a/src/renderer/features/proxies/model/__tests__/proxies-model.test.ts b/src/renderer/features/proxies/model/__tests__/proxies-model.test.ts index 9d2b4569f8..dd2f069222 100644 --- a/src/renderer/features/proxies/model/__tests__/proxies-model.test.ts +++ b/src/renderer/features/proxies/model/__tests__/proxies-model.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; +import { storageService } from '@/shared/api/storage'; import { type AccountId, AccountType, @@ -9,10 +9,10 @@ import { type HexString, type ProxyAccount, ProxyType, -} from '@shared/core'; -import { networkModel } from '@entities/network'; -import { proxyModel } from '@entities/proxy'; -import { walletModel } from '@entities/wallet'; +} from '@/shared/core'; +import { networkModel } from '@/entities/network'; +import { proxyModel } from '@/entities/proxy'; +import { walletModel } from '@/entities/wallet'; import { proxiesModel } from '../proxies-model'; jest.mock('@remote-ui/rpc', () => ({ diff --git a/src/renderer/features/proxies/model/proxies-model.ts b/src/renderer/features/proxies/model/proxies-model.ts index 33bf6bae0e..c8e856a172 100644 --- a/src/renderer/features/proxies/model/proxies-model.ts +++ b/src/renderer/features/proxies/model/proxies-model.ts @@ -4,7 +4,7 @@ import { GraphQLClient } from 'graphql-request'; import keyBy from 'lodash/keyBy'; import { once, spread } from 'patronum'; -import { storageService } from '@shared/api/storage'; +import { storageService } from '@/shared/api/storage'; import { type Account, type AccountId, @@ -19,7 +19,7 @@ import { type ProxyGroup, type Wallet, type WalletsMap, -} from '@shared/core'; +} from '@/shared/core'; import { AccountType, ChainType, @@ -29,13 +29,13 @@ import { ProxyVariant, SigningType, WalletType, -} from '@shared/core'; -import { dictionary } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; -import { networkModel, networkUtils } from '@entities/network'; -import { notificationModel } from '@entities/notification'; -import { proxyModel, proxyUtils, pureProxiesService } from '@entities/proxy'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { dictionary } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; +import { networkModel, networkUtils } from '@/entities/network'; +import { notificationModel } from '@/entities/notification'; +import { proxyModel, proxyUtils, pureProxiesService } from '@/entities/proxy'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { proxiesUtils } from '../lib/proxies-utils'; const workerStarted = createEvent(); @@ -50,7 +50,7 @@ const $endpoint = createStore | null>(null); const $deposits = createStore([]); const startWorkerFx = createEffect(() => { - const worker = new Worker(new URL('@features/proxies/workers/proxy-worker', import.meta.url)); + const worker = new Worker(new URL('@/features/proxies/workers/proxy-worker', import.meta.url)); return createEndpoint(worker, { callable: ['initConnection', 'getProxies', 'disconnect'], diff --git a/src/renderer/features/proxies/workers/__tests__/proxy-worker.test.ts b/src/renderer/features/proxies/workers/__tests__/proxy-worker.test.ts index 1e85f63f8d..6e6c6ae25f 100644 --- a/src/renderer/features/proxies/workers/__tests__/proxy-worker.test.ts +++ b/src/renderer/features/proxies/workers/__tests__/proxy-worker.test.ts @@ -12,7 +12,7 @@ import { type ProxiedAccount, type ProxyAccount, ProxyVariant, -} from '@shared/core'; +} from '@/shared/core'; import { proxyWorker, state } from '../proxy-worker'; jest.mock('@polkadot/rpc-provider', () => ({ diff --git a/src/renderer/features/proxies/workers/proxy-worker.ts b/src/renderer/features/proxies/workers/proxy-worker.ts index 922d77646b..5dff40ed5c 100644 --- a/src/renderer/features/proxies/workers/proxy-worker.ts +++ b/src/renderer/features/proxies/workers/proxy-worker.ts @@ -17,7 +17,7 @@ import { type ProxyAccount, type ProxyDeposits, ProxyVariant, -} from '@shared/core'; +} from '@/shared/core'; import { proxyWorkerUtils } from '../lib/worker-utils'; export const proxyWorker = { diff --git a/src/renderer/features/staking/Validators/model/validators-model.ts b/src/renderer/features/staking/Validators/model/validators-model.ts index a79ddfcd22..695bc77b03 100644 --- a/src/renderer/features/staking/Validators/model/validators-model.ts +++ b/src/renderer/features/staking/Validators/model/validators-model.ts @@ -2,10 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { combine, createEffect, createEvent, createStore, restore, sample } from 'effector'; import { pending, spread } from 'patronum'; -import { type Asset, type Chain, type EraIndex, type Validator } from '@shared/core'; -import { networkModel, networkUtils } from '@entities/network'; -import { type ValidatorMap, validatorsService } from '@entities/staking'; -import { eraService } from '@entities/staking/api'; +import { type Asset, type Chain, type EraIndex, type Validator } from '@/shared/core'; +import { networkModel, networkUtils } from '@/entities/network'; +import { type ValidatorMap, validatorsService } from '@/entities/staking'; +import { eraService } from '@/entities/staking'; type Input = { chain: Chain; diff --git a/src/renderer/features/staking/Validators/ui/Validators.tsx b/src/renderer/features/staking/Validators/ui/Validators.tsx index e9c7236ac8..60999b8f0e 100644 --- a/src/renderer/features/staking/Validators/ui/Validators.tsx +++ b/src/renderer/features/staking/Validators/ui/Validators.tsx @@ -1,11 +1,11 @@ import { useUnit } from 'effector-react'; import { memo } from 'react'; -import { useI18n } from '@app/providers'; -import { type Validator } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { BodyText, Button, Checkbox, Icon, Loader, SearchInput, Shimmering, SmallTitleText } from '@shared/ui'; -import { ValidatorsTable } from '@entities/staking'; +import { type Validator } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BodyText, Button, Checkbox, Icon, Loader, SearchInput, Shimmering, SmallTitleText } from '@/shared/ui'; +import { ValidatorsTable } from '@/entities/staking'; import { validatorsModel } from '../model/validators-model'; type Props = { diff --git a/src/renderer/features/wallets/DerivationsAddressModal/lib/utils.ts b/src/renderer/features/wallets/DerivationsAddressModal/lib/utils.ts index eb4593f008..2880bde3cf 100644 --- a/src/renderer/features/wallets/DerivationsAddressModal/lib/utils.ts +++ b/src/renderer/features/wallets/DerivationsAddressModal/lib/utils.ts @@ -1,10 +1,10 @@ -import { type ChainAccount, type DraftAccount, type ShardAccount } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; +import { type ChainAccount, type DraftAccount, type ShardAccount } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; import { type DdAddressInfoDecoded, type DynamicDerivationRequestInfo, cryptoTypeToMultisignerIndex, -} from '@entities/transaction'; +} from '@/entities/transaction'; export const derivationAddressUtils = { createDerivationsRequest, diff --git a/src/renderer/features/wallets/DerivationsAddressModal/ui/DdKeyQrReader.tsx b/src/renderer/features/wallets/DerivationsAddressModal/ui/DdKeyQrReader.tsx index b9029e30fc..a2040e1f0d 100644 --- a/src/renderer/features/wallets/DerivationsAddressModal/ui/DdKeyQrReader.tsx +++ b/src/renderer/features/wallets/DerivationsAddressModal/ui/DdKeyQrReader.tsx @@ -2,11 +2,11 @@ import { hexToU8a, isHex } from '@polkadot/util'; import { decodeAddress, encodeAddress, ethereumEncode } from '@polkadot/util-crypto'; import { useState } from 'react'; -import { useI18n } from '@app/providers'; -import { CryptoType } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Button, CaptionText, FootnoteText, Icon, Loader, Select, SmallTitleText } from '@shared/ui'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; +import { CryptoType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Button, CaptionText, FootnoteText, Icon, Loader, Select, SmallTitleText } from '@/shared/ui'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; import { type DdAddressInfoDecoded, type DdSeedInfo, @@ -15,7 +15,7 @@ import { QrReader, type VideoInput, WhiteTextButtonStyle, -} from '@entities/transaction'; +} from '@/entities/transaction'; const enum CameraState { ACTIVE, diff --git a/src/renderer/features/wallets/DerivationsAddressModal/ui/DerivationsAddressModal.tsx b/src/renderer/features/wallets/DerivationsAddressModal/ui/DerivationsAddressModal.tsx index bac53eccfe..c1d06d588c 100644 --- a/src/renderer/features/wallets/DerivationsAddressModal/ui/DerivationsAddressModal.tsx +++ b/src/renderer/features/wallets/DerivationsAddressModal/ui/DerivationsAddressModal.tsx @@ -1,11 +1,11 @@ import keyBy from 'lodash/keyBy'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type AccountId, type ChainAccount, type DraftAccount, type ShardAccount } from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { BaseModal, Button, InfoLink, SmallTitleText } from '@shared/ui'; -import { type DdAddressInfoDecoded, QrDerivationsGenerator, TROUBLESHOOTING_URL } from '@entities/transaction'; +import { type AccountId, type ChainAccount, type DraftAccount, type ShardAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { toAddress } from '@/shared/lib/utils'; +import { BaseModal, Button, InfoLink, SmallTitleText } from '@/shared/ui'; +import { type DdAddressInfoDecoded, QrDerivationsGenerator, TROUBLESHOOTING_URL } from '@/entities/transaction'; import { derivationAddressUtils } from '../lib/utils'; import { DdKeyQrReader } from './DdKeyQrReader'; diff --git a/src/renderer/features/wallets/ExportKeys/lib/export-keys-utils.ts b/src/renderer/features/wallets/ExportKeys/lib/export-keys-utils.ts index 98e8d81c61..7b7c9922d3 100644 --- a/src/renderer/features/wallets/ExportKeys/lib/export-keys-utils.ts +++ b/src/renderer/features/wallets/ExportKeys/lib/export-keys-utils.ts @@ -1,6 +1,6 @@ -import { chainsService } from '@shared/api/network'; -import { type AccountId, type ChainAccount, type ChainId, type ShardAccount } from '@shared/core'; -import { accountUtils } from '@entities/wallet'; +import { chainsService } from '@/shared/api/network'; +import { type AccountId, type ChainAccount, type ChainId, type ShardAccount } from '@/shared/core'; +import { accountUtils } from '@/entities/wallet'; export const exportKeysUtils = { getExportStructure, diff --git a/src/renderer/features/wallets/ExportKeys/lib/types.ts b/src/renderer/features/wallets/ExportKeys/lib/types.ts index f9188e8449..4fc5612191 100644 --- a/src/renderer/features/wallets/ExportKeys/lib/types.ts +++ b/src/renderer/features/wallets/ExportKeys/lib/types.ts @@ -1,4 +1,4 @@ -import { type ChainId, type KeyType as DdKeyType } from '@shared/core'; +import { type ChainId, type KeyType as DdKeyType } from '@/shared/core'; export type ExportedDerivation = { key: { diff --git a/src/renderer/features/wallets/ForgetWallet/model/__tests__/forget-wallet-model.test.ts b/src/renderer/features/wallets/ForgetWallet/model/__tests__/forget-wallet-model.test.ts index 48176c2c44..01307f1bd0 100644 --- a/src/renderer/features/wallets/ForgetWallet/model/__tests__/forget-wallet-model.test.ts +++ b/src/renderer/features/wallets/ForgetWallet/model/__tests__/forget-wallet-model.test.ts @@ -1,6 +1,6 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; +import { storageService } from '@/shared/api/storage'; import { AccountType, type BaseAccount, @@ -11,18 +11,18 @@ import { SigningType, type Wallet, WalletType, -} from '@shared/core'; -import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@shared/lib/utils'; -import { proxyModel } from '@entities/proxy'; -import { walletModel } from '@entities/wallet'; +} from '@/shared/core'; +import { TEST_ACCOUNTS, TEST_CHAIN_ID } from '@/shared/lib/utils'; +import { proxyModel } from '@/entities/proxy'; +import { walletModel } from '@/entities/wallet'; import { forgetWalletModel } from '../forget-wallet-model'; -jest.mock('@entities/multisig', () => ({ +jest.mock('@/entities/multisig', () => ({ useForgetMultisig: () => ({ deleteMultisigTxs: jest.fn() }), })); -jest.mock('@entities/balance', () => ({ - ...jest.requireActual('@entities/balance'), +jest.mock('@/entities/balance', () => ({ + ...jest.requireActual('@/entities/balance'), useBalanceService: () => ({ deleteBalance: jest.fn() }), })); diff --git a/src/renderer/features/wallets/ForgetWallet/model/forget-wallet-model.ts b/src/renderer/features/wallets/ForgetWallet/model/forget-wallet-model.ts index 1f25268737..ebd3b4ba95 100644 --- a/src/renderer/features/wallets/ForgetWallet/model/forget-wallet-model.ts +++ b/src/renderer/features/wallets/ForgetWallet/model/forget-wallet-model.ts @@ -9,11 +9,11 @@ import { type ProxyAccount, type ProxyGroup, type Wallet, -} from '@shared/core'; -import { balanceModel } from '@entities/balance'; -import { useForgetMultisig } from '@entities/multisig'; -import { proxyModel } from '@entities/proxy'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { balanceModel } from '@/entities/balance'; +import { useForgetMultisig } from '@/entities/multisig'; +import { proxyModel } from '@/entities/proxy'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; const { deleteMultisigTxs } = useForgetMultisig(); diff --git a/src/renderer/features/wallets/ForgetWallet/ui/ForgetWalletModal.tsx b/src/renderer/features/wallets/ForgetWallet/ui/ForgetWalletModal.tsx index 2c6abf8033..7b2b19d9a4 100644 --- a/src/renderer/features/wallets/ForgetWallet/ui/ForgetWalletModal.tsx +++ b/src/renderer/features/wallets/ForgetWallet/ui/ForgetWalletModal.tsx @@ -1,8 +1,8 @@ import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { type Wallet } from '@shared/core'; -import { ConfirmModal, FootnoteText, SmallTitleText } from '@shared/ui'; +import { type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { ConfirmModal, FootnoteText, SmallTitleText } from '@/shared/ui'; import { forgetWalletModel } from '../model/forget-wallet-model'; type Props = { diff --git a/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-model.test.ts b/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-model.test.ts index df4ebe6013..6f5cd00e0f 100644 --- a/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-model.test.ts +++ b/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { importKeysModelMock } from '@features/wallets/ImportKeys/lib/mocks/import-keys-model.mock'; -import { DerivationValidationError, ValidationError } from '@features/wallets/ImportKeys/lib/types'; +import { importKeysModelMock } from '@/features/wallets/ImportKeys/lib/mocks/import-keys-model.mock'; +import { DerivationValidationError, ValidationError } from '@/features/wallets/ImportKeys/lib/types'; import { importKeysModel } from '../../model/import-keys-model'; describe('features/ImportKeys/lib/import-keys-model', () => { diff --git a/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-utils.test.ts b/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-utils.test.ts index e742a32bc3..6259c83e5c 100644 --- a/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-utils.test.ts +++ b/src/renderer/features/wallets/ImportKeys/lib/__tests__/import-keys-utils.test.ts @@ -1,6 +1,6 @@ import { webcrypto } from 'node:crypto'; -import { AccountType, type DraftAccount, KeyType, type ShardAccount } from '@shared/core'; +import { AccountType, type DraftAccount, KeyType, type ShardAccount } from '@/shared/core'; import { importKeysUtils } from '../import-keys-utils'; import { importKeysMocks } from '../mocks/import-keys-utils.mock'; diff --git a/src/renderer/features/wallets/ImportKeys/lib/import-keys-utils.ts b/src/renderer/features/wallets/ImportKeys/lib/import-keys-utils.ts index 3c2fd0ca45..f16d92b1c9 100644 --- a/src/renderer/features/wallets/ImportKeys/lib/import-keys-utils.ts +++ b/src/renderer/features/wallets/ImportKeys/lib/import-keys-utils.ts @@ -2,7 +2,7 @@ import { type TFunction } from 'i18next'; import groupBy from 'lodash/groupBy'; import unionBy from 'lodash/unionBy'; -import { chainsService } from '@shared/api/network'; +import { chainsService } from '@/shared/api/network'; import { type AccountId, AccountType, @@ -15,9 +15,9 @@ import { type HexString, KeyType, type ShardAccount, -} from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { KEY_NAMES, SHARDED_KEY_NAMES } from '@entities/wallet'; +} from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; +import { KEY_NAMES, SHARDED_KEY_NAMES } from '@/entities/wallet'; import { type ErrorDetails } from './derivation-import-error'; import { diff --git a/src/renderer/features/wallets/ImportKeys/lib/mocks/import-keys-utils.mock.ts b/src/renderer/features/wallets/ImportKeys/lib/mocks/import-keys-utils.mock.ts index e2ed89bad2..259043a606 100644 --- a/src/renderer/features/wallets/ImportKeys/lib/mocks/import-keys-utils.mock.ts +++ b/src/renderer/features/wallets/ImportKeys/lib/mocks/import-keys-utils.mock.ts @@ -7,7 +7,7 @@ import { type DraftAccount, KeyType, type ShardAccount, -} from '@shared/core'; +} from '@/shared/core'; import { type DerivationWithPath } from '../types'; const chainId: ChainId = '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3'; diff --git a/src/renderer/features/wallets/ImportKeys/lib/types.ts b/src/renderer/features/wallets/ImportKeys/lib/types.ts index 460054c840..5f321201f2 100644 --- a/src/renderer/features/wallets/ImportKeys/lib/types.ts +++ b/src/renderer/features/wallets/ImportKeys/lib/types.ts @@ -1,4 +1,4 @@ -import { type ChainId, type HexString, type KeyType } from '@shared/core'; +import { type ChainId, type HexString, type KeyType } from '@/shared/core'; export type ImportFileKey = { key: Omit }; export type ImportFileChain = { [key: HexString]: ImportFileKey[] }; diff --git a/src/renderer/features/wallets/ImportKeys/model/import-keys-model.ts b/src/renderer/features/wallets/ImportKeys/model/import-keys-model.ts index 9b08077586..fb4435f5a5 100644 --- a/src/renderer/features/wallets/ImportKeys/model/import-keys-model.ts +++ b/src/renderer/features/wallets/ImportKeys/model/import-keys-model.ts @@ -3,8 +3,8 @@ import groupBy from 'lodash/groupBy'; import { reset } from 'patronum'; import { parse } from 'yaml'; -import { type AccountId, type ChainAccount, type ChainId, type DraftAccount, type ShardAccount } from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; +import { type AccountId, type ChainAccount, type ChainId, type DraftAccount, type ShardAccount } from '@/shared/core'; +import { toAccountId } from '@/shared/lib/utils'; import { PATH_ERRORS } from '../lib/constants'; import { DerivationImportError, type ErrorDetails } from '../lib/derivation-import-error'; import { importKeysUtils } from '../lib/import-keys-utils'; diff --git a/src/renderer/features/wallets/ImportKeys/ui/ImportKeysModal.tsx b/src/renderer/features/wallets/ImportKeys/ui/ImportKeysModal.tsx index 98c80fd0a2..6c659d5434 100644 --- a/src/renderer/features/wallets/ImportKeys/ui/ImportKeysModal.tsx +++ b/src/renderer/features/wallets/ImportKeys/ui/ImportKeysModal.tsx @@ -1,11 +1,11 @@ import { useUnit } from 'effector-react'; import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { type AccountId, type ChainAccount, type DraftAccount, type ShardAccount } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Alert, BaseModal, Button, InfoLink, InputFile, InputHint } from '@shared/ui'; -import { TEMPLATE_GITHUB_LINK } from '@features/wallets/ImportKeys/lib/constants'; +import { type AccountId, type ChainAccount, type DraftAccount, type ShardAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Alert, BaseModal, Button, InfoLink, InputFile, InputHint } from '@/shared/ui'; +import { TEMPLATE_GITHUB_LINK } from '@/features/wallets/ImportKeys/lib/constants'; import { importKeysUtils } from '../lib/import-keys-utils'; import { importKeysModel } from '../model/import-keys-model'; diff --git a/src/renderer/features/wallets/ImportKeys/ui/mocks/mock-data.ts b/src/renderer/features/wallets/ImportKeys/ui/mocks/mock-data.ts index 6e313eed17..270067f719 100644 --- a/src/renderer/features/wallets/ImportKeys/ui/mocks/mock-data.ts +++ b/src/renderer/features/wallets/ImportKeys/ui/mocks/mock-data.ts @@ -1,4 +1,4 @@ -import { KeyType } from '@shared/core'; +import { KeyType } from '@/shared/core'; import { type TypedImportedDerivation } from '../../lib/types'; // TODO removed when all derivations features merged and tested diff --git a/src/renderer/features/wallets/KeyConstructor/model/__tests__/constructor-model.test.ts b/src/renderer/features/wallets/KeyConstructor/model/__tests__/constructor-model.test.ts index fe62b160fd..0d7a10f24f 100644 --- a/src/renderer/features/wallets/KeyConstructor/model/__tests__/constructor-model.test.ts +++ b/src/renderer/features/wallets/KeyConstructor/model/__tests__/constructor-model.test.ts @@ -1,8 +1,8 @@ import { type Scope, allSettled, fork } from 'effector'; -import { AccountType, type ChainAccount, ChainType, CryptoType, KeyType, type ShardAccount } from '@shared/core'; -import { TEST_CHAIN_ID } from '@shared/lib/utils'; -import { networkModel } from '@entities/network'; +import { AccountType, type ChainAccount, ChainType, CryptoType, KeyType, type ShardAccount } from '@/shared/core'; +import { TEST_CHAIN_ID } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { constructorModel } from '../constructor-model'; import { constructorMock } from './mocks/constructor-mock'; diff --git a/src/renderer/features/wallets/KeyConstructor/model/__tests__/mocks/constructor-mock.ts b/src/renderer/features/wallets/KeyConstructor/model/__tests__/mocks/constructor-mock.ts index a6ada02f49..8299d007b8 100644 --- a/src/renderer/features/wallets/KeyConstructor/model/__tests__/mocks/constructor-mock.ts +++ b/src/renderer/features/wallets/KeyConstructor/model/__tests__/mocks/constructor-mock.ts @@ -1,4 +1,4 @@ -import { AccountType, ChainType, CryptoType, KeyType } from '@shared/core'; +import { AccountType, ChainType, CryptoType, KeyType } from '@/shared/core'; const defaultKeys = [ { diff --git a/src/renderer/features/wallets/KeyConstructor/model/constructor-model.ts b/src/renderer/features/wallets/KeyConstructor/model/constructor-model.ts index 5cc474fa27..5b0f1a7578 100644 --- a/src/renderer/features/wallets/KeyConstructor/model/constructor-model.ts +++ b/src/renderer/features/wallets/KeyConstructor/model/constructor-model.ts @@ -2,11 +2,11 @@ import { combine, createEffect, createEvent, createStore, sample } from 'effecto import { createForm } from 'effector-forms'; import { spread } from 'patronum'; -import { type Chain, type ChainAccount, type ShardAccount } from '@shared/core'; -import { AccountType, ChainType, CryptoType, KeyType } from '@shared/core'; -import { derivationHasPassword, validateDerivation } from '@shared/lib/utils'; -import { networkModel, networkUtils } from '@entities/network'; -import { KEY_NAMES, SHARDED_KEY_NAMES, accountUtils } from '@entities/wallet'; +import { type Chain, type ChainAccount, type ShardAccount } from '@/shared/core'; +import { AccountType, ChainType, CryptoType, KeyType } from '@/shared/core'; +import { derivationHasPassword, validateDerivation } from '@/shared/lib/utils'; +import { networkModel, networkUtils } from '@/entities/network'; +import { KEY_NAMES, SHARDED_KEY_NAMES, accountUtils } from '@/entities/wallet'; const formInitiated = createEvent<(ChainAccount | ShardAccount)[]>(); const formStarted = createEvent(); diff --git a/src/renderer/features/wallets/KeyConstructor/ui/KeyConstructor.tsx b/src/renderer/features/wallets/KeyConstructor/ui/KeyConstructor.tsx index 204241f330..ef9f068058 100644 --- a/src/renderer/features/wallets/KeyConstructor/ui/KeyConstructor.tsx +++ b/src/renderer/features/wallets/KeyConstructor/ui/KeyConstructor.tsx @@ -1,9 +1,9 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type ChainAccount, type DraftAccount, type ShardAccount } from '@shared/core'; -import { BaseModal, Button } from '@shared/ui'; +import { type ChainAccount, type DraftAccount, type ShardAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BaseModal, Button } from '@/shared/ui'; import { constructorModel } from '../model/constructor-model'; import { KeyForm } from './KeyForm'; diff --git a/src/renderer/features/wallets/KeyConstructor/ui/KeyForm.tsx b/src/renderer/features/wallets/KeyConstructor/ui/KeyForm.tsx index 588a558c20..107c415564 100644 --- a/src/renderer/features/wallets/KeyConstructor/ui/KeyForm.tsx +++ b/src/renderer/features/wallets/KeyConstructor/ui/KeyForm.tsx @@ -2,11 +2,11 @@ import { useForm } from 'effector-forms'; import { useUnit } from 'effector-react'; import { type FormEvent, useEffect, useMemo, useRef } from 'react'; -import { useI18n } from '@app/providers'; -import { KeyType } from '@shared/core'; -import { Button, Checkbox, FootnoteText, Input, InputHint, Select } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { networkModel } from '@entities/network'; +import { KeyType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button, Checkbox, FootnoteText, Input, InputHint, Select } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; import { constructorModel } from '../model/constructor-model'; import { ShardInfoPopover } from './ShardInfoPopover'; diff --git a/src/renderer/features/wallets/KeyConstructor/ui/KeysList.tsx b/src/renderer/features/wallets/KeyConstructor/ui/KeysList.tsx index 7015644843..125d0d336f 100644 --- a/src/renderer/features/wallets/KeyConstructor/ui/KeysList.tsx +++ b/src/renderer/features/wallets/KeyConstructor/ui/KeysList.tsx @@ -1,10 +1,10 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { FootnoteText, HelpText, Icon, IconButton, SmallTitleText } from '@shared/ui'; -import { ChainIcon } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { accountUtils } from '@entities/wallet'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, HelpText, Icon, IconButton, SmallTitleText } from '@/shared/ui'; +import { ChainIcon } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { accountUtils } from '@/entities/wallet'; import { constructorModel } from '../model/constructor-model'; export const KeysList = () => { diff --git a/src/renderer/features/wallets/KeyConstructor/ui/ShardInfoPopover.tsx b/src/renderer/features/wallets/KeyConstructor/ui/ShardInfoPopover.tsx index a17709f251..6aad041e6d 100644 --- a/src/renderer/features/wallets/KeyConstructor/ui/ShardInfoPopover.tsx +++ b/src/renderer/features/wallets/KeyConstructor/ui/ShardInfoPopover.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon, InfoLink, Popover } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon, InfoLink, Popover } from '@/shared/ui'; export const ShardInfoPopover = () => { const { t } = useI18n(); diff --git a/src/renderer/features/wallets/KeyConstructor/ui/WarningModal.tsx b/src/renderer/features/wallets/KeyConstructor/ui/WarningModal.tsx index 0f2b8fbe15..a04a8541dc 100644 --- a/src/renderer/features/wallets/KeyConstructor/ui/WarningModal.tsx +++ b/src/renderer/features/wallets/KeyConstructor/ui/WarningModal.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { BaseModal, Button, FootnoteText, SmallTitleText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BaseModal, Button, FootnoteText, SmallTitleText } from '@/shared/ui'; type Props = { isOpen: boolean; diff --git a/src/renderer/features/wallets/RenameWallet/model/__tests__/mocks/wallet-mock.ts b/src/renderer/features/wallets/RenameWallet/model/__tests__/mocks/wallet-mock.ts index 91d7b1d01d..5c24d6b537 100644 --- a/src/renderer/features/wallets/RenameWallet/model/__tests__/mocks/wallet-mock.ts +++ b/src/renderer/features/wallets/RenameWallet/model/__tests__/mocks/wallet-mock.ts @@ -1,4 +1,4 @@ -import { SigningType, WalletType } from '@shared/core'; +import { SigningType, WalletType } from '@/shared/core'; const wallet1 = { id: 1, diff --git a/src/renderer/features/wallets/RenameWallet/model/__tests__/rename-wallet-model.test.ts b/src/renderer/features/wallets/RenameWallet/model/__tests__/rename-wallet-model.test.ts index 55cbe7c6db..1dd52c8b67 100644 --- a/src/renderer/features/wallets/RenameWallet/model/__tests__/rename-wallet-model.test.ts +++ b/src/renderer/features/wallets/RenameWallet/model/__tests__/rename-wallet-model.test.ts @@ -1,7 +1,7 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { walletModel } from '@entities/wallet'; +import { storageService } from '@/shared/api/storage'; +import { walletModel } from '@/entities/wallet'; import { renameWalletModel } from '../rename-wallet-model'; import { walletMock } from './mocks/wallet-mock'; diff --git a/src/renderer/features/wallets/RenameWallet/model/rename-wallet-model.ts b/src/renderer/features/wallets/RenameWallet/model/rename-wallet-model.ts index 9cb1ee4d9f..d9a207263a 100644 --- a/src/renderer/features/wallets/RenameWallet/model/rename-wallet-model.ts +++ b/src/renderer/features/wallets/RenameWallet/model/rename-wallet-model.ts @@ -2,10 +2,10 @@ import { attach, combine, createApi, createEffect, createStore, sample } from 'e import { createForm } from 'effector-forms'; import { not } from 'patronum'; -import { storageService } from '@shared/api/storage'; -import { type Wallet } from '@shared/core'; -import { splice } from '@shared/lib/utils'; -import { walletModel } from '@entities/wallet'; +import { storageService } from '@/shared/api/storage'; +import { type Wallet } from '@/shared/core'; +import { splice } from '@/shared/lib/utils'; +import { walletModel } from '@/entities/wallet'; export type Callbacks = { onSubmit: () => void; diff --git a/src/renderer/features/wallets/RenameWallet/ui/RenameWalletModal.tsx b/src/renderer/features/wallets/RenameWallet/ui/RenameWalletModal.tsx index 6c98af19d1..f227c91b6c 100644 --- a/src/renderer/features/wallets/RenameWallet/ui/RenameWalletModal.tsx +++ b/src/renderer/features/wallets/RenameWallet/ui/RenameWalletModal.tsx @@ -1,9 +1,9 @@ import { useForm } from 'effector-forms'; import { type FormEvent, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { type Wallet } from '@shared/core'; -import { BaseModal, Button, Input, InputHint } from '@shared/ui'; +import { type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BaseModal, Button, Input, InputHint } from '@/shared/ui'; import { renameWalletModel } from '../model/rename-wallet-model'; type Props = { diff --git a/src/renderer/features/wallets/SelectWalletPairing/model/wallet-pairing-model.ts b/src/renderer/features/wallets/SelectWalletPairing/model/wallet-pairing-model.ts index 1a25f1b196..7b4905d256 100644 --- a/src/renderer/features/wallets/SelectWalletPairing/model/wallet-pairing-model.ts +++ b/src/renderer/features/wallets/SelectWalletPairing/model/wallet-pairing-model.ts @@ -1,6 +1,6 @@ import { createEvent, createStore, sample } from 'effector'; -import { type WalletFamily } from '@shared/core'; +import { type WalletFamily } from '@/shared/core'; const walletTypeSet = createEvent(); const walletTypeCleared = createEvent(); diff --git a/src/renderer/features/wallets/SelectWalletPairing/ui/SelectWalletPairing.tsx b/src/renderer/features/wallets/SelectWalletPairing/ui/SelectWalletPairing.tsx index 49c7d77f70..0f2160b90f 100644 --- a/src/renderer/features/wallets/SelectWalletPairing/ui/SelectWalletPairing.tsx +++ b/src/renderer/features/wallets/SelectWalletPairing/ui/SelectWalletPairing.tsx @@ -1,10 +1,10 @@ import { type TFunction } from 'i18next'; -import { useI18n } from '@app/providers'; -import { WalletType } from '@shared/core'; -import { DropdownButton } from '@shared/ui'; -import { type ButtonDropdownOption } from '@shared/ui/types'; -import { WalletIcon } from '@entities/wallet'; +import { WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { DropdownButton } from '@/shared/ui'; +import { type ButtonDropdownOption } from '@/shared/ui/types'; +import { WalletIcon } from '@/entities/wallet'; import { walletPairingModel } from '../model/wallet-pairing-model'; const getDropdownOptions = (t: TFunction): ButtonDropdownOption[] => { diff --git a/src/renderer/features/wallets/ShardSelectorModal/lib/selector-utils.ts b/src/renderer/features/wallets/ShardSelectorModal/lib/selector-utils.ts index a064ab472b..9493a2003c 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/lib/selector-utils.ts +++ b/src/renderer/features/wallets/ShardSelectorModal/lib/selector-utils.ts @@ -1,4 +1,4 @@ -import { type AccountId } from '@shared/core'; +import { type AccountId } from '@/shared/core'; import { type AccountToggleParams, diff --git a/src/renderer/features/wallets/ShardSelectorModal/lib/shards-utils.ts b/src/renderer/features/wallets/ShardSelectorModal/lib/shards-utils.ts index 553434801e..2cadd9b47c 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/lib/shards-utils.ts +++ b/src/renderer/features/wallets/ShardSelectorModal/lib/shards-utils.ts @@ -9,9 +9,9 @@ import { type ChainId, type ID, type ShardAccount, -} from '@shared/core'; -import { isStringsMatchQuery, toAddress } from '@shared/lib/utils'; -import { accountUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { isStringsMatchQuery, toAddress } from '@/shared/lib/utils'; +import { accountUtils } from '@/entities/wallet'; import { type ChainTuple, type ChainsMap, type RootTuple, type SelectedStruct } from './types'; diff --git a/src/renderer/features/wallets/ShardSelectorModal/lib/types.ts b/src/renderer/features/wallets/ShardSelectorModal/lib/types.ts index 51a1a26678..9a79e29825 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/lib/types.ts +++ b/src/renderer/features/wallets/ShardSelectorModal/lib/types.ts @@ -5,7 +5,7 @@ import { type ChainId, type ID, type ShardAccount, -} from '@shared/core'; +} from '@/shared/core'; export type RootTuple = [BaseAccount, ChainTuple[]]; export type ChainTuple = [ChainId, (ChainAccount | ShardAccount[])[]]; diff --git a/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/mocks/shards-mock.ts b/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/mocks/shards-mock.ts index c235a2305d..d23fbdc718 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/mocks/shards-mock.ts +++ b/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/mocks/shards-mock.ts @@ -7,7 +7,7 @@ import { type ShardAccount, SigningType, WalletType, -} from '@shared/core'; +} from '@/shared/core'; const vaultAccounts = [ { diff --git a/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/shards-model.test.ts b/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/shards-model.test.ts index 85c8634d5d..e8d4d2f4e8 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/shards-model.test.ts +++ b/src/renderer/features/wallets/ShardSelectorModal/model/__tests__/shards-model.test.ts @@ -1,8 +1,8 @@ import { allSettled, fork } from 'effector'; -import { type ChainAccount, type ShardAccount } from '@shared/core'; -import { networkModel } from '@entities/network'; -import { walletModel } from '@entities/wallet'; +import { type ChainAccount, type ShardAccount } from '@/shared/core'; +import { networkModel } from '@/entities/network'; +import { walletModel } from '@/entities/wallet'; import { shardsModel } from '../shards-model'; import { shardsMock } from './mocks/shards-mock'; diff --git a/src/renderer/features/wallets/ShardSelectorModal/model/shards-model.ts b/src/renderer/features/wallets/ShardSelectorModal/model/shards-model.ts index a9c3138024..9f9d399165 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/model/shards-model.ts +++ b/src/renderer/features/wallets/ShardSelectorModal/model/shards-model.ts @@ -1,9 +1,9 @@ import { attach, combine, createApi, createEvent, createStore, sample } from 'effector'; import cloneDeep from 'lodash/cloneDeep'; -import { type Account, type Wallet } from '@shared/core'; -import { networkModel } from '@entities/network'; -import { walletModel, walletUtils } from '@entities/wallet'; +import { type Account, type Wallet } from '@/shared/core'; +import { networkModel } from '@/entities/network'; +import { walletModel, walletUtils } from '@/entities/wallet'; import { selectorUtils } from '../lib/selector-utils'; import { shardsUtils } from '../lib/shards-utils'; import { diff --git a/src/renderer/features/wallets/ShardSelectorModal/ui/SelectableShard.tsx b/src/renderer/features/wallets/ShardSelectorModal/ui/SelectableShard.tsx index 5d3815b418..16d5ea4c4c 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/ui/SelectableShard.tsx +++ b/src/renderer/features/wallets/ShardSelectorModal/ui/SelectableShard.tsx @@ -1,8 +1,8 @@ -import { useI18n } from '@app/providers'; -import { type BaseAccount, type ChainAccount, type Explorer, type ShardAccount, type Wallet } from '@shared/core'; -import { cnTw, toAddress } from '@shared/lib/utils'; -import { BodyText, Checkbox, HelpText, IconButton, Identicon, Truncate } from '@shared/ui'; -import { ExplorersPopover, accountUtils, walletUtils } from '@entities/wallet'; +import { type BaseAccount, type ChainAccount, type Explorer, type ShardAccount, type Wallet } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, toAddress } from '@/shared/lib/utils'; +import { BodyText, Checkbox, HelpText, IconButton, Identicon, Truncate } from '@/shared/ui'; +import { ExplorersPopover, accountUtils, walletUtils } from '@/entities/wallet'; type Props = { wallet?: Wallet; diff --git a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSearch.tsx b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSearch.tsx index 16644b221f..a7359e2e52 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSearch.tsx +++ b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSearch.tsx @@ -1,7 +1,7 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { SearchInput } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { SearchInput } from '@/shared/ui'; import { shardsModel } from '../model/shards-model'; export const ShardSearch = () => { diff --git a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorButton.tsx b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorButton.tsx index af1c90d7fb..ed47d69567 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorButton.tsx +++ b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorButton.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, Icon, SmallTitleText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Button, Icon, SmallTitleText } from '@/shared/ui'; import { shardsModel } from '../model/shards-model'; export const ShardSelectorButton = () => { diff --git a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorModal.tsx b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorModal.tsx index 9677dc3e97..f08c522af7 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorModal.tsx +++ b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardSelectorModal.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { BaseModal, Button } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BaseModal, Button } from '@/shared/ui'; import { type Callbacks, shardsModel } from '../model/shards-model'; import { ShardSearch } from './ShardSearch'; diff --git a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardedGroup.tsx b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardedGroup.tsx index 753608f01b..770fa2bcba 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardedGroup.tsx +++ b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardedGroup.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; import { type ChangeEvent } from 'react'; -import { type Chain, type ID, type ShardAccount } from '@shared/core'; -import { Accordion, CaptionText, Checkbox, FootnoteText } from '@shared/ui'; +import { type Chain, type ID, type ShardAccount } from '@/shared/core'; +import { Accordion, CaptionText, Checkbox, FootnoteText } from '@/shared/ui'; import { selectorUtils } from '../lib/selector-utils'; import { shardsModel } from '../model/shards-model'; diff --git a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardsStructure.tsx b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardsStructure.tsx index 77ef919043..c1aafcce85 100644 --- a/src/renderer/features/wallets/ShardSelectorModal/ui/ShardsStructure.tsx +++ b/src/renderer/features/wallets/ShardSelectorModal/ui/ShardsStructure.tsx @@ -1,12 +1,12 @@ import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type AccountId, type ChainId, type ID } from '@shared/core'; -import { RootExplorers } from '@shared/lib/utils'; -import { Accordion, Checkbox, FootnoteText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +import { type AccountId, type ChainId, type ID } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { RootExplorers } from '@/shared/lib/utils'; +import { Accordion, Checkbox, FootnoteText } from '@/shared/ui'; +import { ChainTitle } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { selectorUtils } from '../lib/selector-utils'; import { shardsModel } from '../model/shards-model'; diff --git a/src/renderer/features/wallets/WalletSelect/lib/__tests__/wallet-select-utils.test.ts b/src/renderer/features/wallets/WalletSelect/lib/__tests__/wallet-select-utils.test.ts index 629d007cbe..ebf60ba6c7 100644 --- a/src/renderer/features/wallets/WalletSelect/lib/__tests__/wallet-select-utils.test.ts +++ b/src/renderer/features/wallets/WalletSelect/lib/__tests__/wallet-select-utils.test.ts @@ -1,4 +1,4 @@ -import { type Wallet, WalletType } from '@shared/core'; +import { type Wallet, WalletType } from '@/shared/core'; import { walletSelectUtils } from '../wallet-select-utils'; describe('features/wallets/WalletSelect/lib/wallet-select-utils', () => { diff --git a/src/renderer/features/wallets/WalletSelect/lib/wallet-select-utils.ts b/src/renderer/features/wallets/WalletSelect/lib/wallet-select-utils.ts index 1b39b4422c..756aee33bf 100644 --- a/src/renderer/features/wallets/WalletSelect/lib/wallet-select-utils.ts +++ b/src/renderer/features/wallets/WalletSelect/lib/wallet-select-utils.ts @@ -1,6 +1,6 @@ -import { type Wallet, type WalletFamily, WalletType } from '@shared/core'; -import { includes } from '@shared/lib/utils'; -import { walletUtils } from '@entities/wallet'; +import { type Wallet, type WalletFamily, WalletType } from '@/shared/core'; +import { includes } from '@/shared/lib/utils'; +import { walletUtils } from '@/entities/wallet'; export const walletSelectUtils = { getWalletByGroups, diff --git a/src/renderer/features/wallets/WalletSelect/model/__tests__/wallet-select-model.test.ts b/src/renderer/features/wallets/WalletSelect/model/__tests__/wallet-select-model.test.ts index 1519100283..a22ae1d6a7 100644 --- a/src/renderer/features/wallets/WalletSelect/model/__tests__/wallet-select-model.test.ts +++ b/src/renderer/features/wallets/WalletSelect/model/__tests__/wallet-select-model.test.ts @@ -1,8 +1,8 @@ import { allSettled, fork } from 'effector'; -import { storageService } from '@shared/api/storage'; -import { SigningType, type Wallet, type WalletFamily, WalletType } from '@shared/core'; -import { walletModel } from '@entities/wallet'; +import { storageService } from '@/shared/api/storage'; +import { SigningType, type Wallet, type WalletFamily, WalletType } from '@/shared/core'; +import { walletModel } from '@/entities/wallet'; import { walletSelectModel } from '../wallet-select-model'; describe('features/wallets/WalletSelect/model/wallet-select-model', () => { diff --git a/src/renderer/features/wallets/WalletSelect/model/wallet-select-model.ts b/src/renderer/features/wallets/WalletSelect/model/wallet-select-model.ts index 0e29cf1a81..53be2cebc6 100644 --- a/src/renderer/features/wallets/WalletSelect/model/wallet-select-model.ts +++ b/src/renderer/features/wallets/WalletSelect/model/wallet-select-model.ts @@ -2,13 +2,13 @@ import { default as BigNumber } from 'bignumber.js'; import { attach, combine, createApi, createEffect, createEvent, createStore, sample } from 'effector'; import { once, previous } from 'patronum'; -import { storageService } from '@shared/api/storage'; -import { type Account, type ID, type Wallet } from '@shared/core'; -import { dictionary, getRoundedValue, totalAmount } from '@shared/lib/utils'; -import { balanceModel } from '@entities/balance'; -import { networkModel } from '@entities/network'; -import { currencyModel, priceProviderModel } from '@entities/price'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +import { storageService } from '@/shared/api/storage'; +import { type Account, type ID, type Wallet } from '@/shared/core'; +import { dictionary, getRoundedValue, totalAmount } from '@/shared/lib/utils'; +import { balanceModel } from '@/entities/balance'; +import { networkModel } from '@/entities/network'; +import { currencyModel, priceProviderModel } from '@/entities/price'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { walletSelectUtils } from '../lib/wallet-select-utils'; export type Callbacks = { diff --git a/src/renderer/features/wallets/WalletSelect/ui/ProxiedTooltip.tsx b/src/renderer/features/wallets/WalletSelect/ui/ProxiedTooltip.tsx index 2ab42aecab..804797112c 100644 --- a/src/renderer/features/wallets/WalletSelect/ui/ProxiedTooltip.tsx +++ b/src/renderer/features/wallets/WalletSelect/ui/ProxiedTooltip.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon, Popover } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon, Popover } from '@/shared/ui'; export const ProxiedTooltip = () => { const { t } = useI18n(); diff --git a/src/renderer/features/wallets/WalletSelect/ui/WalletButton.tsx b/src/renderer/features/wallets/WalletSelect/ui/WalletButton.tsx index 59495396e6..81f5ce31c3 100644 --- a/src/renderer/features/wallets/WalletSelect/ui/WalletButton.tsx +++ b/src/renderer/features/wallets/WalletSelect/ui/WalletButton.tsx @@ -1,8 +1,8 @@ import { Popover } from '@headlessui/react'; -import { type Wallet } from '@shared/core'; -import { Icon } from '@shared/ui'; -import { WalletCardLg } from '@entities/wallet'; +import { type Wallet } from '@/shared/core'; +import { Icon } from '@/shared/ui'; +import { WalletCardLg } from '@/entities/wallet'; import { WalletFiatBalance } from './WalletFiatBalance'; diff --git a/src/renderer/features/wallets/WalletSelect/ui/WalletFiatBalance.tsx b/src/renderer/features/wallets/WalletSelect/ui/WalletFiatBalance.tsx index 4b6470e6d3..54674571ae 100644 --- a/src/renderer/features/wallets/WalletSelect/ui/WalletFiatBalance.tsx +++ b/src/renderer/features/wallets/WalletSelect/ui/WalletFiatBalance.tsx @@ -1,13 +1,12 @@ import { default as BigNumber } from 'bignumber.js'; import { useUnit } from 'effector-react'; -import { useI18n } from '@app/providers'; -import { type ID } from '@shared/core'; -import { formatFiatBalance } from '@shared/lib/utils'; -import { Shimmering } from '@shared/ui'; -import { priceProviderModel } from '@entities/price'; -import { FiatBalance } from '@entities/price/ui/FiatBalance'; -import { walletModel } from '@entities/wallet'; +import { type ID } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { formatFiatBalance } from '@/shared/lib/utils'; +import { Shimmering } from '@/shared/ui'; +import { FiatBalance, priceProviderModel } from '@/entities/price'; +import { walletModel } from '@/entities/wallet'; import { walletSelectModel } from '../model/wallet-select-model'; BigNumber.config({ diff --git a/src/renderer/features/wallets/WalletSelect/ui/WalletGroup.tsx b/src/renderer/features/wallets/WalletSelect/ui/WalletGroup.tsx index 55c09a5502..38d8c56d8a 100644 --- a/src/renderer/features/wallets/WalletSelect/ui/WalletGroup.tsx +++ b/src/renderer/features/wallets/WalletSelect/ui/WalletGroup.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@app/providers'; -import { type Wallet, type WalletFamily, WalletType } from '@shared/core'; -import { Accordion, CaptionText, Icon } from '@shared/ui'; -import { WalletCardMd, WalletIcon, walletUtils } from '@entities/wallet'; +import { type Wallet, type WalletFamily, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Accordion, CaptionText, Icon } from '@/shared/ui'; +import { WalletCardMd, WalletIcon, walletUtils } from '@/entities/wallet'; import { walletSelectModel } from '../model/wallet-select-model'; import { ProxiedTooltip } from './ProxiedTooltip'; diff --git a/src/renderer/features/wallets/WalletSelect/ui/WalletPanel.tsx b/src/renderer/features/wallets/WalletSelect/ui/WalletPanel.tsx index 1af82153eb..b03b59a38f 100644 --- a/src/renderer/features/wallets/WalletSelect/ui/WalletPanel.tsx +++ b/src/renderer/features/wallets/WalletSelect/ui/WalletPanel.tsx @@ -2,9 +2,9 @@ import { Popover } from '@headlessui/react'; import { useUnit } from 'effector-react'; import { type ReactNode, useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { type WalletFamily } from '@shared/core'; -import { SearchInput, SmallTitleText } from '@shared/ui'; +import { type WalletFamily } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { SearchInput, SmallTitleText } from '@/shared/ui'; import { type Callbacks, walletSelectModel } from '../model/wallet-select-model'; import { WalletGroup } from './WalletGroup'; diff --git a/src/renderer/features/wallets/WalletSelect/ui/WalletSelect.tsx b/src/renderer/features/wallets/WalletSelect/ui/WalletSelect.tsx index dfc604cf1e..889be55591 100644 --- a/src/renderer/features/wallets/WalletSelect/ui/WalletSelect.tsx +++ b/src/renderer/features/wallets/WalletSelect/ui/WalletSelect.tsx @@ -2,8 +2,8 @@ import { Popover, Transition } from '@headlessui/react'; import { useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { Shimmering } from '@shared/ui'; -import { walletModel } from '@entities/wallet'; +import { Shimmering } from '@/shared/ui'; +import { walletModel } from '@/entities/wallet'; import { walletSelectModel } from '../model/wallet-select-model'; import { WalletButton } from './WalletButton'; diff --git a/src/renderer/pages/AddressBook/Contacts/Contacts.tsx b/src/renderer/pages/AddressBook/Contacts/Contacts.tsx index 84b5f8ebcb..5313eda1b5 100644 --- a/src/renderer/pages/AddressBook/Contacts/Contacts.tsx +++ b/src/renderer/pages/AddressBook/Contacts/Contacts.tsx @@ -1,10 +1,10 @@ import { useUnit } from 'effector-react'; import { Outlet } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { Header } from '@shared/ui'; -import { ContactList, ContactRow, EmptyContactList, EmptyFilteredContacts, contactModel } from '@entities/contact'; -import { ContactFilter, CreateContactNavigation, EditContactNavigation, filterModel } from '@features/contacts'; +import { useI18n } from '@/shared/i18n'; +import { Header } from '@/shared/ui'; +import { ContactList, ContactRow, EmptyContactList, EmptyFilteredContacts, contactModel } from '@/entities/contact'; +import { ContactFilter, CreateContactNavigation, EditContactNavigation, filterModel } from '@/features/contacts'; export const Contacts = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/AddressBook/CreateContact/CreateContact.tsx b/src/renderer/pages/AddressBook/CreateContact/CreateContact.tsx index 7f9961dafd..0819889874 100644 --- a/src/renderer/pages/AddressBook/CreateContact/CreateContact.tsx +++ b/src/renderer/pages/AddressBook/CreateContact/CreateContact.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom'; -import { Paths } from '@shared/routes'; -import { CreateContactModal } from '@widgets/ManageContactModal'; +import { Paths } from '@/shared/routes'; +import { CreateContactModal } from '@/widgets/ManageContactModal'; export const CreateContact = () => { const navigate = useNavigate(); diff --git a/src/renderer/pages/AddressBook/EditContact/EditContact.tsx b/src/renderer/pages/AddressBook/EditContact/EditContact.tsx index 65fd31e646..b5ea5200be 100644 --- a/src/renderer/pages/AddressBook/EditContact/EditContact.tsx +++ b/src/renderer/pages/AddressBook/EditContact/EditContact.tsx @@ -1,8 +1,8 @@ import { useNavigate } from 'react-router-dom'; -import { Paths } from '@shared/routes'; -import { EditRouteGuard } from '@features/contacts'; -import { EditContactModal } from '@widgets/ManageContactModal'; +import { Paths } from '@/shared/routes'; +import { EditRouteGuard } from '@/features/contacts'; +import { EditContactModal } from '@/widgets/ManageContactModal'; export const EditContact = () => { const navigate = useNavigate(); diff --git a/src/renderer/pages/Assets/Assets/Assets.tsx b/src/renderer/pages/Assets/Assets/Assets.tsx index 4f6f86630a..52b8c70f40 100644 --- a/src/renderer/pages/Assets/Assets/Assets.tsx +++ b/src/renderer/pages/Assets/Assets/Assets.tsx @@ -1,8 +1,8 @@ import { useUnit } from 'effector-react'; import { Outlet } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { Header } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Header } from '@/shared/ui'; import { AssetsChainView, AssetsPortfolioView, @@ -10,9 +10,9 @@ import { AssetsSettings, assetsSearchModel, assetsSettingsModel, -} from '@features/assets'; -import { ShardSelectorButton, ShardSelectorModal } from '@features/wallets'; -import { AssetTransactionModal } from '@widgets/AssetTransactionModal'; +} from '@/features/assets'; +import { ShardSelectorButton, ShardSelectorModal } from '@/features/wallets'; +import { AssetTransactionModal } from '@/widgets/AssetTransactionModal'; import { assetsModel } from './model/assets-model'; diff --git a/src/renderer/pages/Assets/Assets/model/assets-model.ts b/src/renderer/pages/Assets/Assets/model/assets-model.ts index 387fa0abc5..9a5e932838 100644 --- a/src/renderer/pages/Assets/Assets/model/assets-model.ts +++ b/src/renderer/pages/Assets/Assets/model/assets-model.ts @@ -1,10 +1,10 @@ import { createEvent, createStore, sample } from 'effector'; import { once } from 'patronum'; -import { type Account, type Wallet } from '@shared/core'; -import { priceProviderModel } from '@entities/price'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; -import { assetsSearchModel, assetsSettingsModel, portfolioModel } from '@features/assets'; +import { type Account, type Wallet } from '@/shared/core'; +import { priceProviderModel } from '@/entities/price'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; +import { assetsSearchModel, assetsSettingsModel, portfolioModel } from '@/features/assets'; const activeShardsSet = createEvent(); diff --git a/src/renderer/pages/Assets/ReceiveAsset/ReceiveAsset.tsx b/src/renderer/pages/Assets/ReceiveAsset/ReceiveAsset.tsx index fd2a83b526..3be28c011f 100644 --- a/src/renderer/pages/Assets/ReceiveAsset/ReceiveAsset.tsx +++ b/src/renderer/pages/Assets/ReceiveAsset/ReceiveAsset.tsx @@ -1,10 +1,10 @@ import { useUnit } from 'effector-react'; import { useNavigate } from 'react-router-dom'; -import { Paths } from '@shared/routes'; -import { CheckPermission, OperationType, walletModel } from '@entities/wallet'; -import { AssetRouteGuard } from '@features/assets'; -import { ReceiveAssetModal } from '@widgets/ReceiveAssetModal'; +import { Paths } from '@/shared/routes'; +import { CheckPermission, OperationType, walletModel } from '@/entities/wallet'; +import { AssetRouteGuard } from '@/features/assets'; +import { ReceiveAssetModal } from '@/widgets/ReceiveAssetModal'; export const ReceiveAsset = () => { const navigate = useNavigate(); diff --git a/src/renderer/pages/Assets/SendAsset/SendAsset.tsx b/src/renderer/pages/Assets/SendAsset/SendAsset.tsx index f73928fb71..9b97a15933 100644 --- a/src/renderer/pages/Assets/SendAsset/SendAsset.tsx +++ b/src/renderer/pages/Assets/SendAsset/SendAsset.tsx @@ -1,9 +1,9 @@ import { useUnit } from 'effector-react'; -import { Paths } from '@shared/routes'; -import { CheckPermission, OperationType, walletModel } from '@entities/wallet'; -import { AssetRouteGuard } from '@features/assets'; -import { Transfer } from '@widgets/Transfer'; +import { Paths } from '@/shared/routes'; +import { CheckPermission, OperationType, walletModel } from '@/entities/wallet'; +import { AssetRouteGuard } from '@/features/assets'; +import { Transfer } from '@/widgets/Transfer'; export const SendAsset = () => { const activeWallet = useUnit(walletModel.$activeWallet); diff --git a/src/renderer/pages/Basket/lib/basket-page-utils.ts b/src/renderer/pages/Basket/lib/basket-page-utils.ts index 2b08ff5d8c..fc7bf73ecb 100644 --- a/src/renderer/pages/Basket/lib/basket-page-utils.ts +++ b/src/renderer/pages/Basket/lib/basket-page-utils.ts @@ -1,4 +1,4 @@ -import { type BasketTransaction, TransactionType } from '@shared/core'; +import { type BasketTransaction, TransactionType } from '@/shared/core'; import { isEditDelegationTransaction } from '@/entities/transaction'; import { Step } from '../types/basket-page-types'; diff --git a/src/renderer/pages/Basket/lib/operation-title.ts b/src/renderer/pages/Basket/lib/operation-title.ts index fa4312b228..e987465e37 100644 --- a/src/renderer/pages/Basket/lib/operation-title.ts +++ b/src/renderer/pages/Basket/lib/operation-title.ts @@ -1,5 +1,5 @@ -import { type BasketTransaction, type Chain, TransactionType } from '@shared/core'; -import { getAssetById } from '@shared/lib/utils'; +import { type BasketTransaction, type Chain, TransactionType } from '@/shared/core'; +import { getAssetById } from '@/shared/lib/utils'; import { type MultisigTransactionTypes, type TransferTransactionTypes, @@ -8,7 +8,7 @@ import { type XcmTransactionTypes, XcmTypes, isEditDelegationTransaction, -} from '@entities/transaction'; +} from '@/entities/transaction'; import { getCoreTx } from './utils'; diff --git a/src/renderer/pages/Basket/lib/prepareTransactions.ts b/src/renderer/pages/Basket/lib/prepareTransactions.ts index 58d4fdd4ca..3c986843c9 100644 --- a/src/renderer/pages/Basket/lib/prepareTransactions.ts +++ b/src/renderer/pages/Basket/lib/prepareTransactions.ts @@ -1,8 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { BN, BN_ZERO } from '@polkadot/util'; -import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; -import { proxyService } from '@shared/api/proxy'; +import { proxyService } from '@/shared/api/proxy'; import { type Account, type AccountId, @@ -20,17 +19,18 @@ import { TransactionType, type Validator, type Wallet, -} from '@shared/core'; -import { getAssetById, redeemableAmount, toAccountId, toAddress, transferableAmount } from '@shared/lib/utils'; +} from '@/shared/core'; +import { getAssetById, redeemableAmount, toAccountId, toAddress, transferableAmount } from '@/shared/lib/utils'; +import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; import { balanceUtils } from '@/entities/balance'; import { governanceService, votingService } from '@/entities/governance'; -import { networkUtils } from '@entities/network'; -import { eraService, useStakingData, validatorsService } from '@entities/staking'; -import { transactionService } from '@entities/transaction'; +import { networkUtils } from '@/entities/network'; +import { eraService, useStakingData, validatorsService } from '@/entities/staking'; +import { transactionService } from '@/entities/transaction'; +import { type UnlockFormData } from '@/features/governance/types/structs'; import { type VoteConfirm } from '@/features/operations/OperationsConfirm'; +import { type RemoveVoteConfirm } from '@/features/operations/OperationsConfirm/Referendum/RemoveVote/model/confirm-model'; import { type FeeMap } from '@/features/operations/OperationsValidation'; -import { type UnlockFormData } from '@features/governance/types/structs'; -import { type RemoveVoteConfirm } from '@features/operations/OperationsConfirm/Referendum/RemoveVote/model/confirm-model'; import { getCoreTx } from './utils'; diff --git a/src/renderer/pages/Basket/lib/utils.ts b/src/renderer/pages/Basket/lib/utils.ts index b5b0ce5304..956614360e 100644 --- a/src/renderer/pages/Basket/lib/utils.ts +++ b/src/renderer/pages/Basket/lib/utils.ts @@ -1,4 +1,4 @@ -import { type BasketTransaction, type Transaction, TransactionType } from '@shared/core'; +import { type BasketTransaction, type Transaction, TransactionType } from '@/shared/core'; import { findCoreBatchAll, isEditDelegationTransaction } from '@/entities/transaction'; export const getCoreTx = (tx: BasketTransaction): Transaction => { diff --git a/src/renderer/pages/Basket/model/basket-page-model.ts b/src/renderer/pages/Basket/model/basket-page-model.ts index 1e8bd2b149..b1095acee8 100644 --- a/src/renderer/pages/Basket/model/basket-page-model.ts +++ b/src/renderer/pages/Basket/model/basket-page-model.ts @@ -2,10 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { type EventCallable, combine, createEffect, createEvent, createStore, restore, sample, split } from 'effector'; import { delay, throttle } from 'patronum'; -import { type BasketTransaction, type ChainId, type ID, TransactionType } from '@shared/core'; -import { addUnique, removeFromCollection } from '@shared/lib/utils'; -import { basketModel } from '@entities/basket'; -import { networkModel, networkUtils } from '@entities/network'; +import { type BasketTransaction, type ChainId, type ID, TransactionType } from '@/shared/core'; +import { addUnique, removeFromCollection } from '@/shared/lib/utils'; +import { basketModel } from '@/entities/basket'; +import { networkModel, networkUtils } from '@/entities/network'; import { type MultisigTransactionTypes, type TransferTransactionTypes, @@ -15,10 +15,10 @@ import { XcmTypes, isEditDelegationTransaction, transactionService, -} from '@entities/transaction'; -import { walletModel } from '@entities/wallet'; +} from '@/entities/transaction'; +import { walletModel } from '@/entities/wallet'; +import { basketFilterModel } from '@/features/basket'; import { unlockValidateModel, voteValidateModel } from '@/features/governance'; -import { basketFilterModel } from '@features/basket/BasketFilter'; import { type FeeMap, type ValidationResult, @@ -38,7 +38,7 @@ import { transferValidateModel, unstakeValidateModel, withdrawValidateModel, -} from '@features/operations/OperationsValidation'; +} from '@/features/operations/OperationsValidation'; import { basketPageUtils } from '../lib/basket-page-utils'; import { getCoreTx } from '../lib/utils'; import { Step } from '../types/basket-page-types'; diff --git a/src/renderer/pages/Basket/model/sign-operations-model.ts b/src/renderer/pages/Basket/model/sign-operations-model.ts index e7c644b415..b4c855bf18 100644 --- a/src/renderer/pages/Basket/model/sign-operations-model.ts +++ b/src/renderer/pages/Basket/model/sign-operations-model.ts @@ -11,12 +11,12 @@ import { type Connection, TransactionType, type Wallet, -} from '@shared/core'; -import { type ChainError } from '@shared/core/types/basket'; -import { toAccountId } from '@shared/lib/utils'; +} from '@/shared/core'; +import { type ChainError } from '@/shared/core/types/basket'; +import { toAccountId } from '@/shared/lib/utils'; import { balanceModel } from '@/entities/balance'; -import { basketModel } from '@entities/basket'; -import { networkModel } from '@entities/network'; +import { basketModel } from '@/entities/basket'; +import { networkModel } from '@/entities/network'; import { type MultisigTransactionTypes, type TransferTransactionTypes, @@ -25,12 +25,11 @@ import { type XcmTransactionTypes, XcmTypes, isEditDelegationTransaction, -} from '@entities/transaction'; -import { walletModel, walletUtils } from '@entities/wallet'; -import { type FeeMap } from '@/features/operations/OperationsValidation'; -import { signModel } from '@features/operations/OperationSign/model/sign-model'; -import { submitModel } from '@features/operations/OperationSubmit'; -import { ExtrinsicResult } from '@features/operations/OperationSubmit/lib/types'; +} from '@/entities/transaction'; +import { walletModel, walletUtils } from '@/entities/wallet'; +import { signModel } from '@/features/operations/OperationSign/model/sign-model'; +import { submitModel } from '@/features/operations/OperationSubmit'; +import { ExtrinsicResult } from '@/features/operations/OperationSubmit/lib/types'; import { addProxyConfirmModel, addPureProxiedConfirmModel, @@ -49,8 +48,9 @@ import { unstakeConfirmModel, voteConfirmModel, withdrawConfirmModel, -} from '@features/operations/OperationsConfirm'; -import { unlockConfirmAggregate } from '@/widgets/UnlockModal/aggregates/unlockConfirm'; +} from '@/features/operations/OperationsConfirm'; +import { type FeeMap } from '@/features/operations/OperationsValidation'; +import { unlockConfirmAggregate } from '@/widgets/UnlockModal'; import { type DataParams, prepareTransaction } from '../lib/prepareTransactions'; import { getCoreTx } from '../lib/utils'; import { Step } from '../types'; diff --git a/src/renderer/pages/Basket/ui/Basket.tsx b/src/renderer/pages/Basket/ui/Basket.tsx index 5b3307c35d..dce829f12c 100644 --- a/src/renderer/pages/Basket/ui/Basket.tsx +++ b/src/renderer/pages/Basket/ui/Basket.tsx @@ -1,9 +1,9 @@ import { useUnit } from 'effector-react'; import { useEffect } from 'react'; -import { useI18n } from '@app/providers'; -import { Button, Checkbox, ConfirmModal, FootnoteText, Header, Icon, SmallTitleText } from '@shared/ui'; -import { BasketFilter, basketFilterModel } from '@features/basket/BasketFilter'; +import { useI18n } from '@/shared/i18n'; +import { Button, Checkbox, ConfirmModal, FootnoteText, Header, Icon, SmallTitleText } from '@/shared/ui'; +import { BasketFilter, basketFilterModel } from '@/features/basket'; import { basketPageUtils } from '../lib/basket-page-utils'; import { basketPageModel } from '../model/basket-page-model'; diff --git a/src/renderer/pages/Basket/ui/EmptyBasket.tsx b/src/renderer/pages/Basket/ui/EmptyBasket.tsx index 4b5ce277c4..45ecd79c60 100644 --- a/src/renderer/pages/Basket/ui/EmptyBasket.tsx +++ b/src/renderer/pages/Basket/ui/EmptyBasket.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; export const EmptyBasket = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/Basket/ui/Operation.tsx b/src/renderer/pages/Basket/ui/Operation.tsx index 7065278ec4..59a7cb0537 100644 --- a/src/renderer/pages/Basket/ui/Operation.tsx +++ b/src/renderer/pages/Basket/ui/Operation.tsx @@ -1,14 +1,14 @@ import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { chainsService } from '@shared/api/network'; -import { type BasketTransaction } from '@shared/core'; -import { type ChainError } from '@shared/core/types/basket'; -import { cnTw, getAssetById } from '@shared/lib/utils'; -import { HelpText, IconButton, Shimmering, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { ChainTitle, XcmChains } from '@entities/chain'; -import { TransactionTitle, getTransactionAmount, isXcmTransaction } from '@entities/transaction'; +import { chainsService } from '@/shared/api/network'; +import { type BasketTransaction } from '@/shared/core'; +import { type ChainError } from '@/shared/core/types/basket'; +import { useI18n } from '@/shared/i18n'; +import { cnTw, getAssetById } from '@/shared/lib/utils'; +import { HelpText, IconButton, Shimmering, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { ChainTitle, XcmChains } from '@/entities/chain'; +import { TransactionTitle, getTransactionAmount, isXcmTransaction } from '@/entities/transaction'; import { getCoreTx } from '../lib/utils'; type Props = { diff --git a/src/renderer/pages/Basket/ui/SignOperation.tsx b/src/renderer/pages/Basket/ui/SignOperation.tsx index 1d60175435..63860d0f07 100644 --- a/src/renderer/pages/Basket/ui/SignOperation.tsx +++ b/src/renderer/pages/Basket/ui/SignOperation.tsx @@ -1,12 +1,12 @@ import { useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type BasketTransaction, TransactionType } from '@shared/core'; -import { useModalClose } from '@shared/lib/hooks'; -import { BaseModal } from '@shared/ui'; -import { OperationTitle } from '@entities/chain'; -import { networkModel } from '@entities/network'; +import { type BasketTransaction, TransactionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { BaseModal } from '@/shared/ui'; +import { OperationTitle } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; import { type MultisigTransactionTypes, type TransferTransactionTypes, @@ -15,8 +15,8 @@ import { type XcmTransactionTypes, XcmTypes, isEditDelegationTransaction, -} from '@entities/transaction'; -import { OperationSign, OperationSubmit } from '@features/operations'; +} from '@/entities/transaction'; +import { OperationSign, OperationSubmit } from '@/features/operations'; import { AddProxyConfirm, AddPureProxiedConfirm, @@ -35,8 +35,8 @@ import { UnstakeConfirmation, VoteConfirmation, WithdrawConfirmation, -} from '@features/operations/OperationsConfirm'; -import { UnlockConfirmation } from '@/widgets/UnlockModal/ui/UnlockConfirmation'; +} from '@/features/operations/OperationsConfirm'; +import { UnlockConfirmation } from '@/widgets/UnlockModal'; import { getOperationTitle } from '../lib/operation-title'; import { signOperationsUtils } from '../lib/sign-operations-utils'; import { getCoreTx } from '../lib/utils'; diff --git a/src/renderer/pages/Basket/ui/SignOperations.tsx b/src/renderer/pages/Basket/ui/SignOperations.tsx index ac70584c16..0e814416e4 100644 --- a/src/renderer/pages/Basket/ui/SignOperations.tsx +++ b/src/renderer/pages/Basket/ui/SignOperations.tsx @@ -1,13 +1,13 @@ import { useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type BasketTransaction, TransactionType, WalletType } from '@shared/core'; -import { useModalClose } from '@shared/lib/hooks'; -import { BaseModal, HeaderTitleText } from '@shared/ui'; -import { OperationTitle } from '@entities/chain'; -import { networkModel } from '@entities/network'; -import { SignButton } from '@entities/operations'; +import { type BasketTransaction, TransactionType, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { BaseModal, HeaderTitleText } from '@/shared/ui'; +import { OperationTitle } from '@/entities/chain'; +import { networkModel } from '@/entities/network'; +import { SignButton } from '@/entities/operations'; import { type MultisigTransactionTypes, type TransferTransactionTypes, @@ -16,8 +16,8 @@ import { type XcmTransactionTypes, XcmTypes, isEditDelegationTransaction, -} from '@entities/transaction'; -import { OperationSign, OperationSubmit } from '@features/operations'; +} from '@/entities/transaction'; +import { OperationSign, OperationSubmit } from '@/features/operations'; import { AddProxyConfirm, AddPureProxiedConfirm, @@ -37,8 +37,8 @@ import { UnstakeConfirmation, VoteConfirmation, WithdrawConfirmation, -} from '@features/operations/OperationsConfirm'; -import { UnlockConfirmation } from '@/widgets/UnlockModal/ui/UnlockConfirmation'; +} from '@/features/operations/OperationsConfirm'; +import { UnlockConfirmation } from '@/widgets/UnlockModal'; import { getOperationTitle } from '../lib/operation-title'; import { signOperationsUtils } from '../lib/sign-operations-utils'; import { getCoreTx } from '../lib/utils'; diff --git a/src/renderer/pages/Fellowship/ui/Fellowship.tsx b/src/renderer/pages/Fellowship/ui/Fellowship.tsx index 15137c8829..01fa05c833 100644 --- a/src/renderer/pages/Fellowship/ui/Fellowship.tsx +++ b/src/renderer/pages/Fellowship/ui/Fellowship.tsx @@ -2,8 +2,8 @@ import { useGate, useUnit } from 'effector-react'; import { useLayoutEffect } from 'react'; import { Outlet, generatePath, useParams } from 'react-router-dom'; -import { useI18n } from '@/app/providers'; import { type ChainId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { Paths } from '@/shared/routes'; import { BodyText, Header, Icon, Select } from '@/shared/ui'; import { Box, ScrollArea } from '@/shared/ui-kit'; diff --git a/src/renderer/pages/Fellowship/ui/FellowshipReferendumDetails.tsx b/src/renderer/pages/Fellowship/ui/FellowshipReferendumDetails.tsx index 2bc3f4ed7f..397c60b92e 100644 --- a/src/renderer/pages/Fellowship/ui/FellowshipReferendumDetails.tsx +++ b/src/renderer/pages/Fellowship/ui/FellowshipReferendumDetails.tsx @@ -1,9 +1,9 @@ import { generatePath, useParams } from 'react-router-dom'; import { referendaPallet } from '@/shared/pallet/referenda'; -import { Paths } from '@shared/routes'; -import { fellowshipReferendumDetailsFeature } from '@features/fellowship-referendum-details'; -import { navigationModel } from '@features/navigation'; +import { Paths } from '@/shared/routes'; +import { fellowshipReferendumDetailsFeature } from '@/features/fellowship-referendum-details'; +import { navigationModel } from '@/features/navigation'; const { ReferendumDetailsModal } = fellowshipReferendumDetailsFeature.views; diff --git a/src/renderer/pages/Fellowship/ui/FellowshipReferendumList.tsx b/src/renderer/pages/Fellowship/ui/FellowshipReferendumList.tsx index 8a79295979..109e473605 100644 --- a/src/renderer/pages/Fellowship/ui/FellowshipReferendumList.tsx +++ b/src/renderer/pages/Fellowship/ui/FellowshipReferendumList.tsx @@ -1,9 +1,9 @@ import { Outlet, generatePath, useParams } from 'react-router-dom'; +import { Paths } from '@/shared/routes'; import { Box } from '@/shared/ui-kit'; -import { Paths } from '@shared/routes'; import { fellowshipReferendumsFeature } from '@/features/fellowship-referendums'; -import { navigationModel } from '@features/navigation'; +import { navigationModel } from '@/features/navigation'; const { Referendums, Filters } = fellowshipReferendumsFeature.views; diff --git a/src/renderer/pages/Governance/aggregates/governancePage.ts b/src/renderer/pages/Governance/aggregates/governancePage.ts index e3007c728c..23bfb87869 100644 --- a/src/renderer/pages/Governance/aggregates/governancePage.ts +++ b/src/renderer/pages/Governance/aggregates/governancePage.ts @@ -2,11 +2,11 @@ import { combine, sample } from 'effector'; import { createGate } from 'effector-react'; import { either, readonly } from 'patronum'; -import { nonNullable, nullable } from '@shared/lib/utils'; +import { nonNullable, nullable } from '@/shared/lib/utils'; import { referendumModel, votingModel } from '@/entities/governance'; import { accountUtils, walletModel } from '@/entities/wallet'; +import { filterModel, listAggregate, listService, networkSelectorModel, votingAggregate } from '@/features/governance'; import { locksModel } from '@/features/governance/model/locks'; -import { filterModel, listAggregate, listService, networkSelectorModel, votingAggregate } from '@features/governance'; import { governancePageUtils } from '../lib/governancePageUtils'; const flow = createGate(); diff --git a/src/renderer/pages/Governance/lib/__tests__/governancePageUtils.test.ts b/src/renderer/pages/Governance/lib/__tests__/governancePageUtils.test.ts index d73bdcdd88..b34606eb0d 100644 --- a/src/renderer/pages/Governance/lib/__tests__/governancePageUtils.test.ts +++ b/src/renderer/pages/Governance/lib/__tests__/governancePageUtils.test.ts @@ -1,7 +1,7 @@ import { BN_ZERO } from '@polkadot/util'; -import { type OngoingReferendum } from '@shared/core'; -import { type AggregatedReferendum, VoteStatus } from '@features/governance'; +import { type OngoingReferendum } from '@/shared/core'; +import { type AggregatedReferendum, VoteStatus } from '@/features/governance'; import { governancePageUtils } from '../governancePageUtils'; const someVote = { diff --git a/src/renderer/pages/Governance/lib/governancePageUtils.ts b/src/renderer/pages/Governance/lib/governancePageUtils.ts index 4770298bfb..93068aca26 100644 --- a/src/renderer/pages/Governance/lib/governancePageUtils.ts +++ b/src/renderer/pages/Governance/lib/governancePageUtils.ts @@ -1,7 +1,7 @@ -import { type CompletedReferendum, type OngoingReferendum } from '@shared/core'; -import { nonNullable, nullable, performSearch } from '@shared/lib/utils'; -import { referendumService } from '@entities/governance'; -import { type AggregatedReferendum, VoteStatus } from '@features/governance'; +import { type CompletedReferendum, type OngoingReferendum } from '@/shared/core'; +import { nonNullable, nullable, performSearch } from '@/shared/lib/utils'; +import { referendumService } from '@/entities/governance'; +import { type AggregatedReferendum, VoteStatus } from '@/features/governance'; export const governancePageUtils = { filteredByQuery, diff --git a/src/renderer/pages/Governance/ui/EmptyGovernance.tsx b/src/renderer/pages/Governance/ui/EmptyGovernance.tsx index f31894d810..95edbd9912 100644 --- a/src/renderer/pages/Governance/ui/EmptyGovernance.tsx +++ b/src/renderer/pages/Governance/ui/EmptyGovernance.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; export const EmptyGovernance = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/Governance/ui/Governance.tsx b/src/renderer/pages/Governance/ui/Governance.tsx index 378105a446..173fa111a3 100644 --- a/src/renderer/pages/Governance/ui/Governance.tsx +++ b/src/renderer/pages/Governance/ui/Governance.tsx @@ -1,12 +1,12 @@ import { useGate, useUnit } from 'effector-react'; import { useEffect, useMemo, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type Referendum, type ReferendumId } from '@shared/core'; -import { nonNullable } from '@shared/lib/utils'; -import { Header, Plate } from '@shared/ui'; -import { referendumService } from '@entities/governance'; -import { InactiveNetwork } from '@entities/network'; +import { type Referendum, type ReferendumId } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { nonNullable } from '@/shared/lib/utils'; +import { Header, Plate } from '@/shared/ui'; +import { referendumService } from '@/entities/governance'; +import { InactiveNetwork } from '@/entities/network'; import { CompletedReferendums, Locks, @@ -18,14 +18,14 @@ import { TotalDelegation, delegationAggregate, networkSelectorModel, -} from '@features/governance'; +} from '@/features/governance'; import { CurrentDelegationModal, currentDelegationModel } from '@/widgets/CurrentDelegationsModal'; import { DelegateDetails } from '@/widgets/DelegateDetails'; import { Delegate } from '@/widgets/DelegateModal'; import { DelegationModal, delegationModel } from '@/widgets/DelegationModal'; import { RemoveVotesModal } from '@/widgets/RemoveVotesModal'; import { UnlockModal, unlockAggregate } from '@/widgets/UnlockModal'; -import { RevoteModal, VoteModal } from '@widgets/VoteModal'; +import { RevoteModal, VoteModal } from '@/widgets/VoteModal'; import { governancePageAggregate } from '../aggregates/governancePage'; import { EmptyGovernance } from './EmptyGovernance'; diff --git a/src/renderer/pages/Notifications/Notifications.tsx b/src/renderer/pages/Notifications/Notifications.tsx index bb13b618a9..508144ae3a 100644 --- a/src/renderer/pages/Notifications/Notifications.tsx +++ b/src/renderer/pages/Notifications/Notifications.tsx @@ -1,6 +1,6 @@ -import { useI18n } from '@app/providers'; -import { Header } from '@shared/ui'; -import { EmptyNotifications, NotificationsList } from '@features/notifications'; +import { useI18n } from '@/shared/i18n'; +import { Header } from '@/shared/ui'; +import { EmptyNotifications, NotificationsList } from '@/features/notifications'; export const Notifications = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.test.tsx b/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.test.tsx index 97dd30d049..8ff4356dd8 100644 --- a/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.test.tsx +++ b/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.test.tsx @@ -1,18 +1,18 @@ import { act, render, screen, waitFor } from '@testing-library/react'; -import { QrError, QrReader } from '@entities/transaction'; +import { QrError, QrReader } from '@/entities/transaction'; import KeyQrReader from './KeyQrReader'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), })); -jest.mock('@entities/transaction'); +jest.mock('@/entities/transaction'); -jest.mock('@shared/ui', () => ({ +jest.mock('@/shared/ui', () => ({ Select: ({ options }: any) => options.map((o: any) => {o.element}), Button: ({ children }: any) => , Loader: () => '', diff --git a/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.tsx b/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.tsx index 6edd10b3f1..f37c4d8049 100644 --- a/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.tsx +++ b/src/renderer/pages/Onboarding/Vault/KeyQrReader/KeyQrReader.tsx @@ -2,12 +2,12 @@ import { hexToU8a, isHex } from '@polkadot/util'; import { decodeAddress, encodeAddress } from '@polkadot/util-crypto'; import { useState } from 'react'; -import { useI18n } from '@app/providers'; -import { CryptoTypeString } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Button, CaptionText, FootnoteText, Icon, Loader, Select } from '@shared/ui'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; -import { type ErrorObject, QrError, QrReader, type SeedInfo, type VideoInput } from '@entities/transaction'; +import { CryptoTypeString } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Button, CaptionText, FootnoteText, Icon, Loader, Select } from '@/shared/ui'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; +import { type ErrorObject, QrError, QrReader, type SeedInfo, type VideoInput } from '@/entities/transaction'; const enum CameraState { ACTIVE, diff --git a/src/renderer/pages/Onboarding/Vault/ManageMultishard/ManageMultishard.tsx b/src/renderer/pages/Onboarding/Vault/ManageMultishard/ManageMultishard.tsx index 11a555d074..5758331073 100644 --- a/src/renderer/pages/Onboarding/Vault/ManageMultishard/ManageMultishard.tsx +++ b/src/renderer/pages/Onboarding/Vault/ManageMultishard/ManageMultishard.tsx @@ -3,16 +3,16 @@ import keyBy from 'lodash/keyBy'; import { useEffect, useState } from 'react'; import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; -import { useI18n } from '@app/providers'; +import { chainsService } from '@/shared/api/network'; +import { type BaseAccount, type Chain, type ChainAccount, type ChainId, type HexString } from '@/shared/core'; +import { AccountType, ChainType, CryptoType, ErrorType, KeyType, SigningType, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { RootExplorers, cnTw, toAccountId, toAddress } from '@/shared/lib/utils'; +import { Button, FootnoteText, HeaderTitleText, Icon, IconButton, Input, InputHint, SmallTitleText } from '@/shared/ui'; import { AccountExplorers, Address } from '@/shared/ui-entities'; -import { chainsService } from '@shared/api/network'; -import { type BaseAccount, type Chain, type ChainAccount, type ChainId, type HexString } from '@shared/core'; -import { AccountType, ChainType, CryptoType, ErrorType, KeyType, SigningType, WalletType } from '@shared/core'; -import { RootExplorers, cnTw, toAccountId, toAddress } from '@shared/lib/utils'; -import { Button, FootnoteText, HeaderTitleText, Icon, IconButton, Input, InputHint, SmallTitleText } from '@shared/ui'; -import { ChainTitle } from '@entities/chain'; -import { type AddressInfo, type CompactSeedInfo, type SeedInfo } from '@entities/transaction'; -import { ExplorersPopover, walletModel } from '@entities/wallet'; +import { ChainTitle } from '@/entities/chain'; +import { type AddressInfo, type CompactSeedInfo, type SeedInfo } from '@/entities/transaction'; +import { ExplorersPopover, walletModel } from '@/entities/wallet'; type WalletForm = { walletName: string; diff --git a/src/renderer/pages/Onboarding/Vault/ManageSingleshard/ManageSingleshard.tsx b/src/renderer/pages/Onboarding/Vault/ManageSingleshard/ManageSingleshard.tsx index 0bad6583db..14acf1864c 100644 --- a/src/renderer/pages/Onboarding/Vault/ManageSingleshard/ManageSingleshard.tsx +++ b/src/renderer/pages/Onboarding/Vault/ManageSingleshard/ManageSingleshard.tsx @@ -3,13 +3,21 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; -import { useI18n } from '@app/providers'; -import { type Chain } from '@shared/core'; -import { AccountType, ChainType, CryptoType, CryptoTypeString, ErrorType, SigningType, WalletType } from '@shared/core'; -import { Button, HeaderTitleText, IconButton, Input, InputHint, SmallTitleText } from '@shared/ui'; -import { networkModel, networkUtils } from '@entities/network'; -import { type SeedInfo } from '@entities/transaction'; -import { AccountsList, walletModel } from '@entities/wallet'; +import { type Chain } from '@/shared/core'; +import { + AccountType, + ChainType, + CryptoType, + CryptoTypeString, + ErrorType, + SigningType, + WalletType, +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Button, HeaderTitleText, IconButton, Input, InputHint, SmallTitleText } from '@/shared/ui'; +import { networkModel, networkUtils } from '@/entities/network'; +import { type SeedInfo } from '@/entities/transaction'; +import { AccountsList, walletModel } from '@/entities/wallet'; type WalletForm = { walletName: string; diff --git a/src/renderer/pages/Onboarding/Vault/ManageVault/ManageVault.tsx b/src/renderer/pages/Onboarding/Vault/ManageVault/ManageVault.tsx index 03940e79db..7e8188281d 100644 --- a/src/renderer/pages/Onboarding/Vault/ManageVault/ManageVault.tsx +++ b/src/renderer/pages/Onboarding/Vault/ManageVault/ManageVault.tsx @@ -4,8 +4,8 @@ import { useUnit } from 'effector-react'; import { type FormEvent, useEffect, useRef, useState } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n, useStatusContext } from '@app/providers'; -import { chainsService } from '@shared/api/network'; +import { useStatusContext } from '@/app/providers'; +import { chainsService } from '@/shared/api/network'; import { AccountType, type ChainAccount, @@ -16,9 +16,10 @@ import { type ShardAccount, SigningType, WalletType, -} from '@shared/core'; -import { useAltOrCtrlKeyPressed, useToggle } from '@shared/lib/hooks'; -import { IS_MAC, copyToClipboard, dictionary, toAddress } from '@shared/lib/utils'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useAltOrCtrlKeyPressed, useToggle } from '@/shared/lib/hooks'; +import { IS_MAC, copyToClipboard, dictionary, toAddress } from '@/shared/lib/utils'; import { Accordion, Button, @@ -31,12 +32,12 @@ import { Input, InputHint, SmallTitleText, -} from '@shared/ui'; -import { Animation } from '@shared/ui/Animation/Animation'; -import { ChainTitle } from '@entities/chain'; -import { type SeedInfo } from '@entities/transaction'; -import { DerivedAccount, RootAccountLg, accountUtils } from '@entities/wallet'; -import { DerivationsAddressModal, ImportKeysModal, KeyConstructor } from '@features/wallets'; +} from '@/shared/ui'; +import { Animation } from '@/shared/ui/Animation/Animation'; +import { ChainTitle } from '@/entities/chain'; +import { type SeedInfo } from '@/entities/transaction'; +import { DerivedAccount, RootAccountLg, accountUtils } from '@/entities/wallet'; +import { DerivationsAddressModal, ImportKeysModal, KeyConstructor } from '@/features/wallets'; import { VaultInfoPopover } from './VaultInfoPopover'; import { manageVaultModel } from './model/manage-vault-model'; diff --git a/src/renderer/pages/Onboarding/Vault/ManageVault/VaultInfoPopover.tsx b/src/renderer/pages/Onboarding/Vault/ManageVault/VaultInfoPopover.tsx index 6aabbbd8f4..6337853fa3 100644 --- a/src/renderer/pages/Onboarding/Vault/ManageVault/VaultInfoPopover.tsx +++ b/src/renderer/pages/Onboarding/Vault/ManageVault/VaultInfoPopover.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { FootnoteText, Icon, Popover, SmallTitleText } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, Icon, Popover, SmallTitleText } from '@/shared/ui'; export const VaultInfoPopover = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/Onboarding/Vault/ManageVault/model/__tests__/manage-vault-model.test.ts b/src/renderer/pages/Onboarding/Vault/ManageVault/model/__tests__/manage-vault-model.test.ts index 6f3debd09e..402962e790 100644 --- a/src/renderer/pages/Onboarding/Vault/ManageVault/model/__tests__/manage-vault-model.test.ts +++ b/src/renderer/pages/Onboarding/Vault/ManageVault/model/__tests__/manage-vault-model.test.ts @@ -1,10 +1,10 @@ import { hexToU8a } from '@polkadot/util'; import { allSettled, fork } from 'effector'; -import { AccountType, type ChainAccount, ChainType, CryptoType, KeyType } from '@shared/core'; -import { TEST_HASH } from '@shared/lib/utils'; -import { networkModel } from '@entities/network'; -import { type SeedInfo } from '@entities/transaction'; +import { AccountType, type ChainAccount, ChainType, CryptoType, KeyType } from '@/shared/core'; +import { TEST_HASH } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; +import { type SeedInfo } from '@/entities/transaction'; import { manageVaultModel } from '../manage-vault-model'; describe('pages/Onboarding/Vault/ManageVault/model/manage-vault-model', () => { diff --git a/src/renderer/pages/Onboarding/Vault/ManageVault/model/manage-vault-model.ts b/src/renderer/pages/Onboarding/Vault/ManageVault/model/manage-vault-model.ts index ef5cad601a..27945b0214 100644 --- a/src/renderer/pages/Onboarding/Vault/ManageVault/model/manage-vault-model.ts +++ b/src/renderer/pages/Onboarding/Vault/ManageVault/model/manage-vault-model.ts @@ -1,7 +1,7 @@ import { attach, combine, createApi, createEffect, createEvent, createStore, sample } from 'effector'; import { createForm } from 'effector-forms'; -import { storageService } from '@shared/api/storage'; +import { storageService } from '@/shared/api/storage'; import { type BaseAccount, type ChainAccount, @@ -9,13 +9,13 @@ import { type NoID, type ShardAccount, type Wallet, -} from '@shared/core'; -import { AccountType, ChainType, CryptoType, KeyType } from '@shared/core'; -import { dictionary } from '@shared/lib/utils'; -import { networkModel, networkUtils } from '@entities/network'; -import { type SeedInfo } from '@entities/transaction'; -import { KEY_NAMES, accountUtils, walletModel } from '@entities/wallet'; -import { walletSelectModel } from '@features/wallets'; +} from '@/shared/core'; +import { AccountType, ChainType, CryptoType, KeyType } from '@/shared/core'; +import { dictionary } from '@/shared/lib/utils'; +import { networkModel, networkUtils } from '@/entities/network'; +import { type SeedInfo } from '@/entities/transaction'; +import { KEY_NAMES, accountUtils, walletModel } from '@/entities/wallet'; +import { walletSelectModel } from '@/features/wallets'; const WALLET_NAME_MAX_LENGTH = 256; diff --git a/src/renderer/pages/Onboarding/Vault/ScanStep/ScanStep.tsx b/src/renderer/pages/Onboarding/Vault/ScanStep/ScanStep.tsx index f56f15bcd5..dbff2d209a 100644 --- a/src/renderer/pages/Onboarding/Vault/ScanStep/ScanStep.tsx +++ b/src/renderer/pages/Onboarding/Vault/ScanStep/ScanStep.tsx @@ -1,8 +1,8 @@ -import { useI18n } from '@app/providers'; -import onboarding_tutorial from '@shared/assets/video/onboarding_tutorial.mp4'; -import onboarding_tutorial_webm from '@shared/assets/video/onboarding_tutorial.webm'; -import { Button, HeaderTitleText, SmallTitleText } from '@shared/ui'; -import { type SeedInfo } from '@entities/transaction'; +import onboarding_tutorial from '@/shared/assets/video/onboarding_tutorial.mp4'; +import onboarding_tutorial_webm from '@/shared/assets/video/onboarding_tutorial.webm'; +import { useI18n } from '@/shared/i18n'; +import { Button, HeaderTitleText, SmallTitleText } from '@/shared/ui'; +import { type SeedInfo } from '@/entities/transaction'; import KeyQrReader from '../KeyQrReader/KeyQrReader'; type Props = { diff --git a/src/renderer/pages/Onboarding/Vault/Vault.tsx b/src/renderer/pages/Onboarding/Vault/Vault.tsx index 99632fbc9e..b4cb70ce8a 100644 --- a/src/renderer/pages/Onboarding/Vault/Vault.tsx +++ b/src/renderer/pages/Onboarding/Vault/Vault.tsx @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react'; -import { useToggle } from '@shared/lib/hooks'; -import { DEFAULT_TRANSITION } from '@shared/lib/utils'; -import { BaseModal } from '@shared/ui'; -import { type SeedInfo, VaultFeatures } from '@entities/transaction'; +import { useToggle } from '@/shared/lib/hooks'; +import { DEFAULT_TRANSITION } from '@/shared/lib/utils'; +import { BaseModal } from '@/shared/ui'; +import { type SeedInfo, VaultFeatures } from '@/entities/transaction'; import { ManageMultishard } from './ManageMultishard/ManageMultishard'; import { ManageSingleshard } from './ManageSingleshard/ManageSingleshard'; diff --git a/src/renderer/pages/Onboarding/WalletConnect/ManageStep.tsx b/src/renderer/pages/Onboarding/WalletConnect/ManageStep.tsx index 77e5947d58..0c119af91a 100644 --- a/src/renderer/pages/Onboarding/WalletConnect/ManageStep.tsx +++ b/src/renderer/pages/Onboarding/WalletConnect/ManageStep.tsx @@ -1,8 +1,8 @@ import { useEffect, useState } from 'react'; import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; -import { useI18n, useStatusContext } from '@app/providers'; -import { chainsService } from '@shared/api/network'; +import { useStatusContext } from '@/app/providers'; +import { chainsService } from '@/shared/api/network'; import { type AccountId, AccountType, @@ -13,11 +13,12 @@ import { SigningType, WalletType, type WcAccount, -} from '@shared/core'; -import { toAccountId } from '@shared/lib/utils'; -import { Button, HeaderTitleText, Icon, Input, InputHint, SmallTitleText } from '@shared/ui'; -import { type IconNames } from '@shared/ui/Icon/data'; -import { MultiAccountsList, walletModel } from '@entities/wallet'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { toAccountId } from '@/shared/lib/utils'; +import { Button, HeaderTitleText, Icon, Input, InputHint, SmallTitleText } from '@/shared/ui'; +import { type IconNames } from '@/shared/ui/Icon/data'; +import { MultiAccountsList, walletModel } from '@/entities/wallet'; const WalletLogo: Record = { [WalletType.WALLET_CONNECT]: 'walletConnectOnboarding', diff --git a/src/renderer/pages/Onboarding/WalletConnect/NovaWallet.tsx b/src/renderer/pages/Onboarding/WalletConnect/NovaWallet.tsx index dcaab14405..449cf193ed 100644 --- a/src/renderer/pages/Onboarding/WalletConnect/NovaWallet.tsx +++ b/src/renderer/pages/Onboarding/WalletConnect/NovaWallet.tsx @@ -2,17 +2,17 @@ import { useUnit } from 'effector-react'; import QRCodeStyling from 'qr-code-styling'; import { useEffect, useRef, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { useStatusContext } from '@app/providers/context/StatusContext'; -import { chainsService } from '@shared/api/network'; -import novawallet_onboarding_tutorial from '@shared/assets/video/novawallet_onboarding_tutorial.mp4'; -import novawallet_onboarding_tutorial_webm from '@shared/assets/video/novawallet_onboarding_tutorial.webm'; -import { WalletType } from '@shared/core'; -import { usePrevious } from '@shared/lib/hooks'; -import { BaseModal, Button, HeaderTitleText, Loader, SmallTitleText } from '@shared/ui'; -import { Animation } from '@shared/ui/Animation/Animation'; -import { walletConnectModel, walletConnectUtils } from '@entities/walletConnect'; -import { wcOnboardingModel } from '@pages/Onboarding/WalletConnect/model/wc-onboarding-model'; +import { useStatusContext } from '@/app/providers'; +import { chainsService } from '@/shared/api/network'; +import novawallet_onboarding_tutorial from '@/shared/assets/video/novawallet_onboarding_tutorial.mp4'; +import novawallet_onboarding_tutorial_webm from '@/shared/assets/video/novawallet_onboarding_tutorial.webm'; +import { WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { usePrevious } from '@/shared/lib/hooks'; +import { BaseModal, Button, HeaderTitleText, Loader, SmallTitleText } from '@/shared/ui'; +import { Animation } from '@/shared/ui/Animation/Animation'; +import { walletConnectModel, walletConnectUtils } from '@/entities/walletConnect'; +import { wcOnboardingModel } from '@/pages/Onboarding/WalletConnect/model/wc-onboarding-model'; import { ManageStep } from './ManageStep'; import { EXPIRE_TIMEOUT, NWQRConfig, Step } from './lib/constants'; diff --git a/src/renderer/pages/Onboarding/WalletConnect/WalletConnect.tsx b/src/renderer/pages/Onboarding/WalletConnect/WalletConnect.tsx index d609a837b9..1cc5ebe21a 100644 --- a/src/renderer/pages/Onboarding/WalletConnect/WalletConnect.tsx +++ b/src/renderer/pages/Onboarding/WalletConnect/WalletConnect.tsx @@ -2,17 +2,17 @@ import { useUnit } from 'effector-react'; import QRCodeStyling from 'qr-code-styling'; import { useEffect, useRef, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { useStatusContext } from '@app/providers/context/StatusContext'; -import { chainsService } from '@shared/api/network'; -import novawallet_onboarding_tutorial from '@shared/assets/video/novawallet_onboarding_tutorial.mp4'; -import novawallet_onboarding_tutorial_webm from '@shared/assets/video/novawallet_onboarding_tutorial.webm'; -import { WalletType } from '@shared/core'; -import { usePrevious } from '@shared/lib/hooks'; -import { BaseModal, Button, HeaderTitleText, Loader, SmallTitleText } from '@shared/ui'; -import { Animation } from '@shared/ui/Animation/Animation'; -import { walletConnectModel, walletConnectUtils } from '@entities/walletConnect'; -import { wcOnboardingModel } from '@pages/Onboarding/WalletConnect/model/wc-onboarding-model'; +import { useStatusContext } from '@/app/providers'; +import { chainsService } from '@/shared/api/network'; +import novawallet_onboarding_tutorial from '@/shared/assets/video/novawallet_onboarding_tutorial.mp4'; +import novawallet_onboarding_tutorial_webm from '@/shared/assets/video/novawallet_onboarding_tutorial.webm'; +import { WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { usePrevious } from '@/shared/lib/hooks'; +import { BaseModal, Button, HeaderTitleText, Loader, SmallTitleText } from '@/shared/ui'; +import { Animation } from '@/shared/ui/Animation/Animation'; +import { walletConnectModel, walletConnectUtils } from '@/entities/walletConnect'; +import { wcOnboardingModel } from '@/pages/Onboarding/WalletConnect/model/wc-onboarding-model'; import { ManageStep } from './ManageStep'; import { EXPIRE_TIMEOUT, Step, WCQRConfig } from './lib/constants'; diff --git a/src/renderer/pages/Onboarding/WalletConnect/lib/constants.ts b/src/renderer/pages/Onboarding/WalletConnect/lib/constants.ts index 55d71732a9..e71fc9bf55 100644 --- a/src/renderer/pages/Onboarding/WalletConnect/lib/constants.ts +++ b/src/renderer/pages/Onboarding/WalletConnect/lib/constants.ts @@ -1,6 +1,6 @@ import { type Options } from 'qr-code-styling'; -import WalletTypeImages from '@shared/ui/Icon/data/walletType'; +import WalletTypeImages from '@/shared/ui/Icon/data/walletType'; export const enum Step { CLOSED, diff --git a/src/renderer/pages/Onboarding/WalletConnect/model/wc-onboarding-model.ts b/src/renderer/pages/Onboarding/WalletConnect/model/wc-onboarding-model.ts index 3d578127ee..fa2bdbd45e 100644 --- a/src/renderer/pages/Onboarding/WalletConnect/model/wc-onboarding-model.ts +++ b/src/renderer/pages/Onboarding/WalletConnect/model/wc-onboarding-model.ts @@ -1,6 +1,6 @@ import { createEvent, createStore, sample } from 'effector'; -import { walletConnectModel } from '@entities/walletConnect'; +import { walletConnectModel } from '@/entities/walletConnect'; import { Step } from '../lib/constants'; const $step = createStore(Step.CLOSED).reset([walletConnectModel.events.disconnectCurrentSessionStarted]); diff --git a/src/renderer/pages/Onboarding/WatchOnly/EmptyState.tsx b/src/renderer/pages/Onboarding/WatchOnly/EmptyState.tsx index 50e5743d63..31c3043c59 100644 --- a/src/renderer/pages/Onboarding/WatchOnly/EmptyState.tsx +++ b/src/renderer/pages/Onboarding/WatchOnly/EmptyState.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { BodyText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; export const EmptyState = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/Onboarding/WatchOnly/WatchOnly.tsx b/src/renderer/pages/Onboarding/WatchOnly/WatchOnly.tsx index 0b4bf9fa6c..da9c73a802 100644 --- a/src/renderer/pages/Onboarding/WatchOnly/WatchOnly.tsx +++ b/src/renderer/pages/Onboarding/WatchOnly/WatchOnly.tsx @@ -2,11 +2,11 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; -import { useI18n } from '@app/providers'; -import { type AccountId, type Chain } from '@shared/core'; -import { AccountType, ChainType, CryptoType, ErrorType, SigningType, WalletType } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { DEFAULT_TRANSITION, isEthereumAccountId, toAccountId, validateAddress } from '@shared/lib/utils'; +import { type AccountId, type Chain } from '@/shared/core'; +import { AccountType, ChainType, CryptoType, ErrorType, SigningType, WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { DEFAULT_TRANSITION, isEthereumAccountId, toAccountId, validateAddress } from '@/shared/lib/utils'; import { BaseModal, Button, @@ -17,9 +17,9 @@ import { Input, InputHint, SmallTitleText, -} from '@shared/ui'; -import { networkModel, networkUtils } from '@entities/network'; -import { AccountsList, walletModel } from '@entities/wallet'; +} from '@/shared/ui'; +import { networkModel, networkUtils } from '@/entities/network'; +import { AccountsList, walletModel } from '@/entities/wallet'; import { EmptyState } from './EmptyState'; diff --git a/src/renderer/pages/Onboarding/Welcome/PrivacyPolicy.tsx b/src/renderer/pages/Onboarding/Welcome/PrivacyPolicy.tsx index 2ab76572e4..92953b710f 100644 --- a/src/renderer/pages/Onboarding/Welcome/PrivacyPolicy.tsx +++ b/src/renderer/pages/Onboarding/Welcome/PrivacyPolicy.tsx @@ -1,7 +1,7 @@ import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { FootnoteText, InfoLink } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { FootnoteText, InfoLink } from '@/shared/ui'; const TERMS_AND_CONDITIONS = 'https://novaspektr.io/terms'; const PRIVACY_POLICY = 'https://novaspektr.io/privacy'; diff --git a/src/renderer/pages/Onboarding/Welcome/Welcome.tsx b/src/renderer/pages/Onboarding/Welcome/Welcome.tsx index f5af9e2d75..8c227c7263 100644 --- a/src/renderer/pages/Onboarding/Welcome/Welcome.tsx +++ b/src/renderer/pages/Onboarding/Welcome/Welcome.tsx @@ -1,11 +1,11 @@ import throttle from 'lodash/throttle'; import { useLayoutEffect, useRef, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { WalletType } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Icon, TitleText } from '@shared/ui'; -import { walletPairingModel } from '@features/wallets'; +import { WalletType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Icon, TitleText } from '@/shared/ui'; +import { walletPairingModel } from '@/features/wallets'; import PrivacyPolicy from './PrivacyPolicy'; import { WelcomeCard } from './WelcomeCard'; diff --git a/src/renderer/pages/Onboarding/Welcome/WelcomeCard.tsx b/src/renderer/pages/Onboarding/Welcome/WelcomeCard.tsx index 7b4a90ebbd..dc365907d5 100644 --- a/src/renderer/pages/Onboarding/Welcome/WelcomeCard.tsx +++ b/src/renderer/pages/Onboarding/Welcome/WelcomeCard.tsx @@ -1,7 +1,7 @@ -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { BodyText, CaptionText, FootnoteText, Icon } from '@shared/ui'; -import { type IconNames } from '@shared/ui/Icon/data'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BodyText, CaptionText, FootnoteText, Icon } from '@/shared/ui'; +import { type IconNames } from '@/shared/ui/Icon/data'; type Props = { title: string; diff --git a/src/renderer/pages/Operations/Operations.test.tsx b/src/renderer/pages/Operations/Operations.test.tsx index b6de67c49e..1a48e0ca26 100644 --- a/src/renderer/pages/Operations/Operations.test.tsx +++ b/src/renderer/pages/Operations/Operations.test.tsx @@ -2,18 +2,18 @@ import { act, render, screen } from '@testing-library/react'; import { fork } from 'effector'; import { Provider } from 'effector-react'; -import { TEST_ACCOUNTS } from '@shared/lib/utils'; -import { networkModel } from '@entities/network'; +import { TEST_ACCOUNTS } from '@/shared/lib/utils'; +import { networkModel } from '@/entities/network'; import { Operations } from './Operations'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), })); -jest.mock('@entities/multisig', () => ({ +jest.mock('@/entities/multisig', () => ({ useMultisigTx: jest.fn().mockReturnValue({ getLiveAccountMultisigTxs: () => [{ name: 'Test Wallet', accountId: TEST_ACCOUNTS[0], chainId: '0x00' }], }), @@ -23,7 +23,7 @@ jest.mock('@entities/multisig', () => ({ })); jest.mock('./components/Operation', () => () => 'Operation'); -jest.mock('@features/operations', () => ({ +jest.mock('@/features/operations', () => ({ OperationsFilter: () => 'filter', })); diff --git a/src/renderer/pages/Operations/Operations.tsx b/src/renderer/pages/Operations/Operations.tsx index 2f637cdff4..65b718b241 100644 --- a/src/renderer/pages/Operations/Operations.tsx +++ b/src/renderer/pages/Operations/Operations.tsx @@ -2,16 +2,16 @@ import { useUnit } from 'effector-react'; import groupBy from 'lodash/groupBy'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type MultisigTransactionDS } from '@shared/api/storage'; -import { type MultisigEvent, type MultisigTransactionKey } from '@shared/core'; -import { sortByDateDesc } from '@shared/lib/utils'; -import { FootnoteText, Header } from '@shared/ui'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; +import { type MultisigEvent, type MultisigTransactionKey } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { sortByDateDesc } from '@/shared/lib/utils'; +import { FootnoteText, Header } from '@/shared/ui'; +import { networkModel } from '@/entities/network'; import { operationsModel } from '@/entities/operations'; -import { networkModel } from '@entities/network'; -import { priceProviderModel } from '@entities/price'; -import { accountUtils, walletModel } from '@entities/wallet'; -import { OperationsFilter } from '@features/operations'; +import { priceProviderModel } from '@/entities/price'; +import { accountUtils, walletModel } from '@/entities/wallet'; +import { OperationsFilter } from '@/features/operations'; import EmptyOperations from './components/EmptyState/EmptyOperations'; import Operation from './components/Operation'; diff --git a/src/renderer/pages/Operations/common/utils.ts b/src/renderer/pages/Operations/common/utils.ts index 421e77b294..a7ee25f6a3 100644 --- a/src/renderer/pages/Operations/common/utils.ts +++ b/src/renderer/pages/Operations/common/utils.ts @@ -1,7 +1,6 @@ import { type ApiPromise } from '@polkadot/api'; import { BN } from '@polkadot/util'; -import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; import { type Account, type AccountId, @@ -19,11 +18,12 @@ import { type Transaction, TransactionType, type Wallet, -} from '@shared/core'; -import { toAddress } from '@shared/lib/utils'; +} from '@/shared/core'; +import { toAddress } from '@/shared/lib/utils'; +import { convictionVotingPallet } from '@/shared/pallet/convictionVoting'; import { type TransactionVote, votingService } from '@/entities/governance'; -import { isDelegateTransaction, isProxyTransaction, isUndelegateTransaction } from '@entities/transaction'; -import { accountUtils, walletUtils } from '@entities/wallet'; +import { isDelegateTransaction, isProxyTransaction, isUndelegateTransaction } from '@/entities/transaction'; +import { accountUtils, walletUtils } from '@/entities/wallet'; export const getMultisigExtrinsicLink = ( callHash?: HexString, diff --git a/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx b/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx index 13d86f8c52..1f36b39b47 100644 --- a/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx +++ b/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx @@ -1,19 +1,25 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type Account, type MultisigAccount, type MultisigTransaction, type Transaction } from '@shared/core'; -import { getAssetById } from '@shared/lib/utils'; -import { DetailRow, FootnoteText, Icon } from '@shared/ui'; -import { getTransactionFromMultisigTx } from '@entities/multisig'; -import { type ExtendedChain } from '@entities/network'; -import { SignButton } from '@entities/operations'; -import { priceProviderModel } from '@entities/price'; -import { Fee, FeeLoader, MultisigDepositWithLabel, XcmFee, isXcmTransaction } from '@entities/transaction'; -import { getIconName } from '@entities/transaction/lib/transactionConfirmIcon'; -import { walletModel } from '@entities/wallet'; -import { xcmTransferModel } from '@widgets/Transfer'; -import { TransactionAmount } from '@pages/Operations/components/TransactionAmount'; +import { type Account, type MultisigAccount, type MultisigTransaction, type Transaction } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { getAssetById } from '@/shared/lib/utils'; +import { DetailRow, FootnoteText, Icon } from '@/shared/ui'; +import { getTransactionFromMultisigTx } from '@/entities/multisig'; +import { type ExtendedChain } from '@/entities/network'; +import { SignButton } from '@/entities/operations'; +import { priceProviderModel } from '@/entities/price'; +import { + Fee, + FeeLoader, + MultisigDepositWithLabel, + XcmFee, + getIconName, + isXcmTransaction, +} from '@/entities/transaction'; +import { walletModel } from '@/entities/wallet'; +import { xcmTransferModel } from '@/widgets/Transfer'; +import { TransactionAmount } from '@/pages/Operations/components/TransactionAmount'; import { Details } from '../Details'; type Props = { diff --git a/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx b/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx index 9943e6d969..eb779b40ad 100644 --- a/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx +++ b/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { type ComponentProps, useEffect, useState } from 'react'; -import { useI18n, useMultisigChainContext } from '@app/providers'; +import { useMultisigChainContext } from '@/app/providers'; import { type Account, type HexString, @@ -9,13 +9,14 @@ import { type MultisigTransaction, type SigningStatus, type Transaction, -} from '@shared/core'; -import { MultisigTxFinalStatus, TransactionType } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { Button, StatusModal } from '@shared/ui'; -import { Animation } from '@shared/ui/Animation/Animation'; -import { useMultisigEvent, useMultisigTx } from '@entities/multisig'; -import { type ExtrinsicResultParams, transactionService } from '@entities/transaction'; +} from '@/shared/core'; +import { MultisigTxFinalStatus, TransactionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { Button, StatusModal } from '@/shared/ui'; +import { Animation } from '@/shared/ui/Animation/Animation'; +import { useMultisigEvent, useMultisigTx } from '@/entities/multisig'; +import { type ExtrinsicResultParams, transactionService } from '@/entities/transaction'; type ResultProps = Pick, 'title' | 'content' | 'description'>; diff --git a/src/renderer/pages/Operations/components/Details.tsx b/src/renderer/pages/Operations/components/Details.tsx index 14ec2b00c7..b58af77fe5 100644 --- a/src/renderer/pages/Operations/components/Details.tsx +++ b/src/renderer/pages/Operations/components/Details.tsx @@ -2,8 +2,6 @@ import { useUnit } from 'effector-react'; import { useEffect, useMemo, useState } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { Skeleton } from '@/shared/ui-kit'; import { type Account, type Address, @@ -12,17 +10,19 @@ import { type Transaction, type Validator, type Wallet, -} from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { cnTw, toAccountId } from '@shared/lib/utils'; -import { CaptionText, DetailRow, FootnoteText, Icon } from '@shared/ui'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw, toAccountId } from '@/shared/lib/utils'; +import { CaptionText, DetailRow, FootnoteText, Icon } from '@/shared/ui'; +import { Skeleton } from '@/shared/ui-kit'; import { AssetBalance } from '@/entities/asset'; +import { ChainTitle } from '@/entities/chain'; import { TracksDetails, voteTransactionService } from '@/entities/governance'; -import { ChainTitle } from '@entities/chain'; -import { getTransactionFromMultisigTx } from '@entities/multisig'; -import { type ExtendedChain, networkModel, networkUtils } from '@entities/network'; -import { proxyUtils } from '@entities/proxy'; -import { SelectedValidatorsModal, useValidatorsMap } from '@entities/staking'; +import { getTransactionFromMultisigTx } from '@/entities/multisig'; +import { type ExtendedChain, networkModel, networkUtils } from '@/entities/network'; +import { proxyUtils } from '@/entities/proxy'; +import { SelectedValidatorsModal, useValidatorsMap } from '@/entities/staking'; import { isAddProxyTransaction, isManageProxyTransaction, @@ -32,8 +32,8 @@ import { isTransferTransaction, isUndelegateTransaction, isXcmTransaction, -} from '@entities/transaction'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, walletModel } from '@entities/wallet'; +} from '@/entities/transaction'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, walletModel } from '@/entities/wallet'; import { AddressStyle, DescriptionBlockStyle, InteractionStyle } from '../common/constants'; import { getDelegate, diff --git a/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.test.tsx b/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.test.tsx index 003cba3c8e..9b56c328db 100644 --- a/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.test.tsx +++ b/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import EmptyOperations from './EmptyOperations'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.tsx b/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.tsx index 2f8a66df28..67f3483659 100644 --- a/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.tsx +++ b/src/renderer/pages/Operations/components/EmptyState/EmptyOperations.tsx @@ -1,6 +1,6 @@ -import { useI18n } from '@app/providers'; -import { type MultisigAccount } from '@shared/core'; -import { BodyText, Icon } from '@shared/ui'; +import { type MultisigAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { BodyText, Icon } from '@/shared/ui'; type Props = { multisigAccount?: MultisigAccount; diff --git a/src/renderer/pages/Operations/components/LogModal.tsx b/src/renderer/pages/Operations/components/LogModal.tsx index d310c910c2..f5c5cc3f36 100644 --- a/src/renderer/pages/Operations/components/LogModal.tsx +++ b/src/renderer/pages/Operations/components/LogModal.tsx @@ -1,9 +1,8 @@ import { useUnit } from 'effector-react'; import groupBy from 'lodash/groupBy'; -import { useI18n } from '@app/providers'; -import { chainsService } from '@shared/api/network'; -import { type MultisigTransactionDS } from '@shared/api/storage'; +import { chainsService } from '@/shared/api/network'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; import { type Account, type AccountId, @@ -13,14 +12,15 @@ import { type SigningStatus, type Wallet, type WalletsMap, -} from '@shared/core'; -import { SS58_DEFAULT_PREFIX, getAssetById, getExtrinsicExplorer, sortByDateAsc, toAddress } from '@shared/lib/utils'; -import { BaseModal, BodyText, ContextMenu, ExplorerLink, FootnoteText, IconButton, Identicon } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { useMultisigEvent } from '@entities/multisig'; -import { type ExtendedChain } from '@entities/network'; -import { TransactionTitle, getTransactionAmount } from '@entities/transaction'; -import { WalletIcon, walletModel, walletUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { SS58_DEFAULT_PREFIX, getAssetById, getExtrinsicExplorer, sortByDateAsc, toAddress } from '@/shared/lib/utils'; +import { BaseModal, BodyText, ContextMenu, ExplorerLink, FootnoteText, IconButton, Identicon } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { useMultisigEvent } from '@/entities/multisig'; +import { type ExtendedChain } from '@/entities/network'; +import { TransactionTitle, getTransactionAmount } from '@/entities/transaction'; +import { WalletIcon, walletModel, walletUtils } from '@/entities/wallet'; import { getSignatoryName } from '../common/utils'; import { Status } from './Status'; diff --git a/src/renderer/pages/Operations/components/Operation.tsx b/src/renderer/pages/Operations/components/Operation.tsx index 6de0e067d6..2c33bdd9d1 100644 --- a/src/renderer/pages/Operations/components/Operation.tsx +++ b/src/renderer/pages/Operations/components/Operation.tsx @@ -1,13 +1,13 @@ -import { useI18n } from '@app/providers'; -import { chainsService } from '@shared/api/network'; -import { type MultisigTransactionDS } from '@shared/api/storage'; -import { type MultisigAccount } from '@shared/core'; -import { getAssetById } from '@shared/lib/utils'; -import { Accordion, FootnoteText } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { ChainTitle, XcmChains } from '@entities/chain'; -import { useMultisigEvent } from '@entities/multisig'; -import { TransactionTitle, getTransactionAmount, isXcmTransaction } from '@entities/transaction'; +import { chainsService } from '@/shared/api/network'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; +import { type MultisigAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { getAssetById } from '@/shared/lib/utils'; +import { Accordion, FootnoteText } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { ChainTitle, XcmChains } from '@/entities/chain'; +import { useMultisigEvent } from '@/entities/multisig'; +import { TransactionTitle, getTransactionAmount, isXcmTransaction } from '@/entities/transaction'; import { OperationFullInfo } from './OperationFullInfo'; import { Status } from './Status'; diff --git a/src/renderer/pages/Operations/components/OperationCardDetails.tsx b/src/renderer/pages/Operations/components/OperationCardDetails.tsx index 9efbce9238..f4debc1dff 100644 --- a/src/renderer/pages/Operations/components/OperationCardDetails.tsx +++ b/src/renderer/pages/Operations/components/OperationCardDetails.tsx @@ -2,28 +2,28 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { Skeleton } from '@/shared/ui-kit'; -import { chainsService } from '@shared/api/network'; +import { chainsService } from '@/shared/api/network'; import { type Address, type MultisigAccount, type MultisigTransaction, type Transaction, type Validator, -} from '@shared/core'; -import { TransactionType } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { cnTw, copyToClipboard, getAssetById, truncate } from '@shared/lib/utils'; -import { Button, DetailRow, FootnoteText, Icon } from '@shared/ui'; +} from '@/shared/core'; +import { TransactionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { cnTw, copyToClipboard, getAssetById, truncate } from '@/shared/lib/utils'; +import { Button, DetailRow, FootnoteText, Icon } from '@/shared/ui'; +import { Skeleton } from '@/shared/ui-kit'; +import { AssetBalance } from '@/entities/asset'; +import { ChainTitle } from '@/entities/chain'; import { TracksDetails, voteTransactionService } from '@/entities/governance'; -import { AssetBalance } from '@entities/asset'; -import { ChainTitle } from '@entities/chain'; -import { getTransactionFromMultisigTx } from '@entities/multisig'; -import { type ExtendedChain, networkModel, networkUtils } from '@entities/network'; -import { proxyUtils } from '@entities/proxy'; -import { signatoryUtils } from '@entities/signatory'; -import { ValidatorsModal, useValidatorsMap } from '@entities/staking'; +import { getTransactionFromMultisigTx } from '@/entities/multisig'; +import { type ExtendedChain, networkModel, networkUtils } from '@/entities/network'; +import { proxyUtils } from '@/entities/proxy'; +import { signatoryUtils } from '@/entities/signatory'; +import { ValidatorsModal, useValidatorsMap } from '@/entities/staking'; import { isAddProxyTransaction, isManageProxyTransaction, @@ -31,8 +31,8 @@ import { isRemovePureProxyTransaction, isUndelegateTransaction, isXcmTransaction, -} from '@entities/transaction'; -import { AddressWithExplorers, ExplorersPopover, WalletCardSm, walletModel } from '@entities/wallet'; +} from '@/entities/transaction'; +import { AddressWithExplorers, ExplorersPopover, WalletCardSm, walletModel } from '@/entities/wallet'; import { AddressStyle, DescriptionBlockStyle, InteractionStyle } from '../common/constants'; import { getDelegate, diff --git a/src/renderer/pages/Operations/components/OperationFullInfo.tsx b/src/renderer/pages/Operations/components/OperationFullInfo.tsx index 39f7094762..7cb531862b 100644 --- a/src/renderer/pages/Operations/components/OperationFullInfo.tsx +++ b/src/renderer/pages/Operations/components/OperationFullInfo.tsx @@ -1,13 +1,14 @@ import { useUnit } from 'effector-react'; -import { useI18n, useMultisigChainContext } from '@app/providers'; -import { type MultisigTransactionDS } from '@shared/api/storage'; -import { type CallData, type MultisigAccount } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { Button, Icon, InfoLink, SmallTitleText } from '@shared/ui'; -import { useMultisigTx } from '@entities/multisig'; -import { useNetworkData } from '@entities/network'; -import { permissionUtils, walletModel } from '@entities/wallet'; +import { useMultisigChainContext } from '@/app/providers'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; +import { type CallData, type MultisigAccount } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { Button, Icon, InfoLink, SmallTitleText } from '@/shared/ui'; +import { useMultisigTx } from '@/entities/multisig'; +import { useNetworkData } from '@/entities/network'; +import { permissionUtils, walletModel } from '@/entities/wallet'; import { getMultisigExtrinsicLink } from '../common/utils'; import { OperationCardDetails } from './OperationCardDetails'; diff --git a/src/renderer/pages/Operations/components/OperationSignatories.tsx b/src/renderer/pages/Operations/components/OperationSignatories.tsx index 309a257450..7ebc47586a 100644 --- a/src/renderer/pages/Operations/components/OperationSignatories.tsx +++ b/src/renderer/pages/Operations/components/OperationSignatories.tsx @@ -1,7 +1,6 @@ import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; import { type AccountId, type MultisigAccount, @@ -10,16 +9,17 @@ import { type Signatory, type SigningStatus, type Wallet, -} from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { nonNullable } from '@shared/lib/utils'; -import { BodyText, Button, CaptionText, FootnoteText, Icon, SmallTitleText } from '@shared/ui'; -import { contactModel } from '@entities/contact'; -import { useMultisigEvent } from '@entities/multisig'; -import { type ExtendedChain } from '@entities/network'; -import { SignatoryCard, signatoryUtils } from '@entities/signatory'; -import { AddressWithName, WalletIcon, walletModel } from '@entities/wallet'; -import { getSignatoryName } from '@pages/Operations/common/utils'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { nonNullable } from '@/shared/lib/utils'; +import { BodyText, Button, CaptionText, FootnoteText, Icon, SmallTitleText } from '@/shared/ui'; +import { contactModel } from '@/entities/contact'; +import { useMultisigEvent } from '@/entities/multisig'; +import { type ExtendedChain } from '@/entities/network'; +import { SignatoryCard, signatoryUtils } from '@/entities/signatory'; +import { AddressWithName, WalletIcon, walletModel } from '@/entities/wallet'; +import { getSignatoryName } from '@/pages/Operations/common/utils'; import LogModal from './LogModal'; diff --git a/src/renderer/pages/Operations/components/Status.tsx b/src/renderer/pages/Operations/components/Status.tsx index 9928dcf109..dc35b48894 100644 --- a/src/renderer/pages/Operations/components/Status.tsx +++ b/src/renderer/pages/Operations/components/Status.tsx @@ -1,11 +1,11 @@ -import { useI18n } from '@app/providers'; import { type MultisigTransaction, MultisigTxFinalStatus, MultisigTxInitStatus, type MultisigTxStatus, -} from '@shared/core'; -import { OperationStatus } from '@shared/ui'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { OperationStatus } from '@/shared/ui'; const StatusTitle: Record = { [MultisigTxInitStatus.SIGNING]: 'operation.status.signing', diff --git a/src/renderer/pages/Operations/components/TransactionAmount.tsx b/src/renderer/pages/Operations/components/TransactionAmount.tsx index 9d6eacb951..38e0397d14 100644 --- a/src/renderer/pages/Operations/components/TransactionAmount.tsx +++ b/src/renderer/pages/Operations/components/TransactionAmount.tsx @@ -1,9 +1,9 @@ -import { chainsService } from '@shared/api/network'; -import { type DecodedTransaction, type Transaction } from '@shared/core'; -import { cnTw, getAssetById } from '@shared/lib/utils'; -import { AssetBalance } from '@entities/asset'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { getTransactionAmount } from '@entities/transaction'; +import { chainsService } from '@/shared/api/network'; +import { type DecodedTransaction, type Transaction } from '@/shared/core'; +import { cnTw, getAssetById } from '@/shared/lib/utils'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance } from '@/entities/price'; +import { getTransactionAmount } from '@/entities/transaction'; type Props = { tx: Transaction | DecodedTransaction; diff --git a/src/renderer/pages/Operations/components/modals/ApproveTx.tsx b/src/renderer/pages/Operations/components/modals/ApproveTx.tsx index abc1dc6782..3357a5fefa 100644 --- a/src/renderer/pages/Operations/components/modals/ApproveTx.tsx +++ b/src/renderer/pages/Operations/components/modals/ApproveTx.tsx @@ -3,8 +3,7 @@ import { BN } from '@polkadot/util'; import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type MultisigTransactionDS } from '@shared/api/storage'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; import { type Account, type Address, @@ -12,16 +11,17 @@ import { type MultisigAccount, type Timepoint, type Transaction, -} from '@shared/core'; -import { TransactionType } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { TEST_ADDRESS, getAssetById, toAddress, transferableAmount } from '@shared/lib/utils'; -import { BaseModal, Button } from '@shared/ui'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { OperationTitle } from '@entities/chain'; -import { useMultisigEvent } from '@entities/multisig'; -import { type ExtendedChain, networkModel } from '@entities/network'; -import { priceProviderModel } from '@entities/price'; +} from '@/shared/core'; +import { TransactionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { TEST_ADDRESS, getAssetById, toAddress, transferableAmount } from '@/shared/lib/utils'; +import { BaseModal, Button } from '@/shared/ui'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { OperationTitle } from '@/entities/chain'; +import { useMultisigEvent } from '@/entities/multisig'; +import { type ExtendedChain, networkModel } from '@/entities/network'; +import { priceProviderModel } from '@/entities/price'; import { MAX_WEIGHT, OperationResult, @@ -30,9 +30,9 @@ import { transactionService, useCallDataDecoder, validateBalance, -} from '@entities/transaction'; -import { permissionUtils, walletModel } from '@entities/wallet'; -import { SigningSwitch } from '@features/operations'; +} from '@/entities/transaction'; +import { permissionUtils, walletModel } from '@/entities/wallet'; +import { SigningSwitch } from '@/features/operations'; import { getSignatoryAccounts } from '../../common/utils'; import { Confirmation } from '../ActionSteps/Confirmation'; import { Submit } from '../ActionSteps/Submit'; diff --git a/src/renderer/pages/Operations/components/modals/CallDataModal.tsx b/src/renderer/pages/Operations/components/modals/CallDataModal.tsx index 95dff9e63d..8bf8d63432 100644 --- a/src/renderer/pages/Operations/components/modals/CallDataModal.tsx +++ b/src/renderer/pages/Operations/components/modals/CallDataModal.tsx @@ -1,10 +1,10 @@ import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; -import { useI18n } from '@app/providers'; -import { type MultisigTransactionDS } from '@shared/api/storage'; -import { type CallData } from '@shared/core'; -import { validateCallData } from '@shared/lib/utils'; -import { BaseModal, Button, InputArea, InputHint } from '@shared/ui'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; +import { type CallData } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { validateCallData } from '@/shared/lib/utils'; +import { BaseModal, Button, InputArea, InputHint } from '@/shared/ui'; type CallDataForm = { callData: string; diff --git a/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx b/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx index d8a1b9e7fb..b42df58e0b 100644 --- a/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx +++ b/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx @@ -1,7 +1,7 @@ import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; -import { useI18n } from '@app/providers'; -import { BaseModal, Button, InputArea, InputHint } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { BaseModal, Button, InputArea, InputHint } from '@/shared/ui'; type RejectReasonForm = { reason: string; diff --git a/src/renderer/pages/Operations/components/modals/RejectTx.tsx b/src/renderer/pages/Operations/components/modals/RejectTx.tsx index e86ce9305d..c0e198821a 100644 --- a/src/renderer/pages/Operations/components/modals/RejectTx.tsx +++ b/src/renderer/pages/Operations/components/modals/RejectTx.tsx @@ -2,8 +2,7 @@ import { BN } from '@polkadot/util'; import { useUnit } from 'effector-react'; import { useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { type MultisigTransactionDS } from '@shared/api/storage'; +import { type MultisigTransactionDS } from '@/shared/api/storage'; import { type Account, type Address, @@ -11,24 +10,25 @@ import { type MultisigAccount, type Timepoint, type Transaction, -} from '@shared/core'; -import { TransactionType } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { getAssetById, toAddress, transferableAmount } from '@shared/lib/utils'; -import { BaseModal, Button } from '@shared/ui'; -import { balanceModel, balanceUtils } from '@entities/balance'; -import { OperationTitle } from '@entities/chain'; -import { type ExtendedChain, networkModel } from '@entities/network'; -import { priceProviderModel } from '@entities/price'; +} from '@/shared/core'; +import { TransactionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { getAssetById, toAddress, transferableAmount } from '@/shared/lib/utils'; +import { BaseModal, Button } from '@/shared/ui'; +import { balanceModel, balanceUtils } from '@/entities/balance'; +import { OperationTitle } from '@/entities/chain'; +import { type ExtendedChain, networkModel } from '@/entities/network'; +import { priceProviderModel } from '@/entities/price'; import { OperationResult, getMultisigSignOperationTitle, isXcmTransaction, transactionService, validateBalance, -} from '@entities/transaction'; -import { walletModel, walletUtils } from '@entities/wallet'; -import { SigningSwitch } from '@features/operations'; +} from '@/entities/transaction'; +import { walletModel, walletUtils } from '@/entities/wallet'; +import { SigningSwitch } from '@/features/operations'; import { Confirmation } from '../ActionSteps/Confirmation'; import { Submit } from '../ActionSteps/Submit'; diff --git a/src/renderer/pages/Operations/components/modals/SignatorySelectModal.tsx b/src/renderer/pages/Operations/components/modals/SignatorySelectModal.tsx index 137dcf3f31..0bde3cf340 100644 --- a/src/renderer/pages/Operations/components/modals/SignatorySelectModal.tsx +++ b/src/renderer/pages/Operations/components/modals/SignatorySelectModal.tsx @@ -1,8 +1,8 @@ -import { useI18n } from '@app/providers'; -import { type Account, type Asset, type Chain } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { BaseModal } from '@shared/ui'; -import { SelectableSignatory } from '@entities/signatory'; +import { type Account, type Asset, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BaseModal } from '@/shared/ui'; +import { SelectableSignatory } from '@/entities/signatory'; type Props = { isOpen: boolean; diff --git a/src/renderer/pages/Operations/index.ts b/src/renderer/pages/Operations/index.ts new file mode 100644 index 0000000000..c40f4a660c --- /dev/null +++ b/src/renderer/pages/Operations/index.ts @@ -0,0 +1,2 @@ +export { Operations } from './Operations'; +export { SignatorySelectModal } from './components/modals/SignatorySelectModal'; diff --git a/src/renderer/pages/Settings/Currency/Currency.tsx b/src/renderer/pages/Settings/Currency/Currency.tsx index a4b0e10c40..5c6f832903 100644 --- a/src/renderer/pages/Settings/Currency/Currency.tsx +++ b/src/renderer/pages/Settings/Currency/Currency.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom'; -import { Paths } from '@shared/routes'; -import { CurrencyModal } from '@widgets/CurrencyModal'; +import { Paths } from '@/shared/routes'; +import { CurrencyModal } from '@/widgets/CurrencyModal'; export const Currency = () => { const navigate = useNavigate(); diff --git a/src/renderer/pages/Settings/Networks/lib/constants.ts b/src/renderer/pages/Settings/Networks/lib/constants.ts index 54ce4af1e5..c69f36a7db 100644 --- a/src/renderer/pages/Settings/Networks/lib/constants.ts +++ b/src/renderer/pages/Settings/Networks/lib/constants.ts @@ -1,4 +1,4 @@ -import { ConnectionType, type RpcNode } from '@shared/core'; +import { ConnectionType, type RpcNode } from '@/shared/core'; export const Predicates: Record< ConnectionType, diff --git a/src/renderer/pages/Settings/Networks/model/__tests__/networks-overview-model.test.ts b/src/renderer/pages/Settings/Networks/model/__tests__/networks-overview-model.test.ts index 72ccbf2337..a421e078aa 100644 --- a/src/renderer/pages/Settings/Networks/model/__tests__/networks-overview-model.test.ts +++ b/src/renderer/pages/Settings/Networks/model/__tests__/networks-overview-model.test.ts @@ -1,8 +1,8 @@ import { allSettled, fork } from 'effector'; -import { ConnectionStatus, ConnectionType } from '@shared/core'; -import { networkModel } from '@entities/network'; -import { activeNetworksModel, inactiveNetworksModel, networkSelectorUtils } from '@features/network'; +import { ConnectionStatus, ConnectionType } from '@/shared/core'; +import { networkModel } from '@/entities/network'; +import { activeNetworksModel, inactiveNetworksModel, networkSelectorUtils } from '@/features/network'; import { networksOverviewModel } from '../networks-overview-model'; const chains = [ diff --git a/src/renderer/pages/Settings/Networks/model/networks-overview-model.ts b/src/renderer/pages/Settings/Networks/model/networks-overview-model.ts index d74072a9a9..25a83d537e 100644 --- a/src/renderer/pages/Settings/Networks/model/networks-overview-model.ts +++ b/src/renderer/pages/Settings/Networks/model/networks-overview-model.ts @@ -1,17 +1,18 @@ import { combine, sample } from 'effector'; -import { type ChainId } from '@shared/core'; -import { networkModel, networkUtils } from '@entities/network'; +import { type ChainId } from '@/shared/core'; +import { networkModel, networkUtils } from '@/entities/network'; import { + type ConnectionItem, activeNetworksModel, addCustomRpcModel, editCustomRpcModel, inactiveNetworksModel, + networkSelectorModel, networkSelectorUtils, networksFilterModel, -} from '@features/network'; -import { removeCustomRpcModel } from '@features/network/ManageCustomRpcNode'; -import { type ConnectionItem, networkSelectorModel } from '@features/network/NetworkSelector'; + removeCustomRpcModel, +} from '@/features/network'; import { Predicates } from '../lib/constants'; type ConnectionMap = { diff --git a/src/renderer/pages/Settings/Networks/ui/Networks.tsx b/src/renderer/pages/Settings/Networks/ui/Networks.tsx index f61259c5f9..b05b84ed42 100644 --- a/src/renderer/pages/Settings/Networks/ui/Networks.tsx +++ b/src/renderer/pages/Settings/Networks/ui/Networks.tsx @@ -2,13 +2,14 @@ import { useUnit } from 'effector-react'; import { Trans } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; -import { useConfirmContext, useI18n } from '@app/providers'; -import { type ChainId, type RpcNode } from '@shared/core'; -import { ConnectionType } from '@shared/core'; -import { useModalClose } from '@shared/lib/hooks'; -import { Paths } from '@shared/routes'; -import { BaseModal, InfoLink } from '@shared/ui'; -import { type ExtendedChain, networkModel, networkUtils } from '@entities/network'; +import { type ChainId, type RpcNode } from '@/shared/core'; +import { ConnectionType } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useModalClose } from '@/shared/lib/hooks'; +import { useConfirmContext } from '@/shared/providers'; +import { Paths } from '@/shared/routes'; +import { BaseModal, InfoLink } from '@/shared/ui'; +import { type ExtendedChain, networkModel, networkUtils } from '@/entities/network'; import { ActiveNetwork, AddCustomRpcModal, @@ -18,6 +19,7 @@ import { NetworkList, NetworkSelector, NetworksFilter, + type SelectorPayload, activeNetworksModel, addCustomRpcModel, editCustomRpcModel, @@ -25,8 +27,7 @@ import { networkSelectorModel, networksFilterModel, removeCustomRpcModel, -} from '@features/network'; -import { type SelectorPayload } from '@features/network/NetworkSelector'; +} from '@/features/network'; import { networksOverviewModel } from '../model/networks-overview-model'; const MAX_LIGHT_CLIENTS = 3; diff --git a/src/renderer/pages/Settings/Overview/Overview.test.tsx b/src/renderer/pages/Settings/Overview/Overview.test.tsx index bd3fb2de05..8e05d6aa0b 100644 --- a/src/renderer/pages/Settings/Overview/Overview.test.tsx +++ b/src/renderer/pages/Settings/Overview/Overview.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import { Overview } from './Overview'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/pages/Settings/Overview/Overview.tsx b/src/renderer/pages/Settings/Overview/Overview.tsx index 9742dc3d34..0d22f8cc9e 100644 --- a/src/renderer/pages/Settings/Overview/Overview.tsx +++ b/src/renderer/pages/Settings/Overview/Overview.tsx @@ -1,7 +1,7 @@ import { Outlet } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { Header } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { Header } from '@/shared/ui'; import { GeneralActions, SocialLinks, Version } from './components'; diff --git a/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.test.tsx b/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.test.tsx index 49de96f948..a90866c5e7 100644 --- a/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.test.tsx +++ b/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.test.tsx @@ -3,7 +3,7 @@ import { MemoryRouter } from 'react-router-dom'; import { GeneralActions } from './GeneralActions'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.tsx b/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.tsx index 9fbf95189e..ad2a2b794d 100644 --- a/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.tsx +++ b/src/renderer/pages/Settings/Overview/components/GeneralActions/GeneralActions.tsx @@ -3,12 +3,12 @@ import { capitalize } from 'lodash'; import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { Paths } from '@shared/routes'; -import { BodyText, FootnoteText, HelpText, Icon, Plate, Switch } from '@shared/ui'; -import { governanceModel } from '@entities/governance'; -import { currencyModel, priceProviderModel } from '@entities/price'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Paths } from '@/shared/routes'; +import { BodyText, FootnoteText, HelpText, Icon, Plate, Switch } from '@/shared/ui'; +import { governanceModel } from '@/entities/governance'; +import { currencyModel, priceProviderModel } from '@/entities/price'; // TODO: Language switcher temporary removed export const GeneralActions = () => { diff --git a/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.test.tsx b/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.test.tsx index d6750e25b4..98983b32d2 100644 --- a/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.test.tsx +++ b/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import { SocialLinks } from './SocialLinks'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.tsx b/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.tsx index 95c12dce93..f8c478a160 100644 --- a/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.tsx +++ b/src/renderer/pages/Settings/Overview/components/SocialLinks/SocialLinks.tsx @@ -1,6 +1,6 @@ -import { useI18n } from '@app/providers'; -import { cnTw } from '@shared/lib/utils'; -import { BodyText, FootnoteText, HelpText, Icon, Plate } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { BodyText, FootnoteText, HelpText, Icon, Plate } from '@/shared/ui'; const Links = [ { diff --git a/src/renderer/pages/Settings/Overview/components/Version/Version.test.tsx b/src/renderer/pages/Settings/Overview/components/Version/Version.test.tsx index 091e0dca0b..4ca8376e47 100644 --- a/src/renderer/pages/Settings/Overview/components/Version/Version.test.tsx +++ b/src/renderer/pages/Settings/Overview/components/Version/Version.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import { Version } from './Version'; -jest.mock('@app/providers', () => ({ +jest.mock('@/shared/i18n', () => ({ useI18n: jest.fn().mockReturnValue({ t: (key: string) => key, }), diff --git a/src/renderer/pages/Settings/Overview/components/Version/Version.tsx b/src/renderer/pages/Settings/Overview/components/Version/Version.tsx index f792ea595f..750e73768c 100644 --- a/src/renderer/pages/Settings/Overview/components/Version/Version.tsx +++ b/src/renderer/pages/Settings/Overview/components/Version/Version.tsx @@ -1,5 +1,5 @@ -import { useI18n } from '@app/providers'; -import { HelpText, Icon } from '@shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { HelpText, Icon } from '@/shared/ui'; export const Version = () => { const { t } = useI18n(); diff --git a/src/renderer/pages/Settings/ReferendumData/model/referendum-data-model.ts b/src/renderer/pages/Settings/ReferendumData/model/referendum-data-model.ts index f9f499d577..898e340eee 100644 --- a/src/renderer/pages/Settings/ReferendumData/model/referendum-data-model.ts +++ b/src/renderer/pages/Settings/ReferendumData/model/referendum-data-model.ts @@ -2,9 +2,9 @@ import { attach, createApi, createStore, sample } from 'effector'; import { delay } from 'patronum'; import { type NavigateFunction } from 'react-router-dom'; -import { DEFAULT_TRANSITION } from '@shared/lib/utils'; -import { Paths } from '@shared/routes'; -import { offChainModel } from '@features/governance'; +import { DEFAULT_TRANSITION } from '@/shared/lib/utils'; +import { Paths } from '@/shared/routes'; +import { offChainModel } from '@/features/governance'; const $navigation = createStore<{ navigate: NavigateFunction } | null>(null); const navigationApi = createApi($navigation, { diff --git a/src/renderer/pages/Settings/ReferendumData/ui/ReferendumData.tsx b/src/renderer/pages/Settings/ReferendumData/ui/ReferendumData.tsx index b7bd0e9c33..885be306df 100644 --- a/src/renderer/pages/Settings/ReferendumData/ui/ReferendumData.tsx +++ b/src/renderer/pages/Settings/ReferendumData/ui/ReferendumData.tsx @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; -import { OffChainDataSource } from '@features/governance'; +import { OffChainDataSource } from '@/features/governance'; import { referendumDataModel } from '../model/referendum-data-model'; export const ReferendumData = () => { diff --git a/src/renderer/pages/Staking/lib/constants.ts b/src/renderer/pages/Staking/lib/constants.ts index b435c2ef63..ae01f59662 100644 --- a/src/renderer/pages/Staking/lib/constants.ts +++ b/src/renderer/pages/Staking/lib/constants.ts @@ -1,4 +1,4 @@ -import { type IconNames } from '@shared/ui/Icon/data'; +import { type IconNames } from '@/shared/ui/Icon/data'; import { Operations } from './types'; diff --git a/src/renderer/pages/Staking/lib/types.ts b/src/renderer/pages/Staking/lib/types.ts index 9cb46cb104..fb2d22bc71 100644 --- a/src/renderer/pages/Staking/lib/types.ts +++ b/src/renderer/pages/Staking/lib/types.ts @@ -1,4 +1,4 @@ -import { type Account, type Address, type Unlocking } from '@shared/core'; +import { type Account, type Address, type Unlocking } from '@/shared/core'; export type NominatorInfo = { address: Address; diff --git a/src/renderer/pages/Staking/ui/AboutStaking.tsx b/src/renderer/pages/Staking/ui/AboutStaking.tsx index 32dd27a3fb..7ee6558757 100644 --- a/src/renderer/pages/Staking/ui/AboutStaking.tsx +++ b/src/renderer/pages/Staking/ui/AboutStaking.tsx @@ -2,12 +2,12 @@ import { type ApiPromise } from '@polkadot/api'; import { useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type Asset, type EraIndex, type Validator } from '@shared/core'; -import { Duration, FootnoteText, Shimmering } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { useStakingData } from '@entities/staking'; +import { type Asset, type EraIndex, type Validator } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { Duration, FootnoteText, Shimmering } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance } from '@/entities/price'; +import { useStakingData } from '@/entities/staking'; type Props = { api?: ApiPromise; diff --git a/src/renderer/pages/Staking/ui/Actions.tsx b/src/renderer/pages/Staking/ui/Actions.tsx index 65ec9adfeb..7f0b3eae89 100644 --- a/src/renderer/pages/Staking/ui/Actions.tsx +++ b/src/renderer/pages/Staking/ui/Actions.tsx @@ -1,12 +1,12 @@ import { useState } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type Address, type Stake } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { toAccountId } from '@shared/lib/utils'; -import { BaseModal, Button, DropdownButton, Icon, SmallTitleText } from '@shared/ui'; -import { type ButtonDropdownOption } from '@shared/ui/types'; +import { type Address, type Stake } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { toAccountId } from '@/shared/lib/utils'; +import { BaseModal, Button, DropdownButton, Icon, SmallTitleText } from '@/shared/ui'; +import { type ButtonDropdownOption } from '@/shared/ui/types'; import { ControllerOperations, OperationOptions, StashOperations } from '../lib/constants'; import { ControllerTypes, type Operations } from '../lib/types'; diff --git a/src/renderer/pages/Staking/ui/NetworkInfo.tsx b/src/renderer/pages/Staking/ui/NetworkInfo.tsx index 58aa2251ee..441fa5fcbd 100644 --- a/src/renderer/pages/Staking/ui/NetworkInfo.tsx +++ b/src/renderer/pages/Staking/ui/NetworkInfo.tsx @@ -1,17 +1,17 @@ import { BN, BN_ZERO } from '@polkadot/util'; import { type PropsWithChildren, useEffect, useState } from 'react'; -import { useI18n } from '@app/providers'; -import { chainsService } from '@shared/api/network'; -import { type Chain } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { getRelaychainAsset } from '@shared/lib/utils'; -import { FootnoteText, IconButton, Plate, Select, Shimmering } from '@shared/ui'; -import { type DropdownOption, type DropdownResult } from '@shared/ui/types'; -import { AssetBalance } from '@entities/asset'; -import { ChainTitle } from '@entities/chain'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { settingsStorage } from '@entities/settings'; +import { chainsService } from '@/shared/api/network'; +import { type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { getRelaychainAsset } from '@/shared/lib/utils'; +import { FootnoteText, IconButton, Plate, Select, Shimmering } from '@/shared/ui'; +import { type DropdownOption, type DropdownResult } from '@/shared/ui/types'; +import { AssetBalance } from '@/entities/asset'; +import { ChainTitle } from '@/entities/chain'; +import { AssetFiatBalance } from '@/entities/price'; +import { settingsStorage } from '@/entities/settings'; const getTotal = (values: string[]): BN => { return values.reduce((acc, value) => acc.add(new BN(value || 0)), BN_ZERO); @@ -109,7 +109,7 @@ export const NetworkInfo = ({
) : ( -
+
{title} diff --git a/src/renderer/pages/Staking/ui/NominatorItem.tsx b/src/renderer/pages/Staking/ui/NominatorItem.tsx index e106735433..379a7d5ab8 100644 --- a/src/renderer/pages/Staking/ui/NominatorItem.tsx +++ b/src/renderer/pages/Staking/ui/NominatorItem.tsx @@ -1,13 +1,13 @@ import { useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { useI18n } from '@app/providers'; -import { type Account, type Address, type Asset, type Explorer } from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { Checkbox, FootnoteText, Icon, IconButton, Plate, Shimmering } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { ExplorersPopover, walletModel, walletUtils } from '@entities/wallet'; +import { type Account, type Address, type Asset, type Explorer } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { Checkbox, FootnoteText, Icon, IconButton, Plate, Shimmering } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance } from '@/entities/price'; +import { ExplorersPopover, walletModel, walletUtils } from '@/entities/wallet'; import { type NominatorInfo } from '../lib/types'; type Props = { diff --git a/src/renderer/pages/Staking/ui/NominatorsList.tsx b/src/renderer/pages/Staking/ui/NominatorsList.tsx index c44c8db8e8..c79badc3cd 100644 --- a/src/renderer/pages/Staking/ui/NominatorsList.tsx +++ b/src/renderer/pages/Staking/ui/NominatorsList.tsx @@ -2,8 +2,6 @@ import { type ApiPromise } from '@polkadot/api'; import { type ReactNode } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { Address as AddressComponent } from '@/shared/ui-entities'; import { type Account, type Address, @@ -11,10 +9,12 @@ import { type BaseAccount, type Explorer, type ShardAccount, -} from '@shared/core'; -import { cnTw } from '@shared/lib/utils'; -import { FootnoteText, HelpText, Icon, Tooltip } from '@shared/ui'; -import { useStakingData } from '@entities/staking'; +} from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { cnTw } from '@/shared/lib/utils'; +import { FootnoteText, HelpText, Icon, Tooltip } from '@/shared/ui'; +import { Address as AddressComponent } from '@/shared/ui-entities'; +import { useStakingData } from '@/entities/staking'; import { type NominatorInfo } from '../lib/types'; import { NominatorsItem } from './NominatorItem'; diff --git a/src/renderer/pages/Staking/ui/ShardedList.tsx b/src/renderer/pages/Staking/ui/ShardedList.tsx index b7af412268..242c069637 100644 --- a/src/renderer/pages/Staking/ui/ShardedList.tsx +++ b/src/renderer/pages/Staking/ui/ShardedList.tsx @@ -1,13 +1,13 @@ import { type ReactNode } from 'react'; import { Trans } from 'react-i18next'; -import { useI18n } from '@app/providers'; -import { type Address, type Asset, type Explorer } from '@shared/core'; -import { type ShardAccount } from '@shared/core/types/account'; -import { Accordion, Checkbox, FootnoteText, Plate, Shimmering, Tooltip } from '@shared/ui'; -import { AssetBalance } from '@entities/asset'; -import { AssetFiatBalance } from '@entities/price/ui/AssetFiatBalance'; -import { useStakingData } from '@entities/staking'; +import { type Address, type Asset, type Explorer } from '@/shared/core'; +import { type ShardAccount } from '@/shared/core/types/account'; +import { useI18n } from '@/shared/i18n'; +import { Accordion, Checkbox, FootnoteText, Plate, Shimmering, Tooltip } from '@/shared/ui'; +import { AssetBalance } from '@/entities/asset'; +import { AssetFiatBalance } from '@/entities/price'; +import { useStakingData } from '@/entities/staking'; import { type NominatorInfo } from '../lib/types'; import { NominatorsItem } from './NominatorItem'; diff --git a/src/renderer/pages/Staking/ui/Staking.tsx b/src/renderer/pages/Staking/ui/Staking.tsx index 9111c0bd75..6fd1a199cc 100644 --- a/src/renderer/pages/Staking/ui/Staking.tsx +++ b/src/renderer/pages/Staking/ui/Staking.tsx @@ -2,26 +2,27 @@ import { useUnit } from 'effector-react'; import uniqBy from 'lodash/uniqBy'; import { useEffect, useMemo, useState } from 'react'; -import { useGraphql, useI18n } from '@app/providers'; -import { type Account, type Address, type Chain, type ChainId, type Stake, type Validator } from '@shared/core'; -import { useToggle } from '@shared/lib/hooks'; -import { getRelaychainAsset, toAddress } from '@shared/lib/utils'; -import { Button, EmptyList, Header } from '@shared/ui'; -import { InactiveNetwork, networkUtils, useNetworkData } from '@entities/network'; -import { priceProviderModel } from '@entities/price'; +import { useGraphql } from '@/app/providers'; +import { type Account, type Address, type Chain, type ChainId, type Stake, type Validator } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; +import { useToggle } from '@/shared/lib/hooks'; +import { getRelaychainAsset, toAddress } from '@/shared/lib/utils'; +import { Button, EmptyList, Header } from '@/shared/ui'; +import { InactiveNetwork, networkUtils, useNetworkData } from '@/entities/network'; +import { priceProviderModel } from '@/entities/price'; import { type StakingMap, type ValidatorMap, ValidatorsModal, + eraService, useStakingData, useStakingRewards, validatorsService, -} from '@entities/staking'; -import { eraService } from '@entities/staking/api'; -import { accountUtils, permissionUtils, walletModel, walletUtils } from '@entities/wallet'; +} from '@/entities/staking'; +import { accountUtils, permissionUtils, walletModel, walletUtils } from '@/entities/wallet'; import { EmptyAccountMessage } from '@/features/emptyList'; import { walletSelectModel } from '@/features/wallets'; -import * as Operations from '@widgets/Staking'; +import * as Operations from '@/widgets/Staking'; import { type NominatorInfo, Operations as StakeOperations } from '../lib/types'; import { AboutStaking } from './AboutStaking'; diff --git a/src/renderer/pages/Staking/ui/TimeToEra.tsx b/src/renderer/pages/Staking/ui/TimeToEra.tsx index cf70aa29fe..89a1b55955 100644 --- a/src/renderer/pages/Staking/ui/TimeToEra.tsx +++ b/src/renderer/pages/Staking/ui/TimeToEra.tsx @@ -1,8 +1,8 @@ import { type ApiPromise } from '@polkadot/api'; import { useEffect, useState } from 'react'; -import { Duration, Shimmering } from '@shared/ui'; -import { eraService } from '@entities/staking/api'; +import { Duration, Shimmering } from '@/shared/ui'; +import { eraService } from '@/entities/staking'; type Props = { api?: ApiPromise; diff --git a/src/renderer/pages/index.tsx b/src/renderer/pages/index.tsx index 2ef1b73db3..4b42976323 100644 --- a/src/renderer/pages/index.tsx +++ b/src/renderer/pages/index.tsx @@ -1,8 +1,8 @@ import { Suspense, lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; -import { Paths } from '@shared/routes'; -import { MainLayout } from '@widgets/Layout'; +import { Paths } from '@/shared/routes'; +import { MainLayout } from '@/widgets/Layout'; import { Assets, ReceiveAsset, SendAsset } from './Assets'; import { Onboarding } from './Onboarding'; diff --git a/src/renderer/processes/multisigs/lib/__tests__/multisigs-utils.test.ts b/src/renderer/processes/multisigs/lib/__tests__/multisigs-utils.test.ts index 7f1e1bd8e0..132d9e03e7 100644 --- a/src/renderer/processes/multisigs/lib/__tests__/multisigs-utils.test.ts +++ b/src/renderer/processes/multisigs/lib/__tests__/multisigs-utils.test.ts @@ -1,4 +1,4 @@ -import { type Chain, ChainOptions } from '@shared/core'; +import { type Chain, ChainOptions } from '@/shared/core'; import { multisigUtils } from '../mulitisigs-utils'; describe('features/multisigs/lib/multisigs-utils', () => { diff --git a/src/renderer/processes/multisigs/lib/mulitisigs-utils.ts b/src/renderer/processes/multisigs/lib/mulitisigs-utils.ts index c95a6aef00..4cbcad5d5b 100644 --- a/src/renderer/processes/multisigs/lib/mulitisigs-utils.ts +++ b/src/renderer/processes/multisigs/lib/mulitisigs-utils.ts @@ -1,5 +1,5 @@ -import { AccountType, type Chain, ChainOptions, ChainType, CryptoType, SigningType, WalletType } from '@shared/core'; -import { isEthereumAccountId, toAddress } from '@shared/lib/utils'; +import { AccountType, type Chain, ChainOptions, ChainType, CryptoType, SigningType, WalletType } from '@/shared/core'; +import { isEthereumAccountId, toAddress } from '@/shared/lib/utils'; export const multisigUtils = { isMultisigSupported, diff --git a/src/renderer/processes/multisigs/model/__tests__/multisigs-model.test.ts b/src/renderer/processes/multisigs/model/__tests__/multisigs-model.test.ts index 97e36828de..69d9a8f650 100644 --- a/src/renderer/processes/multisigs/model/__tests__/multisigs-model.test.ts +++ b/src/renderer/processes/multisigs/model/__tests__/multisigs-model.test.ts @@ -9,10 +9,10 @@ import { ExternalType, SigningType, WalletType, -} from '@shared/core'; -import { multisigService } from '@entities/multisig'; -import { networkModel } from '@entities/network'; -import { walletModel } from '@entities/wallet'; +} from '@/shared/core'; +import { multisigService } from '@/entities/multisig'; +import { networkModel } from '@/entities/network'; +import { walletModel } from '@/entities/wallet'; import { multisigsModel } from '../multisigs-model'; const signatories = [ diff --git a/src/renderer/processes/multisigs/model/multisigs-model.ts b/src/renderer/processes/multisigs/model/multisigs-model.ts index d8ff35d54f..57a145c7fe 100644 --- a/src/renderer/processes/multisigs/model/multisigs-model.ts +++ b/src/renderer/processes/multisigs/model/multisigs-model.ts @@ -10,11 +10,11 @@ import { type NoID, NotificationType, type Wallet, -} from '@shared/core'; -import { type MultisigResult, multisigService } from '@entities/multisig'; -import { networkModel, networkUtils } from '@entities/network'; -import { notificationModel } from '@entities/notification'; -import { accountUtils, walletModel, walletUtils } from '@entities/wallet'; +} from '@/shared/core'; +import { type MultisigResult, multisigService } from '@/entities/multisig'; +import { networkModel, networkUtils } from '@/entities/network'; +import { notificationModel } from '@/entities/notification'; +import { accountUtils, walletModel, walletUtils } from '@/entities/wallet'; import { multisigUtils } from '../lib/mulitisigs-utils'; type SaveMultisigParams = { diff --git a/src/renderer/shared/api/balances/service/balanceService.ts b/src/renderer/shared/api/balances/service/balanceService.ts index cd0040e883..cde1f2fe5d 100644 --- a/src/renderer/shared/api/balances/service/balanceService.ts +++ b/src/renderer/shared/api/balances/service/balanceService.ts @@ -6,9 +6,9 @@ import { BN, hexToU8a } from '@polkadot/util'; import noop from 'lodash/noop'; import uniq from 'lodash/uniq'; -import { type AccountId, type Address, type Asset, type Balance, type Chain, type OrmlExtras } from '@shared/core'; -import { AssetType } from '@shared/core'; -import { getAssetId, getRepeatedIndex, toAddress } from '@shared/lib/utils'; +import { type AccountId, type Address, type Asset, type Balance, type Chain, type OrmlExtras } from '@/shared/core'; +import { AssetType } from '@/shared/core'; +import { getAssetId, getRepeatedIndex, toAddress } from '@/shared/lib/utils'; export const balanceService = { subscribeBalances, diff --git a/src/renderer/shared/api/governance/off-chain/lib/types.ts b/src/renderer/shared/api/governance/off-chain/lib/types.ts index 0e6830e5f4..a9f03ffdf8 100644 --- a/src/renderer/shared/api/governance/off-chain/lib/types.ts +++ b/src/renderer/shared/api/governance/off-chain/lib/types.ts @@ -1,6 +1,6 @@ import { type BN } from '@polkadot/util'; -import { type Address, type Chain, type Conviction, type ReferendumId } from '@shared/core'; +import { type Address, type Chain, type Conviction, type ReferendumId } from '@/shared/core'; export type ReferendumTimelineRecordStatus = | 'All' diff --git a/src/renderer/shared/api/governance/off-chain/service/delegationService.ts b/src/renderer/shared/api/governance/off-chain/service/delegationService.ts index f7c8209892..116501b9c1 100644 --- a/src/renderer/shared/api/governance/off-chain/service/delegationService.ts +++ b/src/renderer/shared/api/governance/off-chain/service/delegationService.ts @@ -1,8 +1,8 @@ import { BN } from '@polkadot/util'; import { GraphQLClient } from 'graphql-request'; +import { type Address, type Chain, ExternalType, type ReferendumId } from '@/shared/core'; import { dictionary, toPrecision } from '@/shared/lib/utils'; -import { type Address, type Chain, ExternalType, type ReferendumId } from '@shared/core'; import { type DelegateAccount, type DelegateDetails, diff --git a/src/renderer/shared/api/governance/off-chain/service/polkassemblyService.ts b/src/renderer/shared/api/governance/off-chain/service/polkassemblyService.ts index 3b1218969d..4408648f6e 100644 --- a/src/renderer/shared/api/governance/off-chain/service/polkassemblyService.ts +++ b/src/renderer/shared/api/governance/off-chain/service/polkassemblyService.ts @@ -5,8 +5,8 @@ import { type PolkassemblyPostVote, type PolkassembyPostStatus, polkassemblyApiService, -} from '@shared/api/polkassembly'; -import { dictionary } from '@shared/lib/utils'; +} from '@/shared/api/polkassembly'; +import { dictionary } from '@/shared/lib/utils'; import { type GovernanceApi, type ReferendumTimelineRecord } from '../lib/types'; const getReferendumList: GovernanceApi['getReferendumList'] = async (chain, callback) => { diff --git a/src/renderer/shared/api/governance/off-chain/service/subsquareService.ts b/src/renderer/shared/api/governance/off-chain/service/subsquareService.ts index b70855a66d..c6bdcb9fde 100644 --- a/src/renderer/shared/api/governance/off-chain/service/subsquareService.ts +++ b/src/renderer/shared/api/governance/off-chain/service/subsquareService.ts @@ -5,8 +5,8 @@ import { type SubsquareSimpleReferendum, type SubsquareTimelineRecord, subsquareApiService, -} from '@shared/api/subsquare'; -import { dictionary } from '@shared/lib/utils'; +} from '@/shared/api/subsquare'; +import { dictionary } from '@/shared/lib/utils'; import { type SubsquareTimelineRecordStatus } from '../../../subsquare/lib/types'; import { type GovernanceApi, type ReferendumTimelineRecord, type ReferendumTimelineRecordStatus } from '../lib/types'; diff --git a/src/renderer/shared/api/governance/on-chain/lib/claim-types.ts b/src/renderer/shared/api/governance/on-chain/lib/claim-types.ts index 35d56b53b9..db76b878a7 100644 --- a/src/renderer/shared/api/governance/on-chain/lib/claim-types.ts +++ b/src/renderer/shared/api/governance/on-chain/lib/claim-types.ts @@ -1,6 +1,6 @@ import { type BN } from '@polkadot/util'; -import { type Address, type BlockHeight, type ReferendumId, type TrackId } from '@shared/core'; +import { type Address, type BlockHeight, type ReferendumId, type TrackId } from '@/shared/core'; export type ClaimableLock = { claimAt: ClaimTime; diff --git a/src/renderer/shared/api/governance/on-chain/lib/threshold-types.ts b/src/renderer/shared/api/governance/on-chain/lib/threshold-types.ts index 07bfae7a90..d6c25e1373 100644 --- a/src/renderer/shared/api/governance/on-chain/lib/threshold-types.ts +++ b/src/renderer/shared/api/governance/on-chain/lib/threshold-types.ts @@ -1,6 +1,6 @@ import { type BN } from '@polkadot/util'; -import { type BlockHeight, type Tally, type VotingCurve } from '@shared/core'; +import { type BlockHeight, type Tally, type VotingCurve } from '@/shared/core'; export type SupportParams = { supportCurve: VotingCurve; diff --git a/src/renderer/shared/api/network/lib/types.ts b/src/renderer/shared/api/network/lib/types.ts index 95edfd79d7..0e864a1734 100644 --- a/src/renderer/shared/api/network/lib/types.ts +++ b/src/renderer/shared/api/network/lib/types.ts @@ -1,6 +1,6 @@ import { type ProviderInterface, type ProviderInterfaceCallback } from '@polkadot/rpc-provider/types'; -import { type HexString } from '@shared/core'; +import { type HexString } from '@/shared/core'; export const enum ProviderType { WEB_SOCKET = 'ws', diff --git a/src/renderer/shared/api/network/lib/utils.ts b/src/renderer/shared/api/network/lib/utils.ts index c7e40390e9..6387b7483d 100644 --- a/src/renderer/shared/api/network/lib/utils.ts +++ b/src/renderer/shared/api/network/lib/utils.ts @@ -1,4 +1,4 @@ -import { ChainOptions } from '@shared/core'; +import { ChainOptions } from '@/shared/core'; export function isPolkadot(chainName: string): boolean { return chainName === 'Polkadot'; diff --git a/src/renderer/shared/api/network/provider/CachedProvider.ts b/src/renderer/shared/api/network/provider/CachedProvider.ts index c0b415983e..820752b4f0 100644 --- a/src/renderer/shared/api/network/provider/CachedProvider.ts +++ b/src/renderer/shared/api/network/provider/CachedProvider.ts @@ -1,6 +1,6 @@ import { type ProviderInterface } from '@polkadot/rpc-provider/types'; -import { type HexString } from '@shared/core'; +import { type HexString } from '@/shared/core'; import { GET_METADATA_METHOD } from '../lib/constants'; import { type ProviderWithMetadata } from '../lib/types'; diff --git a/src/renderer/shared/api/network/service/chainsService.ts b/src/renderer/shared/api/network/service/chainsService.ts index ae9c087d0f..7ae11e5711 100644 --- a/src/renderer/shared/api/network/service/chainsService.ts +++ b/src/renderer/shared/api/network/service/chainsService.ts @@ -5,11 +5,11 @@ import keyBy from 'lodash/keyBy'; import orderBy from 'lodash/orderBy'; import sortBy from 'lodash/sortBy'; -import { type PriceObject } from '@shared/api/price-provider'; -import chainsProd from '@shared/config/chains/chains.json'; -import chainsDev from '@shared/config/chains/chains_dev.json'; -import { type Balance, type Chain, type ChainId } from '@shared/core'; -import { ZERO_BALANCE, getRelaychainAsset, nonNullable, totalAmount } from '@shared/lib/utils'; +import { type PriceObject } from '@/shared/api/price-provider'; +import chainsProd from '@/shared/config/chains/chains.json'; +import chainsDev from '@/shared/config/chains/chains_dev.json'; +import { type Balance, type Chain, type ChainId } from '@/shared/core'; +import { ZERO_BALANCE, getRelaychainAsset, nonNullable, totalAmount } from '@/shared/lib/utils'; import { isKusama, isNameStartsWithNumber, isPolkadot, isTestnet } from '../lib/utils'; type ChainWithFiatBalance = Chain & { diff --git a/src/renderer/shared/api/network/service/metadataService.ts b/src/renderer/shared/api/network/service/metadataService.ts index 24023e3f43..d907a0537f 100644 --- a/src/renderer/shared/api/network/service/metadataService.ts +++ b/src/renderer/shared/api/network/service/metadataService.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { type UnsubscribePromise } from '@polkadot/api/types'; -import { type ChainMetadata, type NoID } from '@shared/core'; +import { type ChainMetadata, type NoID } from '@/shared/core'; export const metadataService = { requestMetadata, diff --git a/src/renderer/shared/api/network/service/networkService.ts b/src/renderer/shared/api/network/service/networkService.ts index 38a0c6fd60..b1a3462a4a 100644 --- a/src/renderer/shared/api/network/service/networkService.ts +++ b/src/renderer/shared/api/network/service/networkService.ts @@ -2,8 +2,8 @@ import { ApiPromise, ScProvider, WsProvider } from '@polkadot/api'; import { type ProviderInterface } from '@polkadot/rpc-provider/types'; import * as Sc from '@substrate/connect'; -import { type ChainId, type HexString } from '@shared/core'; -import { getKnownChain } from '@shared/lib/utils'; +import { type ChainId, type HexString } from '@/shared/core'; +import { getKnownChain } from '@/shared/lib/utils'; import { ProviderType, type ProviderWithMetadata } from '../lib/types'; import { createCachedProvider } from '../provider/CachedProvider'; diff --git a/src/renderer/shared/api/polkassembly/lib/types.ts b/src/renderer/shared/api/polkassembly/lib/types.ts index a920d98d4f..5934638383 100644 --- a/src/renderer/shared/api/polkassembly/lib/types.ts +++ b/src/renderer/shared/api/polkassembly/lib/types.ts @@ -1,4 +1,4 @@ -import { type Address, type HexString } from '@shared/core'; +import { type Address, type HexString } from '@/shared/core'; export type PolkassemblyProposalType = | 'democracy_proposals' diff --git a/src/renderer/shared/api/price-provider/__tests__/fiatService.test.ts b/src/renderer/shared/api/price-provider/__tests__/fiatService.test.ts index 518e3cd5b2..1f003cba90 100644 --- a/src/renderer/shared/api/price-provider/__tests__/fiatService.test.ts +++ b/src/renderer/shared/api/price-provider/__tests__/fiatService.test.ts @@ -1,4 +1,4 @@ -import { localStorageService } from '@shared/api/local-storage'; +import { localStorageService } from '@/shared/api/local-storage'; import { ASSETS_PRICES_KEY, CURRENCY_CODE_KEY, FIAT_FLAG_KEY, PRICE_PROVIDER_KEY } from '../lib/constants'; import { fiatService } from '../service/fiatService'; diff --git a/src/renderer/shared/api/price-provider/service/fiatService.ts b/src/renderer/shared/api/price-provider/service/fiatService.ts index 9c4bb8cea4..752ae2a9ff 100644 --- a/src/renderer/shared/api/price-provider/service/fiatService.ts +++ b/src/renderer/shared/api/price-provider/service/fiatService.ts @@ -1,5 +1,5 @@ -import { localStorageService } from '@shared/api/local-storage'; -import CURRENCY from '@shared/config/currency/currencies.json'; +import { localStorageService } from '@/shared/api/local-storage'; +import CURRENCY from '@/shared/config/currency/currencies.json'; import { ASSETS_PRICES_KEY, CURRENCY_CODE_KEY, FIAT_FLAG_KEY, PRICE_PROVIDER_KEY } from '../lib/constants'; import { type CurrencyItem } from '../lib/types'; diff --git a/src/renderer/shared/api/proxy/service/proxyService.ts b/src/renderer/shared/api/proxy/service/proxyService.ts index 83a2f7b45c..a639053016 100644 --- a/src/renderer/shared/api/proxy/service/proxyService.ts +++ b/src/renderer/shared/api/proxy/service/proxyService.ts @@ -1,7 +1,7 @@ import { type ApiPromise } from '@polkadot/api'; import { BN } from '@polkadot/util'; -import { type Address, type ProxyType } from '@shared/core'; +import { type Address, type ProxyType } from '@/shared/core'; export const proxyService = { getMaxProxies, diff --git a/src/renderer/shared/api/storage/lib/types.ts b/src/renderer/shared/api/storage/lib/types.ts index d321d223c0..c42b61694c 100644 --- a/src/renderer/shared/api/storage/lib/types.ts +++ b/src/renderer/shared/api/storage/lib/types.ts @@ -17,7 +17,7 @@ import { type ProxyAccount, type ProxyGroup, type Wallet, -} from '@shared/core'; +} from '@/shared/core'; // ===================================================== // ================ Storage interface ================== diff --git a/src/renderer/shared/api/storage/migration/migration-2.ts b/src/renderer/shared/api/storage/migration/migration-2.ts index bce1c37a2d..52d75e6dfd 100644 --- a/src/renderer/shared/api/storage/migration/migration-2.ts +++ b/src/renderer/shared/api/storage/migration/migration-2.ts @@ -1,6 +1,6 @@ import { type Transaction } from 'dexie'; -import { AccountType, KeyType, SigningType, WalletType } from '@shared/core'; +import { AccountType, KeyType, SigningType, WalletType } from '@/shared/core'; /** * Create missing wallets for SinglePS, WOW, Multisig Update Chain accounts diff --git a/src/renderer/shared/api/storage/service/multisigEventStorage.ts b/src/renderer/shared/api/storage/service/multisigEventStorage.ts index 3265aa9e60..7166477933 100644 --- a/src/renderer/shared/api/storage/service/multisigEventStorage.ts +++ b/src/renderer/shared/api/storage/service/multisigEventStorage.ts @@ -1,4 +1,4 @@ -import { type MultisigEvent, type MultisigTransactionKey } from '@shared/core'; +import { type MultisigEvent, type MultisigTransactionKey } from '@/shared/core'; import { type ID, type IMultisigEventStorage, type MultisigEventDS, type TMultisigEvent } from '../lib/types'; export const useMultisigEventStorage = (db: TMultisigEvent): IMultisigEventStorage => ({ diff --git a/src/renderer/shared/api/storage/service/storageService.ts b/src/renderer/shared/api/storage/service/storageService.ts index 36fe6e7165..4a3d7d8412 100644 --- a/src/renderer/shared/api/storage/service/storageService.ts +++ b/src/renderer/shared/api/storage/service/storageService.ts @@ -1,6 +1,6 @@ import { type IndexableType, type Table } from 'dexie'; -import { type NoID } from '@shared/core'; +import { type NoID } from '@/shared/core'; import { dexieStorage } from './dexie'; diff --git a/src/renderer/shared/api/storage/service/transactionStorage.ts b/src/renderer/shared/api/storage/service/transactionStorage.ts index c87e25cff8..bd8e7f2c9c 100644 --- a/src/renderer/shared/api/storage/service/transactionStorage.ts +++ b/src/renderer/shared/api/storage/service/transactionStorage.ts @@ -1,4 +1,4 @@ -import { type AccountId, type CallHash, type ChainId, type MultisigTransaction } from '@shared/core'; +import { type AccountId, type CallHash, type ChainId, type MultisigTransaction } from '@/shared/core'; import { type IMultisigTransactionStorage, type MultisigTransactionDS, type TMultisigTransaction } from '../lib/types'; export const useTransactionStorage = (db: TMultisigTransaction): IMultisigTransactionStorage => ({ diff --git a/src/renderer/shared/api/subsquare/lib/types.ts b/src/renderer/shared/api/subsquare/lib/types.ts index 6a907bfd99..41ca4b81f8 100644 --- a/src/renderer/shared/api/subsquare/lib/types.ts +++ b/src/renderer/shared/api/subsquare/lib/types.ts @@ -1,4 +1,4 @@ -import { type Address, type HexString, type ReferendumId } from '@shared/core'; +import { type Address, type HexString, type ReferendumId } from '@/shared/core'; export type SubsquareTimelineRecordStatus = | 'All' diff --git a/src/renderer/shared/api/xcm/lib/types.ts b/src/renderer/shared/api/xcm/lib/types.ts index c239267ff0..036351fd6e 100644 --- a/src/renderer/shared/api/xcm/lib/types.ts +++ b/src/renderer/shared/api/xcm/lib/types.ts @@ -1,4 +1,4 @@ -import { type HexString } from '@shared/core'; +import { type HexString } from '@/shared/core'; export type AssetName = string; diff --git a/src/renderer/shared/api/xcm/service/xcmService.ts b/src/renderer/shared/api/xcm/service/xcmService.ts index 22eac26020..ca73b1609c 100644 --- a/src/renderer/shared/api/xcm/service/xcmService.ts +++ b/src/renderer/shared/api/xcm/service/xcmService.ts @@ -2,7 +2,7 @@ import { type ApiPromise } from '@polkadot/api'; import { BN } from '@polkadot/util'; import get from 'lodash/get'; -import { type XTokenPalletTransferArgs, type XcmPalletTransferArgs } from '@entities/transaction'; +import { type XTokenPalletTransferArgs, type XcmPalletTransferArgs } from '@/entities/transaction'; import { type AccountId, type Chain, type ChainId, type HexString } from '../../../core'; import { getAssetId, getTypeName, getTypeVersion, toLocalChainId } from '../../../lib/utils'; import { localStorageService } from '../../local-storage'; diff --git a/src/renderer/shared/core/types/account.ts b/src/renderer/shared/core/types/account.ts index 41d19eb835..7686b12a50 100644 --- a/src/renderer/shared/core/types/account.ts +++ b/src/renderer/shared/core/types/account.ts @@ -1,3 +1,5 @@ +import { type Asset } from '@/shared/core'; + import { type AccountId, type ChainId, @@ -51,6 +53,8 @@ export type MultisigAccount = GenericAccount & { creatorAccountId: AccountId; }; +export type A = Asset; + export type WcAccount = GenericAccount & { type: AccountType.WALLET_CONNECT; chainId: ChainId; diff --git a/src/renderer/shared/core/types/notification.ts b/src/renderer/shared/core/types/notification.ts index 323e28c936..2ccee516c5 100644 --- a/src/renderer/shared/core/types/notification.ts +++ b/src/renderer/shared/core/types/notification.ts @@ -7,7 +7,7 @@ import { type ProxyVariant, type Timepoint, type WalletType, -} from '@shared/core'; +} from '@/shared/core'; export const enum NotificationType { MULTISIG_CREATED = 'MultisigCreatedNotification', diff --git a/src/renderer/shared/core/types/transaction.ts b/src/renderer/shared/core/types/transaction.ts index e629f3044c..1f6299d535 100644 --- a/src/renderer/shared/core/types/transaction.ts +++ b/src/renderer/shared/core/types/transaction.ts @@ -10,7 +10,7 @@ import { type PartialBy, type ProxiedAccount, type Signatory, -} from '@shared/core'; +} from '@/shared/core'; export const enum TransactionType { TRANSFER = 'transfer', diff --git a/src/renderer/shared/effector/createDataSubscription.ts b/src/renderer/shared/effector/createDataSubscription.ts index 20a172d370..4139976605 100644 --- a/src/renderer/shared/effector/createDataSubscription.ts +++ b/src/renderer/shared/effector/createDataSubscription.ts @@ -10,7 +10,7 @@ import { } from 'effector'; import { readonly } from 'patronum'; -import { nonNullable, nullable } from '@shared/lib/utils'; +import { nonNullable, nullable } from '@/shared/lib/utils'; type CallbackFn = (value: IteratorResult) => unknown; type UnsubscribeFn = (() => void) | Promise<() => void>; diff --git a/src/renderer/app/providers/context/I18nContext/I18nContext.tsx b/src/renderer/shared/i18n/I18nContext.tsx similarity index 87% rename from src/renderer/app/providers/context/I18nContext/I18nContext.tsx rename to src/renderer/shared/i18n/I18nContext.tsx index 8ae6d63d6e..5c951ee026 100644 --- a/src/renderer/app/providers/context/I18nContext/I18nContext.tsx +++ b/src/renderer/shared/i18n/I18nContext.tsx @@ -6,10 +6,11 @@ import { type TFunction } from 'i18next'; import { type FC, type PropsWithChildren, createContext, useContext } from 'react'; import { initReactI18next, useTranslation } from 'react-i18next'; -import { LanguageOptions } from '@shared/api/translation/lib/constants'; -import { type LanguageItem, type SupportedLocale } from '@shared/api/translation/lib/types'; -import { useTranslationService } from '@shared/api/translation/translationService'; -import { LanguageSwitcher } from '@shared/ui'; +import { LanguageOptions } from '@/shared/api/translation/lib/constants'; +import { type LanguageItem, type SupportedLocale } from '@/shared/api/translation/lib/types'; +import { useTranslationService } from '@/shared/api/translation/translationService'; +// TODO fix cycle +import { LanguageSwitcher } from '@/shared/ui/LanguageSwitcher/LanguageSwitcher'; const { getConfig } = useTranslationService(); diff --git a/src/renderer/shared/i18n/index.ts b/src/renderer/shared/i18n/index.ts new file mode 100644 index 0000000000..7253808945 --- /dev/null +++ b/src/renderer/shared/i18n/index.ts @@ -0,0 +1 @@ +export { useI18n, I18Provider } from './I18nContext'; diff --git a/src/renderer/shared/lib/hooks/__tests__/useCountdown.test.ts b/src/renderer/shared/lib/hooks/__tests__/useCountdown.test.ts index ccabb053cc..6b621315c9 100644 --- a/src/renderer/shared/lib/hooks/__tests__/useCountdown.test.ts +++ b/src/renderer/shared/lib/hooks/__tests__/useCountdown.test.ts @@ -2,10 +2,10 @@ import { type ApiPromise } from '@polkadot/api'; import { BN_MILLION } from '@polkadot/util'; import { act, renderHook, waitFor } from '@testing-library/react'; -import { DEFAULT_QR_LIFETIME } from '@shared/lib/utils'; +import { DEFAULT_QR_LIFETIME } from '@/shared/lib/utils'; import { useCountdown } from '../useCountdown'; -jest.mock('@shared/lib/utils', () => ({ +jest.mock('@/shared/lib/utils', () => ({ getExpectedBlockTime: jest.fn().mockReturnValue(BN_MILLION.muln(2)), })); diff --git a/src/renderer/shared/lib/hooks/useAltOrCtrlKeyPressed.ts b/src/renderer/shared/lib/hooks/useAltOrCtrlKeyPressed.ts index 8aeeea66d8..3c5ace9035 100644 --- a/src/renderer/shared/lib/hooks/useAltOrCtrlKeyPressed.ts +++ b/src/renderer/shared/lib/hooks/useAltOrCtrlKeyPressed.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; -import { IS_MAC } from '@shared/lib/utils'; +import { IS_MAC } from '@/shared/lib/utils'; /** * Returns a boolean indicating whether the alt key (for macOS) or control key diff --git a/src/renderer/shared/lib/hooks/useCountdown.ts b/src/renderer/shared/lib/hooks/useCountdown.ts index 70c244f4c6..0c6d3adaf8 100644 --- a/src/renderer/shared/lib/hooks/useCountdown.ts +++ b/src/renderer/shared/lib/hooks/useCountdown.ts @@ -2,7 +2,7 @@ import { type ApiPromise } from '@polkadot/api'; import { BN, BN_THOUSAND } from '@polkadot/util'; import { useCallback, useEffect, useState } from 'react'; -import { DEFAULT_QR_LIFETIME, getExpectedBlockTime } from '@shared/lib/utils'; +import { DEFAULT_QR_LIFETIME, getExpectedBlockTime } from '@/shared/lib/utils'; /** * Start countdown based on Expected block time diff --git a/src/renderer/shared/lib/hooks/useModalClose.ts b/src/renderer/shared/lib/hooks/useModalClose.ts index a563c4f781..08a56b2caa 100644 --- a/src/renderer/shared/lib/hooks/useModalClose.ts +++ b/src/renderer/shared/lib/hooks/useModalClose.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useState } from 'react'; -import { DEFAULT_TRANSITION } from '@shared/lib/utils'; +import { DEFAULT_TRANSITION } from '@/shared/lib/utils'; import { useLooseRef } from './useLooseRef'; diff --git a/src/renderer/shared/lib/utils/__tests__/address.test.ts b/src/renderer/shared/lib/utils/__tests__/address.test.ts index 4d07a93bad..624fbf3e80 100644 --- a/src/renderer/shared/lib/utils/__tests__/address.test.ts +++ b/src/renderer/shared/lib/utils/__tests__/address.test.ts @@ -1,4 +1,4 @@ -import { TEST_ACCOUNTS, TEST_ADDRESS } from '@shared/lib/utils'; +import { TEST_ACCOUNTS, TEST_ADDRESS } from '@/shared/lib/utils'; import { toAddress, validateAddress } from '../address'; describe('shared/lib/onChainUtils/address', () => { diff --git a/src/renderer/shared/lib/utils/__tests__/derivation.test.ts b/src/renderer/shared/lib/utils/__tests__/derivation.test.ts index 73d445305a..4b1d17fe99 100644 --- a/src/renderer/shared/lib/utils/__tests__/derivation.test.ts +++ b/src/renderer/shared/lib/utils/__tests__/derivation.test.ts @@ -1,4 +1,4 @@ -import { derivationHasPassword, validateDerivation } from '@shared/lib/utils'; +import { derivationHasPassword, validateDerivation } from '@/shared/lib/utils'; describe('shared/lib/onChainUtils/derivation#validateDerivation', () => { // Array<[argument, result]> diff --git a/src/renderer/shared/lib/utils/address.ts b/src/renderer/shared/lib/utils/address.ts index a7362c1df5..9e82f0f0f1 100644 --- a/src/renderer/shared/lib/utils/address.ts +++ b/src/renderer/shared/lib/utils/address.ts @@ -1,7 +1,7 @@ import { hexToU8a, isHex, isU8a, u8aToHex, u8aToU8a } from '@polkadot/util'; import { base58Decode, checkAddressChecksum, decodeAddress, encodeAddress } from '@polkadot/util-crypto'; -import { type AccountId, type Address } from '@shared/core'; +import { type AccountId, type Address } from '@/shared/core'; import { ADDRESS_ALLOWED_ENCODED_LENGTHS, diff --git a/src/renderer/shared/lib/utils/assets.ts b/src/renderer/shared/lib/utils/assets.ts index 7a8302e053..01468d6687 100644 --- a/src/renderer/shared/lib/utils/assets.ts +++ b/src/renderer/shared/lib/utils/assets.ts @@ -1,4 +1,4 @@ -import { type Asset, AssetType, type OrmlExtras, StakingType, type StatemineExtras } from '@shared/core/types/asset'; +import { type Asset, AssetType, type OrmlExtras, StakingType, type StatemineExtras } from '@/shared/core/types/asset'; /** * Get ID of the asset by type diff --git a/src/renderer/shared/lib/utils/balance.ts b/src/renderer/shared/lib/utils/balance.ts index 22afc969bd..0890bc0e72 100644 --- a/src/renderer/shared/lib/utils/balance.ts +++ b/src/renderer/shared/lib/utils/balance.ts @@ -1,7 +1,7 @@ import { BN, BN_TEN, BN_ZERO } from '@polkadot/util'; import { default as BigNumber } from 'bignumber.js'; -import { type Asset, type AssetBalance, type Balance, LockTypes, type Unlocking } from '@shared/core'; +import { type Asset, type AssetBalance, type Balance, LockTypes, type Unlocking } from '@/shared/core'; import { ZERO_BALANCE } from './constants'; diff --git a/src/renderer/shared/lib/utils/chains.ts b/src/renderer/shared/lib/utils/chains.ts index 41a6bd5ad7..8aa411807f 100644 --- a/src/renderer/shared/lib/utils/chains.ts +++ b/src/renderer/shared/lib/utils/chains.ts @@ -1,6 +1,6 @@ import { WellKnownChain } from '@substrate/connect'; -import { type AccountId, type Address, type ChainId, type Explorer, type HexString } from '@shared/core'; +import { type AccountId, type Address, type ChainId, type Explorer, type HexString } from '@/shared/core'; import { toAddress } from './address'; import { RelayChains, SS58_DEFAULT_PREFIX } from './constants'; diff --git a/src/renderer/shared/lib/utils/constants.ts b/src/renderer/shared/lib/utils/constants.ts index bae62eb6c4..177b40c284 100644 --- a/src/renderer/shared/lib/utils/constants.ts +++ b/src/renderer/shared/lib/utils/constants.ts @@ -1,6 +1,6 @@ import { BN, BN_THOUSAND, BN_TWO } from '@polkadot/util'; -import { type AccountId, type ChainId } from '@shared/core'; +import { type AccountId, type ChainId } from '@/shared/core'; export const ZERO_BALANCE = '0'; diff --git a/src/renderer/shared/lib/utils/strings.ts b/src/renderer/shared/lib/utils/strings.ts index 97f21450ab..3ce492aecb 100644 --- a/src/renderer/shared/lib/utils/strings.ts +++ b/src/renderer/shared/lib/utils/strings.ts @@ -1,4 +1,4 @@ -import { type Identity } from '@shared/core/types/identity'; +import { type Identity } from '@/shared/core/types/identity'; /** * Validate Polkadot Vault QR format diff --git a/src/renderer/shared/lib/utils/substrate.ts b/src/renderer/shared/lib/utils/substrate.ts index c9cd133b46..7a224958ed 100644 --- a/src/renderer/shared/lib/utils/substrate.ts +++ b/src/renderer/shared/lib/utils/substrate.ts @@ -18,7 +18,7 @@ import { type HexString, type ProxyType, XcmPallets, -} from '@shared/core'; +} from '@/shared/core'; import { XcmTransferType } from '../../api/xcm'; import { DEFAULT_TIME, ONE_DAY, THRESHOLD } from './constants'; diff --git a/src/renderer/app/providers/context/ConfirmContext/ConfirmContext.test.tsx b/src/renderer/shared/providers/ConfirmContext/ConfirmContext.test.tsx similarity index 94% rename from src/renderer/app/providers/context/ConfirmContext/ConfirmContext.test.tsx rename to src/renderer/shared/providers/ConfirmContext/ConfirmContext.test.tsx index 38e280370f..41ef6e88a1 100644 --- a/src/renderer/app/providers/context/ConfirmContext/ConfirmContext.test.tsx +++ b/src/renderer/shared/providers/ConfirmContext/ConfirmContext.test.tsx @@ -1,10 +1,10 @@ import { act, render, renderHook, screen } from '@testing-library/react'; -import { useToggle } from '@shared/lib/hooks'; +import { useToggle } from '@/shared/lib/hooks'; import { ConfirmDialogProvider, useConfirmContext } from './ConfirmContext'; -jest.mock('@shared/lib/hooks'); +jest.mock('@/shared/lib/hooks'); describe('context/ConfirmContext', () => { afterEach(() => { diff --git a/src/renderer/app/providers/context/ConfirmContext/ConfirmContext.tsx b/src/renderer/shared/providers/ConfirmContext/ConfirmContext.tsx similarity index 92% rename from src/renderer/app/providers/context/ConfirmContext/ConfirmContext.tsx rename to src/renderer/shared/providers/ConfirmContext/ConfirmContext.tsx index 701f6b9ab2..67e76189f3 100644 --- a/src/renderer/app/providers/context/ConfirmContext/ConfirmContext.tsx +++ b/src/renderer/shared/providers/ConfirmContext/ConfirmContext.tsx @@ -9,9 +9,9 @@ import { useState, } from 'react'; -import { useToggle } from '@shared/lib/hooks'; -import { DEFAULT_TRANSITION } from '@shared/lib/utils'; -import { ConfirmModal, FootnoteText, SmallTitleText } from '@shared/ui'; +import { useToggle } from '@/shared/lib/hooks'; +import { DEFAULT_TRANSITION } from '@/shared/lib/utils'; +import { ConfirmModal, FootnoteText, SmallTitleText } from '@/shared/ui'; type Pallet = 'primary' | 'secondary' | 'error'; diff --git a/src/renderer/app/providers/context/ConfirmContext/index.ts b/src/renderer/shared/providers/ConfirmContext/index.ts similarity index 100% rename from src/renderer/app/providers/context/ConfirmContext/index.ts rename to src/renderer/shared/providers/ConfirmContext/index.ts diff --git a/src/renderer/shared/providers/index.ts b/src/renderer/shared/providers/index.ts new file mode 100644 index 0000000000..e401e8e39d --- /dev/null +++ b/src/renderer/shared/providers/index.ts @@ -0,0 +1 @@ +export { ConfirmDialogProvider, useConfirmContext } from './ConfirmContext'; diff --git a/src/renderer/shared/ui-entities/Account/Account.stories.tsx b/src/renderer/shared/ui-entities/Account/Account.stories.tsx index a5b7f47a75..0b137ff833 100644 --- a/src/renderer/shared/ui-entities/Account/Account.stories.tsx +++ b/src/renderer/shared/ui-entities/Account/Account.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react'; -import { createBaseAccount, polkadotChain } from '@shared/mocks'; +import { createBaseAccount, polkadotChain } from '@/shared/mocks'; import { Account } from './Account'; diff --git a/src/renderer/shared/ui-entities/Account/Account.tsx b/src/renderer/shared/ui-entities/Account/Account.tsx index 6b402daa1b..81b312b39b 100644 --- a/src/renderer/shared/ui-entities/Account/Account.tsx +++ b/src/renderer/shared/ui-entities/Account/Account.tsx @@ -1,8 +1,9 @@ import { memo } from 'react'; import { type Account as AccountType, type Chain } from '@/shared/core'; -import { toAddress } from '@shared/lib/utils'; -import { AccountExplorers, Address } from '@shared/ui-entities'; +import { toAddress } from '@/shared/lib/utils'; +import { AccountExplorers } from '../AccountExplorer/AccountExplorers'; +import { Address } from '../Address/Address'; type Props = { account: AccountType; diff --git a/src/renderer/shared/ui-entities/AccountExplorer/AccountExplorers.tsx b/src/renderer/shared/ui-entities/AccountExplorer/AccountExplorers.tsx index e070ae82bd..d6cafe3356 100644 --- a/src/renderer/shared/ui-entities/AccountExplorer/AccountExplorers.tsx +++ b/src/renderer/shared/ui-entities/AccountExplorer/AccountExplorers.tsx @@ -1,7 +1,7 @@ import { type PropsWithChildren, memo } from 'react'; -import { useI18n } from '@/app/providers'; import { type AccountId, type Chain } from '@/shared/core'; +import { useI18n } from '@/shared/i18n'; import { copyToClipboard, getAccountExplorer, toAddress } from '@/shared/lib/utils'; import { ExplorerLink, FootnoteText, HelpText, IconButton, Separator } from '@/shared/ui'; import { Box, Popover } from '@/shared/ui-kit'; diff --git a/src/renderer/shared/ui-entities/Address/Address.stories.tsx b/src/renderer/shared/ui-entities/Address/Address.stories.tsx index 15d3d74db8..3cbd80d9a4 100644 --- a/src/renderer/shared/ui-entities/Address/Address.stories.tsx +++ b/src/renderer/shared/ui-entities/Address/Address.stories.tsx @@ -1,8 +1,8 @@ import { type Meta, type StoryObj } from '@storybook/react'; import { expect, within } from '@storybook/test'; +import { TEST_ADDRESS } from '@/shared/lib/utils'; import { Box } from '@/shared/ui-kit'; -import { TEST_ADDRESS } from '@shared/lib/utils'; import { Address } from './Address'; diff --git a/src/renderer/shared/ui-entities/Address/Address.tsx b/src/renderer/shared/ui-entities/Address/Address.tsx index d098069a4e..7a5391e7e8 100644 --- a/src/renderer/shared/ui-entities/Address/Address.tsx +++ b/src/renderer/shared/ui-entities/Address/Address.tsx @@ -2,7 +2,7 @@ import { memo } from 'react'; import { type Address as AddressType, type XOR } from '@/shared/core'; import { cnTw } from '@/shared/lib/utils'; -import { Identicon } from '@/shared/ui'; +import { Identicon } from '@/shared/ui/Identicon/Identicon'; import { Hash } from '../Hash/Hash'; type AddressVariant = 'full' | 'truncate'; diff --git a/src/renderer/shared/ui-entities/Hash/Hash.stories.tsx b/src/renderer/shared/ui-entities/Hash/Hash.stories.tsx index 156c4365c6..4f078259c3 100644 --- a/src/renderer/shared/ui-entities/Hash/Hash.stories.tsx +++ b/src/renderer/shared/ui-entities/Hash/Hash.stories.tsx @@ -1,8 +1,8 @@ import { type Meta, type StoryObj } from '@storybook/react'; import { expect, within } from '@storybook/test'; +import { TEST_HASH } from '@/shared/lib/utils'; import { Box } from '@/shared/ui-kit'; -import { TEST_HASH } from '@shared/lib/utils'; import { Hash } from './Hash'; diff --git a/src/renderer/shared/ui-entities/TransactionDetails/TransactionDetails.tsx b/src/renderer/shared/ui-entities/TransactionDetails/TransactionDetails.tsx index 75725ac61a..7b47628411 100644 --- a/src/renderer/shared/ui-entities/TransactionDetails/TransactionDetails.tsx +++ b/src/renderer/shared/ui-entities/TransactionDetails/TransactionDetails.tsx @@ -1,8 +1,10 @@ import { type PropsWithChildren, memo, useMemo } from 'react'; -import { useI18n } from '@/app/providers'; import { type Account, type Chain, type Wallet } from '@/shared/core'; -import { DetailRow, FootnoteText, Separator } from '@/shared/ui'; +import { useI18n } from '@/shared/i18n'; +import { DetailRow } from '@/shared/ui/DetailRow/DetailRow'; +import { Separator } from '@/shared/ui/Separator/Separator'; +import { FootnoteText } from '@/shared/ui/Typography/index'; import { Box } from '@/shared/ui-kit'; import { WalletIcon, walletUtils } from '@/entities/wallet'; import { Account as AccountComponent } from '../Account/Account'; diff --git a/src/renderer/shared/ui-kit/Dropdown/Dropdown.tsx b/src/renderer/shared/ui-kit/Dropdown/Dropdown.tsx index 77766bba5d..ca770c55a6 100644 --- a/src/renderer/shared/ui-kit/Dropdown/Dropdown.tsx +++ b/src/renderer/shared/ui-kit/Dropdown/Dropdown.tsx @@ -3,7 +3,7 @@ import { type PropsWithChildren, type ReactNode, createContext, useContext, useM import { type XOR } from '@/shared/core'; import { cnTw } from '@/shared/lib/utils'; -import { Checkbox } from '@/shared/ui'; +import { Checkbox } from '@/shared/ui/Checkbox/Checkbox'; import { ScrollArea } from '../ScrollArea/ScrollArea'; import { Surface } from '../Surface/Surface'; import { useTheme } from '../Theme/useTheme'; diff --git a/src/renderer/shared/ui-kit/Modal/Modal.tsx b/src/renderer/shared/ui-kit/Modal/Modal.tsx index 9f8b0f59a2..8c04a6bafd 100644 --- a/src/renderer/shared/ui-kit/Modal/Modal.tsx +++ b/src/renderer/shared/ui-kit/Modal/Modal.tsx @@ -2,8 +2,8 @@ import * as Dialog from '@radix-ui/react-dialog'; import { isObject } from 'lodash'; import { Children, type PropsWithChildren, type ReactNode } from 'react'; -import { HeaderTitleText, IconButton } from '@/shared/ui'; -import { cnTw, nonNullable } from '@shared/lib/utils'; +import { cnTw, nonNullable } from '@/shared/lib/utils'; +import { IconButton } from '@/shared/ui/Buttons/IconButton/IconButton'; import { ScrollArea } from '../ScrollArea/ScrollArea'; import { useTheme } from '../Theme/useTheme'; @@ -72,7 +72,7 @@ const Title = ({ action, close, children }: TitleProps) => { return (