|
18 | 18 | } from '@core/profile'
|
19 | 19 | import {
|
20 | 20 | formatTokenAmountBestMatch,
|
21 |
| - generateAndStoreActivitiesForAllAccounts, |
22 |
| - refreshAccountAssetsForActiveProfile, |
| 21 | + generateAndStoreActivitiesForAllWallets, |
| 22 | + refreshWalletAssetsForActiveProfile, |
23 | 23 | } from '@core/wallet'
|
24 | 24 | import {
|
25 | 25 | Button,
|
|
41 | 41 | export let searchForBalancesOnLoad = false
|
42 | 42 | export let hasUsedBalanceFinder = false
|
43 | 43 | export let showConsolidation = false
|
44 |
| - export let consolidateAccountsOnLoad = false |
| 44 | + export let consolidateWalletsOnLoad = false |
45 | 45 | export let title: string
|
46 | 46 | export let body: string
|
47 | 47 | export let searchInCurrentWallet: boolean = false
|
|
59 | 59 | ? $visibleActiveWallets?.filter((_wallet) => _wallet.id === $selectedWalletId)
|
60 | 60 | : $visibleActiveWallets
|
61 | 61 | $: searchForBalancesOnLoad && !$isStrongholdLocked && onFindBalancesClick()
|
62 |
| - $: consolidateAccountsOnLoad && !$isStrongholdLocked && onConsolidateAccountsClick() |
| 62 | + $: consolidateWalletsOnLoad && !$isStrongholdLocked && onConsolidateWalletsClick() |
63 | 63 | $: totalBalance = sumBalanceForWallets($visibleActiveWallets)
|
64 | 64 | $: searchInCurrentWallet, (shouldInitSearch = true)
|
65 | 65 | $: searchAlgorithm = searchInCurrentWallet
|
|
79 | 79 | }
|
80 | 80 | }
|
81 | 81 |
|
82 |
| - async function onConsolidateAccountsClick(): Promise<void> { |
| 82 | + async function onConsolidateWalletsClick(): Promise<void> { |
83 | 83 | if ($isSoftwareProfile && $isStrongholdLocked) {
|
84 | 84 | openUnlockStrongholdPopup(false, true)
|
85 | 85 | } else {
|
86 |
| - await handleAction(consolidateProfileAccounts) |
| 86 | + await handleAction(consolidateProfileWallets) |
87 | 87 | }
|
88 | 88 | }
|
89 | 89 |
|
|
99 | 99 | shouldInitSearch = false
|
100 | 100 | }
|
101 | 101 |
|
102 |
| - async function consolidateProfileAccounts(): Promise<void> { |
| 102 | + async function consolidateProfileWallets(): Promise<void> { |
103 | 103 | const consolidationPromises: Promise<void>[] = []
|
104 | 104 |
|
105 | 105 | for (const wallet of get(visibleActiveWallets)) {
|
|
134 | 134 | }
|
135 | 135 | }
|
136 | 136 |
|
137 |
| - function openUnlockStrongholdPopup(searchForBalancesOnLoad: boolean, consolidateAccountsOnLoad: boolean) { |
| 137 | + function openUnlockStrongholdPopup(searchForBalancesOnLoad: boolean, consolidateWalletsOnLoad: boolean) { |
138 | 138 | openPopup({
|
139 | 139 | id: PopupId.UnlockStronghold,
|
140 | 140 | props: {
|
|
143 | 143 | id: PopupId.BalanceFinder,
|
144 | 144 | props: {
|
145 | 145 | searchForBalancesOnLoad,
|
146 |
| - consolidateAccountsOnLoad, |
| 146 | + consolidateWalletsOnLoad, |
147 | 147 | showConsolidation,
|
148 | 148 | hasUsedBalanceFinder,
|
149 | 149 | title,
|
|
172 | 172 |
|
173 | 173 | onDestroy(async () => {
|
174 | 174 | if (hasUsedBalanceFinder) {
|
175 |
| - await refreshAccountAssetsForActiveProfile() |
176 |
| - await generateAndStoreActivitiesForAllAccounts() |
| 175 | + await refreshWalletAssetsForActiveProfile() |
| 176 | + await generateAndStoreActivitiesForAllWallets() |
177 | 177 | loadNftsForActiveProfile()
|
178 | 178 | }
|
179 | 179 | })
|
|
252 | 252 | />
|
253 | 253 | <Button
|
254 | 254 | classes="w-full"
|
255 |
| - onClick={onConsolidateAccountsClick} |
| 255 | + onClick={onConsolidateWalletsClick} |
256 | 256 | disabled={isBusy || isTransferring}
|
257 | 257 | isBusy={isTransferring}
|
258 | 258 | busyMessage={localize('popups.minimizeStorageDeposit.title')}
|
|
0 commit comments