From 73b52d41331056e85b34017a9af4e2749f606c4c Mon Sep 17 00:00:00 2001
From: Tuditi <45079109+Tuditi@users.noreply.github.com>
Date: Mon, 20 May 2024 22:24:32 +0200
Subject: [PATCH] chore: refactor for multi chain support (#2511)
* chore: remove BASE_TOKEN_CONTRACT_ADDRESS map
* chore: rename getL1Network to getStardustNetwork
* fix: type
---
.../components/popup/popups/FaucetRequestPopup.svelte | 4 ++--
.../components/popup/popups/RemoveProposalPopup.svelte | 4 ++--
.../developer/components/FaucetRequestButton.svelte | 4 ++--
.../governance/components/ProposalCard.svelte | 4 ++--
.../governance/components/ProposalList.svelte | 4 ++--
.../governance/components/ProposalQuestion.svelte | 4 ++--
.../components/ProposalStatusTimelineTooltip.svelte | 4 ++--
.../proposal-details/ProposalDetailsPane.svelte | 4 ++--
.../proposal-details/ProposalInformationPane.svelte | 4 ++--
.../proposal-details/ProposalQuestionListPane.svelte | 4 ++--
.../components/proposal-details/QuorumProgress.svelte | 4 ++--
.../governance/views/ProposalDetailsView.svelte | 4 ++--
.../send-flow/views/SelectRecipientView.svelte | 4 ++--
.../shared/src/components/inputs/NetworkInput.svelte | 4 ++--
.../components/organisms/NodeConfigurationForm.svelte | 4 ++--
.../calculateTotalVotesForTrackedParticipations.ts | 4 ++--
.../governance/utils/createProposalFromError.ts | 4 ++--
.../governance/utils/getNumberOfActiveProposals.ts | 4 ++--
.../utils/getPercentagesFromAnswerStatuses.ts | 4 ++--
.../tests/getPercentagesFromAnswerStatuses.test.ts | 2 +-
.../calculateAndAddPersistedTokenBalanceChange.ts | 6 +++---
...TokenTransferActivityFromBlockscoutTokenTransfer.ts | 4 ++--
.../core/layer-2/actions/checkForUntrackedTokens.ts | 4 ++--
.../constants/base-token-contract-address.constant.ts | 8 --------
.../shared/src/lib/core/layer-2/constants/index.ts | 1 -
.../layer-2/utils/getL2ToL1StorageDepositBuffer.ts | 2 +-
.../src/lib/core/network/stores/networks.store.ts | 10 ++--------
.../core/token/actions/getAccountTokensForAccount.ts | 4 ++--
.../token/actions/loadTokensForAllAccountBalances.ts | 4 ++--
29 files changed, 53 insertions(+), 68 deletions(-)
delete mode 100644 packages/shared/src/lib/core/layer-2/constants/base-token-contract-address.constant.ts
diff --git a/packages/desktop/components/popup/popups/FaucetRequestPopup.svelte b/packages/desktop/components/popup/popups/FaucetRequestPopup.svelte
index cdc9b7eb8b..68a897688a 100644
--- a/packages/desktop/components/popup/popups/FaucetRequestPopup.svelte
+++ b/packages/desktop/components/popup/popups/FaucetRequestPopup.svelte
@@ -1,7 +1,7 @@
diff --git a/packages/desktop/views/dashboard/developer/components/FaucetRequestButton.svelte b/packages/desktop/views/dashboard/developer/components/FaucetRequestButton.svelte
index d045fd7b2a..58aa01e5a5 100644
--- a/packages/desktop/views/dashboard/developer/components/FaucetRequestButton.svelte
+++ b/packages/desktop/views/dashboard/developer/components/FaucetRequestButton.svelte
@@ -1,11 +1,11 @@
diff --git a/packages/desktop/views/dashboard/send-flow/views/SelectRecipientView.svelte b/packages/desktop/views/dashboard/send-flow/views/SelectRecipientView.svelte
index 44e7012ba0..b2bb3453c1 100644
--- a/packages/desktop/views/dashboard/send-flow/views/SelectRecipientView.svelte
+++ b/packages/desktop/views/dashboard/send-flow/views/SelectRecipientView.svelte
@@ -11,7 +11,7 @@
NetworkType,
getEvmNetwork,
getIscChains,
- getL1Network,
+ getStardustNetwork,
getNetwork,
isEvmNetwork,
} from '@core/network'
@@ -107,7 +107,7 @@
}
function getLayer1RecipientOption(accountIndexToExclude?: number): INetworkRecipientSelectorOption {
- const network = getL1Network()
+ const network = getStardustNetwork()
return {
networkId: network.id,
name: network.name,
diff --git a/packages/shared/src/components/inputs/NetworkInput.svelte b/packages/shared/src/components/inputs/NetworkInput.svelte
index bb959710f8..828f1b2661 100644
--- a/packages/shared/src/components/inputs/NetworkInput.svelte
+++ b/packages/shared/src/components/inputs/NetworkInput.svelte
@@ -1,7 +1,7 @@