diff --git a/packages/desktop/components/filter/Filter.svelte b/packages/desktop/components/filter/Filter.svelte index d85b9d2466..bd68e5a360 100644 --- a/packages/desktop/components/filter/Filter.svelte +++ b/packages/desktop/components/filter/Filter.svelte @@ -48,7 +48,7 @@ } - + {#if activeFilterCount} + import { showNotification } from '@auxiliary/notification' import { IconName, Menu } from '@bloomwalletio/ui' import { localize } from '@core/i18n' - import { PopupId, openPopup } from '../../lib/auxiliary/popup' + import { refreshAccountTokensForActiveProfile } from '@core/token/actions' + import { PopupId, closePopup, openPopup } from '../../lib/auxiliary/popup' let menu: Menu | undefined = undefined @@ -12,15 +14,45 @@ }) menu?.close() } + + function refreshTokenMetadata(): void { + refreshAccountTokensForActiveProfile(true) + showNotification({ + variant: 'success', + text: localize('notifications.refreshTokenMetadata.success'), + }) + closePopup() + } + + function onRefreshTokenMetadataClick(): void { + openPopup({ + id: PopupId.Confirmation, + props: { + title: localize('actions.refreshTokenMetadata'), + hint: localize('general.refreshTokenMetadataHint'), + warning: true, + confirmText: localize('actions.reset'), + onConfirm: refreshTokenMetadata, + }, + }) + menu?.close() + } - + + + diff --git a/packages/desktop/components/popup/Popup.svelte b/packages/desktop/components/popup/Popup.svelte index f3676a9195..152b26e511 100644 --- a/packages/desktop/components/popup/Popup.svelte +++ b/packages/desktop/components/popup/Popup.svelte @@ -12,6 +12,7 @@ import AddNodePopup from './popups/AddNodePopup.svelte' import AddProposalPopup from './popups/AddProposalPopup.svelte' import AliasConfirmationPopup from './popups/AliasConfirmationPopup.svelte' + import BalanceBreakdownPopup from './popups/BalanceBreakdownPopup.svelte' import BackupStrongholdPopup from './popups/BackupStrongholdPopup.svelte' import BurnNativeTokensPopup from './popups/BurnNativeTokensPopup.svelte' import BurnNativeTokensConfirmationPopup from './popups/BurnNativeTokensConfirmationPopup.svelte' @@ -43,7 +44,7 @@ import SignMessagePopup from './popups/SignMessagePopup.svelte' import SendFlowPopup from './popups/SendFlowPopup.svelte' import StopVotingPopup from './popups/StopVotingPopup.svelte' - import BalanceBreakdownPopup from './popups/BalanceBreakdownPopup.svelte' + import SyncAccountsPopup from './popups/SyncAccountsPopup.svelte' import TestDeepLinkFormPopup from './popups/TestDeepLinkFormPopup.svelte' import TokenInformationPopup from './popups/TokenInformationPopup.svelte' import UnlockStrongholdPopup from './popups/UnlockStrongholdPopup.svelte' @@ -51,7 +52,6 @@ import CheckForUpdatesPopup from './popups/CheckForUpdatesPopup.svelte' import VoteForProposal from './popups/VoteForProposalPopup.svelte' import VotingPowerToZeroPopup from './popups/VotingPowerToZeroPopup.svelte' - import WalletFinderPopup from './popups/WalletFinderPopup.svelte' export let id: PopupId export let props: any @@ -95,8 +95,10 @@ [PopupId.AddProposal]: AddProposalPopup, [PopupId.AliasConfirmation]: AliasConfirmationPopup, [PopupId.BackupStronghold]: BackupStrongholdPopup, - [PopupId.BurnNativeTokens]: BurnNativeTokensPopup, + [PopupId.BalanceBreakdown]: BalanceBreakdownPopup, [PopupId.BurnNativeTokensConfirmation]: BurnNativeTokensConfirmationPopup, + [PopupId.BurnNativeTokens]: BurnNativeTokensPopup, + [PopupId.CheckForUpdates]: CheckForUpdatesPopup, [PopupId.Confirmation]: ConfirmationPopup, [PopupId.ConnectLedger]: ConnectLedgerPopup, [PopupId.CreateAccount]: CreateAccountPopup, @@ -125,15 +127,13 @@ [PopupId.SendFlow]: SendFlowPopup, [PopupId.SignMessage]: SignMessagePopup, [PopupId.StopVoting]: StopVotingPopup, - [PopupId.BalanceBreakdown]: BalanceBreakdownPopup, + [PopupId.SyncAccounts]: SyncAccountsPopup, [PopupId.TestDeepLinkForm]: TestDeepLinkFormPopup, [PopupId.TokenInformation]: TokenInformationPopup, [PopupId.UnlockStronghold]: UnlockStrongholdPopup, [PopupId.VerifyLedgerTransaction]: VerifyLedgerTransactionPopup, - [PopupId.CheckForUpdates]: CheckForUpdatesPopup, [PopupId.VoteForProposal]: VoteForProposal, [PopupId.VotingPowerToZero]: VotingPowerToZeroPopup, - [PopupId.WalletFinder]: WalletFinderPopup, } function onKey(event: KeyboardEvent): void { diff --git a/packages/desktop/components/popup/popups/WalletFinderPopup.svelte b/packages/desktop/components/popup/popups/SyncAccountsPopup.svelte similarity index 100% rename from packages/desktop/components/popup/popups/WalletFinderPopup.svelte rename to packages/desktop/components/popup/popups/SyncAccountsPopup.svelte diff --git a/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts b/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts index 02a47a9532..eb8ea62488 100644 --- a/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts +++ b/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts @@ -5,6 +5,7 @@ export enum PopupId { AddProposal = 'addProposal', AliasConfirmation = 'aliasConfirmation', BackupStronghold = 'backupStronghold', + BalanceBreakdown = 'balanceBreakdown', BurnNativeTokens = 'burnNativeTokens', BurnNativeTokensConfirmation = 'burnNativeTokensConfirmation', CheckForUpdates = 'checkForUpdates', @@ -33,15 +34,14 @@ export enum PopupId { ReceiveAddress = 'receiveAddress', RemoveProposal = 'removeProposal', Revote = 'revote', - SignMessage = 'signMessage', SendFlow = 'sendFlow', + SignMessage = 'signMessage', StopVoting = 'stopVoting', - BalanceBreakdown = 'balanceBreakdown', + SyncAccounts = 'syncAccounts', TestDeepLinkForm = 'testDeepLinkForm', TokenInformation = 'tokenInformation', UnlockStronghold = 'unlockStronghold', VerifyLedgerTransaction = 'verifyLedgerTransaction', VoteForProposal = 'voteForProposal', VotingPowerToZero = 'votingPowerToZero', - WalletFinder = 'walletFinder', } diff --git a/packages/desktop/views/dashboard/developer/Developer.svelte b/packages/desktop/views/dashboard/developer/Developer.svelte index 2a33f1e0f2..ef57274fc9 100644 --- a/packages/desktop/views/dashboard/developer/Developer.svelte +++ b/packages/desktop/views/dashboard/developer/Developer.svelte @@ -8,7 +8,6 @@ FaucetRequestButton, MintNativeTokenButton, MintNftButton, - RefreshTokenMetadataButton, TestDeepLinkButton, } from './components' @@ -43,9 +42,6 @@ {#if features.developerTools.deeplink.enabled} {/if} - {#if features.developerTools.refreshTokens.enabled} - - {/if} {/key} diff --git a/packages/desktop/views/dashboard/developer/components/RefreshTokenMetadataButton.svelte b/packages/desktop/views/dashboard/developer/components/RefreshTokenMetadataButton.svelte deleted file mode 100644 index cf8a47d593..0000000000 --- a/packages/desktop/views/dashboard/developer/components/RefreshTokenMetadataButton.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/packages/desktop/views/dashboard/developer/components/index.ts b/packages/desktop/views/dashboard/developer/components/index.ts index e2fdbd9741..70d196eb86 100644 --- a/packages/desktop/views/dashboard/developer/components/index.ts +++ b/packages/desktop/views/dashboard/developer/components/index.ts @@ -2,5 +2,4 @@ export { default as CreateAliasButton } from './CreateAliasButton.svelte' export { default as FaucetRequestButton } from './FaucetRequestButton.svelte' export { default as MintNativeTokenButton } from './MintNativeTokenButton.svelte' export { default as MintNftButton } from './MintNftButton.svelte' -export { default as RefreshTokenMetadataButton } from './RefreshTokenMetadataButton.svelte' export { default as TestDeepLinkButton } from './TestDeepLinkButton.svelte' diff --git a/packages/desktop/views/dashboard/settings/Settings.svelte b/packages/desktop/views/dashboard/settings/Settings.svelte index 548c7b66bc..fa414dc028 100644 --- a/packages/desktop/views/dashboard/settings/Settings.svelte +++ b/packages/desktop/views/dashboard/settings/Settings.svelte @@ -1,7 +1,7 @@ -
- +
+
+ +
diff --git a/packages/desktop/views/dashboard/settings/views/advanced/WalletFinder.svelte b/packages/desktop/views/dashboard/settings/views/advanced/WalletFinder.svelte deleted file mode 100644 index 012a063f9b..0000000000 --- a/packages/desktop/views/dashboard/settings/views/advanced/WalletFinder.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - -{localize('views.settings.walletFinder.title')} -{localize('views.settings.walletFinder.description')} -
-
diff --git a/packages/desktop/views/dashboard/settings/views/advanced/advanced-settings.constant.js b/packages/desktop/views/dashboard/settings/views/advanced/advanced-settings.constant.js index d2b898cb04..c3ff653cff 100644 --- a/packages/desktop/views/dashboard/settings/views/advanced/advanced-settings.constant.js +++ b/packages/desktop/views/dashboard/settings/views/advanced/advanced-settings.constant.js @@ -1,8 +1,7 @@ -import { WalletFinder, HiddenAccounts, DeveloperToggle } from '.' +import { HiddenAccounts, DeveloperToggle } from '.' import { AdvancedSettingsRoute } from '@core/router' export const ADVANCED_SETTINGS = [ - { component: WalletFinder, childRoute: AdvancedSettingsRoute.WalletFinder, requiresLogin: true }, { component: HiddenAccounts, childRoute: AdvancedSettingsRoute.HiddenAccounts, requiresLogin: true }, { component: DeveloperToggle, childRoute: AdvancedSettingsRoute.DeveloperToggle, requiresLogin: true }, ] diff --git a/packages/desktop/views/dashboard/settings/views/advanced/index.js b/packages/desktop/views/dashboard/settings/views/advanced/index.js index 23f494ac02..568141c963 100644 --- a/packages/desktop/views/dashboard/settings/views/advanced/index.js +++ b/packages/desktop/views/dashboard/settings/views/advanced/index.js @@ -1,5 +1,4 @@ export { default as DeveloperToggle } from './DeveloperToggle.svelte' export { default as HiddenAccounts } from './HiddenAccounts.svelte' -export { default as WalletFinder } from './WalletFinder.svelte' export * from './advanced-settings.constant' diff --git a/packages/desktop/views/dashboard/wallet/tab-section/TabSection.svelte b/packages/desktop/views/dashboard/wallet/tab-section/TabSection.svelte index c478ebd129..f210d85139 100644 --- a/packages/desktop/views/dashboard/wallet/tab-section/TabSection.svelte +++ b/packages/desktop/views/dashboard/wallet/tab-section/TabSection.svelte @@ -1,41 +1,29 @@ - + -
+
{#if currentTab === 0} -
- -
+ {:else if currentTab === 1} -
- -
+ - + {/if}
diff --git a/packages/shared/src/components/inputs/TogglableButton.svelte b/packages/shared/src/components/inputs/TogglableButton.svelte index 36dd80cf65..8833bc3443 100644 --- a/packages/shared/src/components/inputs/TogglableButton.svelte +++ b/packages/shared/src/components/inputs/TogglableButton.svelte @@ -11,4 +11,4 @@ } - + diff --git a/packages/shared/src/locales/en.json b/packages/shared/src/locales/en.json index d86ccf758f..7ca8733258 100644 --- a/packages/shared/src/locales/en.json +++ b/packages/shared/src/locales/en.json @@ -229,10 +229,6 @@ "description": "Change your Bloom profile name", "success": "You changed your profile name" }, - "walletFinder": { - "title": "Wallet finder", - "description": "Perform an extended search of your previously used wallets" - }, "hiddenAccounts": { "title": "Hidden accounts", "description": "Selecting this options will show wallets that were previously hidden" @@ -761,7 +757,7 @@ "surplusIncluded": "This transaction contains a surplus amount. Please double check this is the amount you want to send." }, "walletFinder": { - "title": "Wallet finder", + "title": "Sync accounts", "body": "Perform a more exhaustive search of addresses to find missing balances and wallets.", "accountsSearched": "Accounts searched", "accountsFound": "Accounts found", @@ -1114,7 +1110,7 @@ "restart": "Restart", "refresh": "Refresh", "saveBackup": "Save backup", - "customizeAccount": "Customise wallet", + "customizeAccount": "Customise account", "hideAccount": "Hide account", "showAccount": "Unhide account", "deleteAccount": "Delete account", @@ -1151,11 +1147,9 @@ "readDocumentation": "Read the documentation", "visitFaq": "Visit FAQ", "viewDownloads" : "View downloads", - "viewBalanceBreakdown": "View balance breakdown", "showHiddenAccounts": "Show hidden accounts", "confirm": "Confirm", "hideNetworkStatistics": "Hide network statistics", - "findWallets": "Find wallets", "search": "Search", "searching": "Searching", "searchAgain": "Search again", @@ -1189,7 +1183,11 @@ "skipAndKeep": "Skip and keep old password", "addChain": "Add chain", "untrackToken": "Untrack token", - "switchAccount": "Switch account" + "switchAccount": "Switch account", + "syncAccounts": "Sync accounts", + "importErc20Token": "Import ERC20 token" + + }, "general": { "recipient": "Recipient", @@ -1235,7 +1233,6 @@ "sendAssets": "Send assets", "sendAssetToAddress": "Send asset to an address", "manageAccount": "Manage account", - "customizeAccount": "Customize your account", "account": "Account", "amount": "Amount", "addAddress": "Add Address", @@ -1330,7 +1327,6 @@ "mintNativeTokenDescription": "Mint native token following IRC30 standard", "mintNftDescription": "Mint NFT following IRC27 standard", "faucetRequestDescription": "Request tokens from the {network} faucet", - "refreshTokenMetadataDescription": "Reset and refresh all token metadata", "refreshTokenMetadataHint" : "This will reset all your tokens' metadata including the verification status and unhide any hidden assets.", "excluded": "Excluded", "developerTools": "Developer tools", @@ -1368,7 +1364,6 @@ "coinType":"Coin type", "custom": "Custom", "evmAddress": "EVM address", - "importErc20Token": "Import ERC20 token", "optionalField": "{field} (optional)", "gifted": "Gifted", "connected": "Connected", @@ -1379,6 +1374,7 @@ "networks": "Networks", "ledgerDevice": "Ledger device", "disconnected": "Disconnected", + "balanceBreakdown": "Balance breakdown", "primary": "Primary" }, "filters":{