From ab588b725cc5c9d3ae53dbba0a0989e7c83ccf12 Mon Sep 17 00:00:00 2001 From: Mark Nardi Date: Tue, 30 Apr 2024 10:50:32 +0200 Subject: [PATCH 01/14] rename L2 to EVM --- .../desktop/components/NetworkCard.svelte | 4 +- .../components/menus/TokenListMenu.svelte | 5 +- .../popup/popups/ReceiveAddressPopup.svelte | 6 +- .../components/AccountNetworkSummary.svelte | 4 +- .../account/actions/setSelectedAccount.ts | 7 +- .../actions/tryCreateAdditionalAccount.ts | 4 +- .../actions/fetchEvmBalancesForAccount.ts | 17 +++++ .../actions/fetchL2BalanceForAccount.ts | 70 ------------------- .../src/lib/core/layer-2/actions/index.ts | 4 +- ...ccount.ts => pollEvmBalancesForAccount.ts} | 8 +-- ...s.ts => fetchEvmBalancesForAllAccounts.ts} | 6 +- .../src/lib/core/layer-2/utils/index.ts | 2 +- .../profile/actions/active-profile/login.ts | 4 +- 13 files changed, 43 insertions(+), 98 deletions(-) create mode 100644 packages/shared/src/lib/core/layer-2/actions/fetchEvmBalancesForAccount.ts delete mode 100644 packages/shared/src/lib/core/layer-2/actions/fetchL2BalanceForAccount.ts rename packages/shared/src/lib/core/layer-2/actions/{pollL2BalanceForAccount.ts => pollEvmBalancesForAccount.ts} (68%) rename packages/shared/src/lib/core/layer-2/utils/{fetchL2BalanceForAllAccounts.ts => fetchEvmBalancesForAllAccounts.ts} (62%) diff --git a/packages/desktop/components/NetworkCard.svelte b/packages/desktop/components/NetworkCard.svelte index 130426b38e..53d2195890 100644 --- a/packages/desktop/components/NetworkCard.svelte +++ b/packages/desktop/components/NetworkCard.svelte @@ -5,7 +5,7 @@ import { openUrlInBrowser } from '@core/app' import { handleError } from '@core/error/handlers' import { localize } from '@core/i18n' - import { generateAndStoreEvmAddressForAccounts, pollL2BalanceForAccount } from '@core/layer-2/actions' + import { generateAndStoreEvmAddressForAccounts, pollEvmBalancesForAccount } from '@core/layer-2/actions' import { LedgerAppName } from '@core/ledger' import { ExplorerEndpoint, Network, NetworkNamespace, getDefaultExplorerUrl, setSelectedChain } from '@core/network' import { ProfileType } from '@core/profile' @@ -67,7 +67,7 @@ network.coinType, $selectedAccount as IAccountState ) - pollL2BalanceForAccount($activeProfile.id, $selectedAccount as IAccountState) + pollEvmBalancesForAccount($selectedAccount as IAccountState) if ($activeProfile.type === ProfileType.Ledger) { $networkConfigRouter.goTo(NetworkConfigRoute.ConfirmLedgerEvmAddress) } diff --git a/packages/desktop/components/menus/TokenListMenu.svelte b/packages/desktop/components/menus/TokenListMenu.svelte index 8b0611976a..567c5a30bf 100644 --- a/packages/desktop/components/menus/TokenListMenu.svelte +++ b/packages/desktop/components/menus/TokenListMenu.svelte @@ -1,16 +1,15 @@