Skip to content

Commit 312a8a8

Browse files
refactor: Remove Account debris (#7909)
* refactor(2.0): Dynamic password * refactor(2.0): Remove Profile Manager (wip) * clean up and fix * clean up * clean up more code * clean up * adapt and remove for profile-manager related code * clean up more code * fmt * more cleanup * more cleanup * small tweaks * more cleanup * format * update * clean up * https://api.testnet.shimmer.network * revert Wallet.svelte * clean up * remove account debris * clean up * fix --------- Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
1 parent 6808007 commit 312a8a8

File tree

61 files changed

+204
-217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+204
-217
lines changed
File renamed without changes.

packages/desktop/components/AccountSummary.svelte renamed to packages/desktop/components/WalletSummary.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { AccountActionsButton } from '@components'
2+
import { WalletActionsButton } from '@components'
33
import { Text, TogglableAssetBalanceLabel } from '@ui'
44
import { TextType } from '@ui/enums'
55
@@ -16,14 +16,14 @@
1616
$: ({ baseCoin } = $selectedWalletAssets[$activeProfile?.network.id])
1717
</script>
1818

19-
<account-summary class="block relative space-y-4">
19+
<wallet-summary class="block relative space-y-4">
2020
<div class="flex flex-row items-center justify-between">
2121
<Text type={TextType.h5} classes="text-left">
2222
{localize('general.balanceWithNetwork', { values: { network: fomattedNetworkName } })}
2323
</Text>
24-
<AccountActionsButton />
24+
<WalletActionsButton />
2525
</div>
2626
<div class="flex flex-col flex-wrap items-start space-y-1">
2727
<TogglableAssetBalanceLabel asset={baseCoin} />
2828
</div>
29-
</account-summary>
29+
</wallet-summary>

packages/desktop/components/buttons/menu-buttons/AccountActionsButton.svelte renamed to packages/desktop/components/buttons/menu-buttons/WalletActionsButton.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
let modal: Modal
66
</script>
77

8-
<account-actions-button class="block relative">
8+
<wallet-actions-button class="block relative">
99
<MeatballMenuButton onClick={modal?.toggle} />
1010
<WalletActionsMenu bind:modal position={{ right: '0' }} classes="mt-1.5" />
11-
</account-actions-button>
11+
</wallet-actions-button>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default as AccountActionsButton } from './AccountActionsButton.svelte'
1+
export { default as WalletActionsButton } from './WalletActionsButton.svelte'

packages/desktop/components/buttons/popup-buttons/RefreshTokenMetadataButton.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import { OnboardingButton } from '@ui'
33
44
import { localize } from '@core/i18n'
5-
import { refreshAccountAssetsForActiveProfile } from '@core/wallet'
5+
import { refreshWalletAssetsForActiveProfile } from '@core/wallet'
66
77
import { showAppNotification } from '@auxiliary/notification'
88
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
99
import { TextHintVariant } from 'shared/components/enums'
1010
1111
function refreshTokenMetadata(): void {
12-
refreshAccountAssetsForActiveProfile(true)
12+
refreshWalletAssetsForActiveProfile(true)
1313
showAppNotification({
1414
type: 'success',
1515
message: localize('notifications.refreshTokenMetadata.success'),

packages/desktop/components/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export * from './modals'
55
export * from './panes'
66
export * from './popups'
77

8-
export { default as AccountActivity } from './AccountActivity.svelte'
9-
export { default as AccountSummary } from './AccountSummary.svelte'
8+
export { default as WalletActivity } from './WalletActivity.svelte'
9+
export { default as WalletSummary } from './WalletSummary.svelte'
1010
export { default as WalletSwitcher } from './WalletSwitcher.svelte'
1111
export { default as OnboardingLayout } from './OnboardingLayout.svelte'
1212
export { default as Proposals } from './Proposals.svelte'

packages/desktop/components/modals/VestingModal.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
</script>
1515

1616
<Modal bind:this={modal} {...$$restProps}>
17-
<account-actions-menu class="flex flex-col">
17+
<vesting-modal class="flex flex-col">
1818
<MenuItem
1919
icon={Icon.Search}
2020
title={localize('actions.viewVestingRewardsFinder')}
2121
onClick={onVestingFinderClick}
2222
/>
23-
</account-actions-menu>
23+
</vesting-modal>
2424
</Modal>

packages/desktop/components/modals/WalletActionsMenu.svelte

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { MenuItem, MenuItemVariant, Modal, ToggleHiddenAccountMenuItem } from '@ui'
2+
import { MenuItem, MenuItemVariant, Modal, ToggleHiddenWalletMenuItem } from '@ui'
33
44
import { localize } from '@core/i18n'
55
import { activeProfile, isActiveLedgerProfile } from '@core/profile/stores'
@@ -16,10 +16,10 @@
1616
1717
export let modal: Modal = undefined
1818
19-
const showDeleteAccount = false // TODO(2.0) It doesn't make sense to allow removing
19+
const showDeleteWallet = false // TODO(2.0) It doesn't make sense to allow removing
2020
// the wallet as there is only one for each profile at the moment
2121
22-
function onCustomiseAccountClick(): void {
22+
function onCustomiseWalletClick(): void {
2323
openPopup({ id: PopupId.ManageWallet })
2424
modal?.close()
2525
}
@@ -60,11 +60,11 @@
6060
})
6161
}
6262
63-
function onDeleteAccountClick(): void {
63+
function onDeleteWalletClick(): void {
6464
openPopup({
65-
id: PopupId.DeleteAccount,
65+
id: PopupId.DeleteWallet,
6666
props: {
67-
account: selectedWallet,
67+
wallet: selectedWallet,
6868
deleteWallet,
6969
},
7070
})
@@ -73,7 +73,7 @@
7373
</script>
7474

7575
<Modal bind:this={modal} {...$$restProps}>
76-
<account-actions-menu class="flex flex-col">
76+
<wallet-actions-menu class="flex flex-col">
7777
<MenuItem icon={Icon.Doc} title={localize('actions.viewBalanceBreakdown')} onClick={onViewBalanceClick} />
7878
{#if $activeProfile?.network?.id === NetworkId.Iota || $activeProfile?.network?.id === NetworkId.IotaAlphanet}
7979
<MenuItem
@@ -82,23 +82,23 @@
8282
onClick={onViewAddressHistoryClick}
8383
/>
8484
{/if}
85-
<MenuItem icon={Icon.Customize} title={localize('actions.customizeAcount')} onClick={onCustomiseAccountClick} />
85+
<MenuItem icon={Icon.Customize} title={localize('actions.customizeAcount')} onClick={onCustomiseWalletClick} />
8686
{#if $isActiveLedgerProfile}
8787
<MenuItem
8888
icon={Icon.Ledger}
8989
title={localize('actions.verifyDepositAddress')}
9090
onClick={onVerifyAddressClick}
9191
/>
9292
{/if}
93-
<ToggleHiddenAccountMenuItem onClick={modal?.close} />
93+
<ToggleHiddenWalletMenuItem onClick={modal?.close} />
9494
<hr />
95-
{#if showDeleteAccount}
95+
{#if showDeleteWallet}
9696
<MenuItem
9797
icon={Icon.Delete}
98-
title={localize('actions.deleteAccount')}
99-
onClick={onDeleteAccountClick}
98+
title={localize('actions.showDeleteWallet')}
99+
onClick={onDeleteWalletClick}
100100
variant={MenuItemVariant.Error}
101101
/>
102102
{/if}
103-
</account-actions-menu>
103+
</wallet-actions-menu>
104104
</Modal>

packages/desktop/components/modals/WalletSwitcherModal.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
async function scrollToSelectedWallet(): Promise<void> {
1919
await tick()
20-
const element = document.getElementById(`account-${$selectedWallet.id}`)
20+
const element = document.getElementById(`wallet-${$selectedWallet.id}`)
2121
element?.scrollIntoView({ behavior: 'auto' })
2222
}
2323
@@ -34,13 +34,13 @@
3434
size="large"
3535
position={{ top: '30px', left: '50%' }}
3636
>
37-
<account-list-container class="block p-4">
38-
<account-list class="flex flex-col space-y-1 max-h-96 scrollable-y">
37+
<wallet-list-container class="block p-4">
38+
<wallet-list class="flex flex-col space-y-1 max-h-96 scrollable-y">
3939
{#each $visibleActiveWallets as wallet}
40-
<WalletSwitcherMenuItem id="account-{wallet.id}" {wallet} onClick={modal?.close} />
40+
<WalletSwitcherMenuItem id="wallet-{wallet.id}" {wallet} onClick={modal?.close} />
4141
{/each}
42-
</account-list>
43-
</account-list-container>
42+
</wallet-list>
43+
</wallet-list-container>
4444
<hr />
4545
<button
4646
type="button"

packages/desktop/components/popups/AddProposalPopup.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
label={localize('views.governance.details.proposalInformation.eventId')}
140140
/>
141141
{#if !isEditMode}
142-
<Checkbox label={localize('popups.addProposal.addToAllAccounts')} bind:checked={isAddingForAllWallets} />
142+
<Checkbox label={localize('popups.addProposal.addToAllWallets')} bind:checked={isAddingForAllWallets} />
143143
{/if}
144144
</div>
145145
<div class="flex w-full space-x-4 mt-6">

0 commit comments

Comments
 (0)