Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: Clean up imports #8008

Merged
merged 15 commits into from
Feb 16, 2024
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions packages/desktop/components/Proposals.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { Filter, ProposalCard } from '@components'
import { SearchInput, Text } from '@ui'
import { ProposalCard } from '@components'
import { SearchInput, Text, Filter } from '@ui'
import { FontWeight } from '@ui/enums'

import { localize } from '@core/i18n'
Expand Down
3 changes: 1 addition & 2 deletions packages/desktop/components/WalletActivity.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
selectedWalletActivities,
setAsyncStatusOfWalletActivities,
} from '@core/wallet'
import { ActivityTile, Text, TextInput, TogglableButton, FontWeight } from '@ui'
import { Filter } from '@components'
import { ActivityTile, Text, TextInput, TogglableButton, FontWeight, Filter } from '@ui'
import features from '@features/features'
import { debounce, getMonthYear } from '@core/utils'
import VirtualList from '@sveltejs/svelte-virtual-list'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { resetMintTokenDetails } from '@core/wallet'

import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

$: hasAccounts = $selectedWallet?.accountOutputs.length > 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { showAppNotification } from '@auxiliary/notification'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

function refreshTokenMetadata(): void {
refreshWalletAssetsForActiveProfile(true)
Expand Down
1 change: 0 additions & 1 deletion packages/desktop/components/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './buttons'
export * from './filter'
export * from './menu-buttons'
export * from './modals'
export * from './panes'
Expand Down
1 change: 0 additions & 1 deletion packages/desktop/components/modals/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { default as WalletActionsMenu } from './WalletActionsMenu.svelte'
export { default as WalletSwitcherModal } from './WalletSwitcherModal.svelte'
export { default as FilterModal } from './FilterModal.svelte'
export { default as VestingModal } from './VestingModal.svelte'
export { default as AccountManagementMenu } from './AccountManagementMenu.svelte'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, KeyValueBox, Text, FontWeight, TextType } from 'shared/components'
import { Button, KeyValueBox, Text, FontWeight, TextType } from '@ui'
import { localize } from '@core/i18n'
import { checkActiveProfileAuth, getBaseToken } from '@core/profile'
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
NftActivityDetails,
Text,
TextType,
} from 'shared/components'
import { TextHintVariant } from 'shared/components/enums'
} from '@ui'
import { TextHintVariant } from '@ui/enums'
import { onMount } from 'svelte'

export let activityId: string
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/AddProposalPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import { activeWallets, updateActiveWalletPersistedData } from '@core/profile'
import { truncateString } from '@core/utils/string'
import type { Auth } from '@iota/sdk/out/types'
import { Button, Checkbox, NodeInput, Text, TextInput, TextType } from 'shared/components'
import { HTMLButtonType } from 'shared/components/enums'
import { Button, Checkbox, NodeInput, Text, TextInput, TextType } from '@ui'
import { HTMLButtonType } from '@ui/enums'

export let initialEventId: string
export let initialNodeUrl: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { setClipboard, truncateString } from '@core/utils'
import { AccountAddress } from '@iota/sdk/out/types'
import VirtualList from '@sveltejs/svelte-virtual-list'
import { Button, FontWeight, KeyValueBox, Spinner, Text, TextType } from 'shared/components'
import { Button, FontWeight, KeyValueBox, Spinner, Text, TextType } from '@ui'
import { onMount } from 'svelte'

interface AddressHistory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { localize } from '@core/i18n'
import { Button, Logo, Text, ExportStrongholdButton, TextType } from 'shared/components'
import { Button, Logo, Text, ExportStrongholdButton, TextType } from '@ui'
import { closePopup } from '@auxiliary/popup'
import { Logo as LogoEnum } from 'shared/components/enums'
import { Logo as LogoEnum } from '@ui/enums'

const busy = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import { consolidateOutputs } from '@core/wallet/actions/consolidateOutputs'
import { getStorageDepositFromOutput } from '@core/wallet/utils/generateActivity/helper'
import { UnlockCondition, UnlockConditionType, CommonOutput, AccountOutput } from '@iota/sdk/out/types'
import { BalanceSummarySection, Button, FontWeight, Text, TextType } from 'shared/components'
import { TextHintVariant } from 'shared/components/enums'
import { BalanceSummarySection, Button, FontWeight, Text, TextType } from '@ui'
import { TextHintVariant } from '@ui/enums'
import features from '@features/features'

interface BalanceBreakdown {
Expand Down
15 changes: 2 additions & 13 deletions packages/desktop/components/popups/BalanceFinderPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,8 @@
generateAndStoreActivitiesForAllWallets,
refreshWalletAssetsForActiveProfile,
} from '@core/wallet'
import {
Button,
FontWeight,
KeyValueBox,
Text,
TextHint,
TextType,
Icon,
Tile,
Spinner,
Checkbox,
} from 'shared/components'
import { TextHintVariant } from 'shared/components/enums'
import { Button, FontWeight, KeyValueBox, Text, TextHint, TextType, Icon, Tile, Spinner, Checkbox } from '@ui'
import { TextHintVariant } from '@ui/enums'
import { onDestroy } from 'svelte'
import VirtualList from '@sveltejs/svelte-virtual-list'
import { consolidateOutputs } from '@core/wallet/actions/consolidateOutputs'
Expand Down Expand Up @@ -134,7 +123,7 @@
}
}

function openUnlockStrongholdPopup(searchForBalancesOnLoad: boolean, consolidateWalletsOnLoad: boolean) {

Check warning on line 126 in packages/desktop/components/popups/BalanceFinderPopup.svelte

View workflow job for this annotation

GitHub Actions / lint

Missing return type on function
openPopup({
id: PopupId.UnlockStronghold,
props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import { Button, Text, TextHint, FontWeight, TextType, ButtonVariant, KeyValueBox } from 'shared/components'
import { Button, Text, TextHint, FontWeight, TextType, ButtonVariant, KeyValueBox } from '@ui'
import { localize } from '@core/i18n'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { burnAsset, formatTokenAmountBestMatch, IAsset } from '@core/wallet'
import { checkActiveProfileAuth } from '@core/profile'
import { handleError } from '@core/error/handlers'
import { onMount } from 'svelte'
import { selectedWallet } from '@core/wallet'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

export let asset: IAsset
export let rawAmount: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import { Button, Text, TextHint, FontWeight, TextType, AssetAmountInput } from 'shared/components'
import { Button, Text, TextHint, FontWeight, TextType, AssetAmountInput } from '@ui'
import { localize } from '@core/i18n'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { IAsset } from '@core/wallet'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

export let asset: IAsset
export let rawAmount: string = '0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from 'svelte'
import { get } from 'svelte/store'
import { Button, KeyValueBox, Text, TextType, TextHint } from 'shared/components'
import { Button, KeyValueBox, Text, TextType, TextHint } from '@ui'
import {
appUpdateBusy,
checkForAppUpdate,
Expand All @@ -14,7 +14,7 @@
import { formatDate, localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
import features from '@features/features'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

let hasAutoUpdate = false

Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/ConfirmationPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { Button, Text, TextHint, FontWeight, TextType, ButtonVariant } from 'shared/components'
import { Button, Text, TextHint, FontWeight, TextType, ButtonVariant } from '@ui'
import { localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
import { handleError } from '@core/error/handlers'
import { onMount } from 'svelte'
import { selectedWallet } from '@core/wallet'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

export let title: string
export let description: string = ''
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/ConnectLedgerPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { localize } from '@core/i18n'
import { LedgerConnectionState, ledgerAppName, ledgerConnectionState } from '@core/ledger'
import { isFunction } from '@core/utils'
import { Button, LedgerAnimation, Text, TextHint, FontWeight, TextType } from 'shared/components'
import { Button, LedgerAnimation, Text, TextHint, FontWeight, TextType } from '@ui'
import { closePopup } from '@auxiliary/popup'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'
import { AnimationEnum } from '@auxiliary/animation'

export let onCancel: () => void
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/DeepLinkErrorPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { localize } from '@core/i18n'
import { Text, Button, TextHint, FontWeight } from 'shared/components'
import { Text, Button, TextHint, FontWeight } from '@ui'
import { closePopup } from '@auxiliary/popup'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

export let error: Error
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, PasswordInput, Text, ButtonVariant } from 'shared/components'
import { Button, PasswordInput, Text, ButtonVariant } from '@ui'
import { isSoftwareProfile } from '@core/profile'
import { localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { localize } from '@core/i18n'
import { isSoftwareProfile } from '@core/profile'
import { handleError } from '@core/error/handlers/handleError'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'
import { selectedWallet } from '@core/wallet/stores'
import { setStrongholdPassword } from '@core/wallet/actions'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Text, TextType, BoxedIcon } from 'shared/components'
import { Text, TextType, BoxedIcon } from '@ui'
import { Icon as IconEnum } from '@auxiliary/icon'
import { localize } from '@core/i18n'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/components/popups/ErrorLogPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, Text } from 'shared/components'
import { Button, Text } from '@ui'
import { errorLog } from '@core/error'
import { localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { localize } from '@core/i18n'
import { nodeInfo, nodeInfoNetworkName } from '@core/network'
import { closePopup } from '@auxiliary/popup'
import { Button, Error, Text, FontWeight, TextType } from 'shared/components'
import { Button, Error, Text, FontWeight, TextType } from '@ui'
import { handleError } from '@core/error/handlers/handleError'

let isBusy = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { LedgerAnimation, Button, Text, TextType } from 'shared/components'
import { LedgerAnimation, Button, Text, TextType } from '@ui'
import { closePopup } from '@auxiliary/popup'
import { LedgerAppName, ledgerAppName } from '@core/ledger'
import { localize } from '@core/i18n'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { LedgerAnimation, Button, Link, Text, TextType } from 'shared/components'
import { LedgerAnimation, Button, Link, Text, TextType } from '@ui'
import { openUrlInBrowser } from '@core/app'
import { closePopup } from '@auxiliary/popup'
import { localize } from '@core/i18n'
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/components/popups/LegalUpdatePopup.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, Checkbox, Text, Link } from 'shared/components'
import { Button, Checkbox, Text, Link } from '@ui'
import { localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { Button, Text, TextHint, AssetAmountInput } from 'shared/components'
import { HTMLButtonType, TextType, TextHintVariant } from 'shared/components/enums'
import { Button, Text, TextHint, AssetAmountInput } from '@ui'
import { HTMLButtonType, TextType, TextHintVariant } from '@ui/enums'
import { selectedWallet } from '@core/wallet/stores'
import { handleError } from '@core/error/handlers'
import { setVotingPower } from '@contexts/governance/actions'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
IMintTokenDetails,
} from '@core/wallet'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { Button, KeyValueBox, Text, FontWeight, TextType } from 'shared/components'
import { Button, KeyValueBox, Text, FontWeight, TextType } from '@ui'
import { onMount } from 'svelte'
import { selectedWallet } from '@core/wallet'
import { handleError } from '@core/error/handlers/handleError'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
import { localize } from '@core/i18n'
import { setMintTokenDetails, mintTokenDetails, IMintTokenDetails } from '@core/wallet'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import {
Button,
Error,
NumberInput,
Text,
TextInput,
OptionalInput,
FontWeight,
AccountInput,
} from 'shared/components'
import { Button, Error, NumberInput, Text, TextInput, OptionalInput, FontWeight, AccountInput } from '@ui'
import { onMount } from 'svelte'
import { MAX_SUPPORTED_DECIMALS } from '@core/wallet/constants/max-supported-decimals.constants'
import { handleError } from '@core/error/handlers/handleError'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte'
import { Button, Text, FontWeight, NftImageOrIconBox, Tabs, KeyValueBox, NftSize } from 'shared/components'
import { Button, Text, FontWeight, NftImageOrIconBox, Tabs, KeyValueBox, NftSize } from '@ui'
import { localize } from '@core/i18n'
import { getClient } from '@core/wallet/actions'
import { selectedWallet } from '@core/wallet'
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/components/popups/MintNftFormPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte'
import { Button, Error, FontWeight, OptionalInput, Text, TextInput, TextType, TooltipIcon } from 'shared/components'
import { Button, Error, FontWeight, OptionalInput, Text, TextInput, TextType, TooltipIcon } from '@ui'
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { BaseError } from '@core/error/classes'
import { handleError } from '@core/error/handlers/handleError'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, HTMLButtonType, Text, TextInput, TextType } from 'shared/components'
import { Button, HTMLButtonType, Text, TextInput, TextType } from '@ui'
import type { Auth } from '@iota/sdk/out/types'
import { handleError } from '@core/error/handlers'
import { localize } from '@core/i18n'
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/components/popups/NodeInfoPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte'
import { Button, Checkbox, CopyableBox, Spinner, Text } from 'shared/components'
import { Button, Checkbox, CopyableBox, Spinner, Text } from '@ui'
import { formatNumber, localize } from '@core/i18n'
import { INode } from '@core/network'
import { closePopup } from '@auxiliary/popup'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { truncateString } from '@core/utils'
import { formatTokenAmountBestMatch } from '@core/wallet'
import VirtualList from '@sveltejs/svelte-virtual-list'
import { Button, FontWeight, KeyValueBox, Text, TextType } from 'shared/components'
import { Button, FontWeight, KeyValueBox, Text, TextType } from '@ui'

export let payout: IVestingPayout

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/components/popups/RemoveNode.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, Text } from 'shared/components'
import { Button, Text } from '@ui'
import { closePopup } from '@auxiliary/popup'
import { localize } from '@core/i18n'

Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/RemoveProposalPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import { localize } from '@core/i18n'
import { updateActiveWalletPersistedData } from '@core/profile/actions'
import { governanceRouter } from '@core/router'
import { Button, Text, TextHint, TextType } from 'shared/components'
import { ButtonVariant, TextHintVariant } from 'shared/components/enums'
import { Button, Text, TextHint, TextType } from '@ui'
import { ButtonVariant, TextHintVariant } from '@ui/enums'

function onCancelClick(): void {
closePopup()
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/RevotePopup.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { Button, Text, TextHint, HTMLButtonType, TextType } from 'shared/components'
import { Button, Text, TextHint, HTMLButtonType, TextType } from '@ui'
import { selectedWallet } from '@core/wallet/stores'
import { localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
import { checkActiveProfileAuth } from '@core/profile/actions'
import { vote } from '@contexts/governance/actions'
import { TextHintVariant } from 'shared/components/enums'
import { TextHintVariant } from '@ui/enums'

$: hasGovernanceTransactionInProgress =
$selectedWallet?.hasVotingPowerTransactionInProgress || $selectedWallet?.hasVotingTransactionInProgress
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/components/popups/StopVotingPopup.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { Button, Text, TextType, TextHint } from 'shared/components'
import { ButtonVariant, TextHintVariant } from 'shared/components/enums'
import { Button, Text, TextType, TextHint } from '@ui'
import { ButtonVariant, TextHintVariant } from '@ui/enums'
import { closePopup } from '@auxiliary/popup'
import { stopVotingForProposal } from '@contexts/governance/actions'
import { selectedProposal } from '@contexts/governance/stores'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { localize } from '@core/i18n'
import { closePopup } from '@auxiliary/popup'
import { Button, Text, TextInput, FontWeight, TextType } from 'shared/components'
import { Button, Text, TextInput, FontWeight, TextType } from '@ui'

const PREFIX = process.env.APP_PROTOCOL + '://'
let url: string = PREFIX
Expand Down
Loading
Loading