From f6055946d459570f91746de9ceba9d2cc63db9b3 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Wed, 16 Oct 2024 22:28:32 +0200 Subject: [PATCH] chore: usage of goerli removed --- .../src/Onboarding/Common/Constants.h | 2 +- resources/default-networks.json | 45 ------------------- .../wallet_section/networks/controller.nim | 8 +--- .../wallet_section/networks/io_interface.nim | 3 -- .../main/wallet_section/networks/module.nim | 4 -- .../main/wallet_section/networks/view.nim | 17 +------ src/app_service/common/wallet_constants.nim | 1 - .../accounts/dto/wallet_secretes_config.nim | 6 --- src/app_service/service/accounts/service.nim | 3 -- src/app_service/service/network/service.nim | 2 - src/app_service/service/network/types.nim | 7 +-- .../service/saved_address/async_tasks.nim | 2 +- .../service/settings/dto/settings.nim | 3 -- src/app_service/service/settings/service.nim | 10 ----- src/app_service/service/token/service.nim | 13 +++--- .../wallet_account/service_account.nim | 11 ----- src/constants.nim | 3 -- src/env_cli_vars.nim | 21 --------- storybook/pages/EditAirdropViewPage.qml | 4 +- storybook/pages/EditNetworkViewPage.qml | 8 ++-- storybook/pages/HoldingsDropdownPage.qml | 2 +- storybook/pages/NetworkSelectorViewPage.qml | 6 +-- storybook/pages/SendModalPage.qml | 6 +-- .../SharedAddressesAccountSelectorPage.qml | 2 +- .../pages/TokenSelectorAssetDelegatePage.qml | 2 +- .../qmlTests/tests/tst_BuyCryptoModal.qml | 2 +- .../qmlTests/tests/tst_DAppsWorkflow.qml | 6 +-- .../qmlTests/tests/tst_SwapInputPanel.qml | 2 +- .../src/Models/GroupedAccountsAssetsModel.qml | 34 +++++++------- .../src/Models/ManageCollectiblesModel.qml | 20 ++++----- storybook/src/Models/NetworksModel.qml | 18 ++++---- storybook/src/Models/OnRampProvidersModel.qml | 4 +- .../src/Models/SwapTransactionRoutes.qml | 2 +- storybook/src/Models/TokensBySymbolModel.qml | 26 +++++------ .../Profile/popups/WalletAddressMenu.qml | 3 +- .../Profile/stores/AdvancedStore.qml | 7 --- .../AppLayouts/Profile/stores/WalletStore.qml | 1 - .../AppLayouts/Profile/views/AdvancedView.qml | 29 ------------ .../Profile/views/wallet/AccountView.qml | 1 - .../controls/SavedAddressesDelegate.qml | 3 +- .../panels/ContractInfoButtonWithMenu.qml | 4 +- .../Wallet/panels/WalletNftPreview.qml | 7 +-- .../popups/SavedAddressActivityPopup.qml | 1 - .../Wallet/popups/TransactionAddressMenu.qml | 10 ++--- ui/app/AppLayouts/Wallet/stores/RootStore.qml | 37 +++------------ .../Wallet/views/SavedAddresses.qml | 1 - .../Wallet/views/TransactionDetailView.qml | 2 - .../keycard/helpers/KeyPairUnknownItem.qml | 1 - .../popups/keycard/states/ManageAccounts.qml | 1 - .../profile/ProfileShowcaseAccountsView.qml | 1 - ui/imports/utils/Constants.qml | 11 ----- ui/imports/utils/Utils.qml | 28 ++++-------- 52 files changed, 103 insertions(+), 350 deletions(-) diff --git a/libs/Onboarding/src/Onboarding/Common/Constants.h b/libs/Onboarding/src/Onboarding/Common/Constants.h index 0be58caa60..d10e11a87c 100644 --- a/libs/Onboarding/src/Onboarding/Common/Constants.h +++ b/libs/Onboarding/src/Onboarding/Common/Constants.h @@ -30,7 +30,7 @@ inline const auto Websocket = u"wss/p2p/waku"_qs; namespace General { inline const auto DefaultNetworkName = u"mainnet_rpc"_qs; -//const DEFAULT_NETWORKS_IDS* = @["mainnet_rpc", "testnet_rpc", "rinkeby_rpc", "goerli_rpc", "xdai_rpc", "poa_rpc" ] +//const DEFAULT_NETWORKS_IDS* = @["mainnet_rpc", "testnet_rpc", "rinkeby_rpc", "xdai_rpc", "poa_rpc" ] inline const auto ZeroAddress = u"0x0000000000000000000000000000000000000000"_qs; diff --git a/resources/default-networks.json b/resources/default-networks.json index 2deaf319aa..44ab0ae055 100644 --- a/resources/default-networks.json +++ b/resources/default-networks.json @@ -14,21 +14,6 @@ "layer": 1, "enabled": true }, - { - "chainId": 5, - "chainName": "Goerli", - "rpcUrl": "https://goerli.infura.io/v3/%INFURA_TOKEN_RESOLVED%", - "blockExplorerUrl": "https://goerli.etherscan.io/", - "iconUrl": "network/Network=Testnet", - "chainColor": "#939BA1", - "shortName": "goeEth", - "nativeCurrencyName": "Ether", - "nativeCurrencySymbol": "ETH", - "nativeCurrencyDecimals": 18, - "isTest": true, - "layer": 1, - "enabled": true - }, { "chainId": 10, "chainName": "Optimism", @@ -44,21 +29,6 @@ "layer": 2, "enabled": true }, - { - "chainId": 420, - "chainName": "Optimism Goerli Testnet", - "rpcUrl": "https://optimism-goerli.infura.io/v3/%INFURA_TOKEN_RESOLVED%", - "blockExplorerUrl": "https://goerli-optimism.etherscan.io/", - "iconUrl": "network/Network=Testnet", - "chainColor": "#939BA1", - "shortName": "goerOpt", - "nativeCurrencyName": "Ether", - "nativeCurrencySymbol": "ETH", - "nativeCurrencyDecimals": 18, - "isTest": true, - "layer": 2, - "enabled": false - }, { "chainId": 42161, "chainName": "Arbitrum", @@ -73,20 +43,5 @@ "isTest": false, "layer": 2, "enabled": true - }, - { - "chainId": 421613, - "chainName": "Arbitrum Goerli", - "rpcUrl": "https://arbitrum-goerli.infura.io/v3/%INFURA_TOKEN_RESOLVED%", - "blockExplorerUrl": "https://goerli.arbiscan.io/", - "iconUrl": "network/Network=Testnet", - "chainColor": "#939BA1", - "shortName": "rinArb", - "nativeCurrencyName": "Ether", - "nativeCurrencySymbol": "ETH", - "nativeCurrencyDecimals": 18, - "isTest": true, - "layer": 2, - "enabled": false } ] diff --git a/src/app/modules/main/wallet_section/networks/controller.nim b/src/app/modules/main/wallet_section/networks/controller.nim index 8ff3481d6e..b2fb07a871 100644 --- a/src/app/modules/main/wallet_section/networks/controller.nim +++ b/src/app/modules/main/wallet_section/networks/controller.nim @@ -34,7 +34,7 @@ proc delete*(self: Controller) = proc init*(self: Controller) = self.events.on(SIGNAL_WALLET_ACCOUNT_NETWORK_ENABLED_UPDATED) do(e: Args): - self.delegate.refreshNetworks() + self.delegate.refreshNetworks() self.events.on(SIGNAL_WALLET_ACCOUNT_CHAIN_ID_FOR_URL_FETCHED) do(e: Args): let args = ChainIdForUrlArgs(e) @@ -58,12 +58,6 @@ proc areTestNetworksEnabled*(self: Controller): bool = proc toggleTestNetworksEnabled*(self: Controller) = self.walletAccountService.toggleTestNetworksEnabled() -proc isGoerliEnabled*(self: Controller): bool = - return self.walletAccountService.isGoerliEnabled() - -proc toggleIsGoerliEnabled*(self: Controller) = - self.walletAccountService.toggleIsGoerliEnabled() - proc updateNetworkEndPointValues*(self: Controller, chainId: int, testNetwork: bool, newMainRpcInput, newFailoverRpcUrl: string, revertToDefault: bool) = self.networkService.updateNetworkEndPointValues(chainId, testNetwork, newMainRpcInput, newFailoverRpcUrl, revertToDefault) diff --git a/src/app/modules/main/wallet_section/networks/io_interface.nim b/src/app/modules/main/wallet_section/networks/io_interface.nim index 4cf9bb6b5c..7d83325ed9 100644 --- a/src/app/modules/main/wallet_section/networks/io_interface.nim +++ b/src/app/modules/main/wallet_section/networks/io_interface.nim @@ -29,9 +29,6 @@ method viewDidLoad*(self: AccessInterface) {.base.} = method toggleTestNetworksEnabled*(self: AccessInterface) {.base.} = raise newException(ValueError, "No implementation available") -method toggleIsGoerliEnabled*(self: AccessInterface) {.base.} = - raise newException(ValueError, "No implementation available") - method setNetworksState*(self: AccessInterface, chainIds: seq[int], enable: bool) {.base.} = raise newException(ValueError, "No implementation available") diff --git a/src/app/modules/main/wallet_section/networks/module.nim b/src/app/modules/main/wallet_section/networks/module.nim index b44f11eef3..aec0fcac19 100644 --- a/src/app/modules/main/wallet_section/networks/module.nim +++ b/src/app/modules/main/wallet_section/networks/module.nim @@ -66,10 +66,6 @@ method toggleTestNetworksEnabled*(self: Module) = self.controller.toggleTestNetworksEnabled() self.refreshNetworks() -method toggleIsGoerliEnabled*(self: Module) = - self.controller.toggleIsGoerliEnabled() - self.refreshNetworks() - method setNetworksState*(self: Module, chainIds: seq[int], enabled: bool) = self.controller.setNetworksState(chainIds, enabled) diff --git a/src/app/modules/main/wallet_section/networks/view.nim b/src/app/modules/main/wallet_section/networks/view.nim index 6c54a17a16..77919f6b38 100644 --- a/src/app/modules/main/wallet_section/networks/view.nim +++ b/src/app/modules/main/wallet_section/networks/view.nim @@ -10,7 +10,6 @@ QtObject: combinedNetworks: CombinedModel areTestNetworksEnabled: bool enabledChainIds: string - isGoerliEnabled: bool proc setup(self: View) = self.QObject.setup @@ -63,20 +62,6 @@ QtObject: read = getEnabledChainIds notify = enabledChainIdsChanged - proc isGoerliEnabledChanged*(self: View) {.signal.} - proc getIsGoerliEnabled(self: View): bool {.slot.} = - return self.isGoerliEnabled - QtProperty[bool] isGoerliEnabled: - read = getIsGoerliEnabled - notify = isGoerliEnabledChanged - - proc setIsGoerliEnabled*(self: View, IsGoerliEnabled: bool) = - self.isGoerliEnabled = IsGoerliEnabled - self.isGoerliEnabledChanged() - - proc toggleIsGoerliEnabled*(self: View) {.slot.} = - self.delegate.toggleIsGoerliEnabled() - proc refreshModel*(self: View) = self.flatNetworks.refreshModel() self.combinedNetworks.modelUpdated() @@ -93,7 +78,7 @@ QtObject: proc enableNetwork*(self: View, chainId: int) {.slot.} = self.delegate.setNetworksState(@[chainId], enable = true) - + proc getBlockExplorerURL*(self: View, chainId: int): string {.slot.} = return self.flatNetworks.getBlockExplorerURL(chainId) diff --git a/src/app_service/common/wallet_constants.nim b/src/app_service/common/wallet_constants.nim index c943feab1c..1b9d0c3304 100644 --- a/src/app_service/common/wallet_constants.nim +++ b/src/app_service/common/wallet_constants.nim @@ -4,7 +4,6 @@ const ERC721_TRANSACTION_TYPE* = "erc721" SNT_CONTRACT_ADDRESS* = "0x744d70fdbe2ba4cf95131626614a1763df805b9e" - STT_CONTRACT_ADDRESS_GOERLI* = "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a" STT_CONTRACT_ADDRESS_SEPOLIA* = "0xE452027cdEF746c7Cd3DB31CB700428b16cD8E51" SIGNATURE_LEN* = 130 diff --git a/src/app_service/service/accounts/dto/wallet_secretes_config.nim b/src/app_service/service/accounts/dto/wallet_secretes_config.nim index b656b5d79b..79fb1cc6df 100644 --- a/src/app_service/service/accounts/dto/wallet_secretes_config.nim +++ b/src/app_service/service/accounts/dto/wallet_secretes_config.nim @@ -9,13 +9,10 @@ type raribleMainnetApiKey*: string raribleTestnetApiKey*: string alchemyEthereumMainnetToken*: string - alchemyEthereumGoerliToken*: string alchemyEthereumSepoliaToken*: string alchemyArbitrumMainnetToken*: string - alchemyArbitrumGoerliToken*: string alchemyArbitrumSepoliaToken*: string alchemyOptimismMainnetToken*: string - alchemyOptimismGoerliToken*: string alchemyOptimismSepoliaToken*: string statusProxyStageName*: string statusProxyMarketUser*: string @@ -32,13 +29,10 @@ proc toJson*(self: WalletSecretsConfig): JsonNode = "raribleMainnetApiKey": self.raribleMainnetApiKey, "raribleTestnetApiKey": self.raribleTestnetApiKey, "alchemyEthereumMainnetToken": self.alchemyEthereumMainnetToken, - "alchemyEthereumGoerliToken": self.alchemyEthereumGoerliToken, "alchemyEthereumSepoliaToken": self.alchemyEthereumSepoliaToken, "alchemyArbitrumMainnetToken": self.alchemyArbitrumMainnetToken, - "alchemyArbitrumGoerliToken": self.alchemyArbitrumGoerliToken, "alchemyArbitrumSepoliaToken": self.alchemyArbitrumSepoliaToken, "alchemyOptimismMainnetToken": self.alchemyOptimismMainnetToken, - "alchemyOptimismGoerliToken": self.alchemyOptimismGoerliToken, "alchemyOptimismSepoliaToken": self.alchemyOptimismSepoliaToken, "statusProxyStageName": self.statusProxyStageName, "statusProxyMarketUser": self.statusProxyMarketUser, diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index 01d9c59e12..76d14aa45c 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -165,13 +165,10 @@ QtObject: raribleMainnetApiKey: RARIBLE_MAINNET_API_KEY_RESOLVED, raribleTestnetApiKey: RARIBLE_TESTNET_API_KEY_RESOLVED, alchemyEthereumMainnetToken: ALCHEMY_ETHEREUM_MAINNET_TOKEN_RESOLVED, - alchemyEthereumGoerliToken: ALCHEMY_ETHEREUM_GOERLI_TOKEN_RESOLVED, alchemyEthereumSepoliaToken: ALCHEMY_ETHEREUM_SEPOLIA_TOKEN_RESOLVED, alchemyArbitrumMainnetToken: ALCHEMY_ARBITRUM_MAINNET_TOKEN_RESOLVED, - alchemyArbitrumGoerliToken: ALCHEMY_ARBITRUM_GOERLI_TOKEN_RESOLVED, alchemyArbitrumSepoliaToken: ALCHEMY_ARBITRUM_SEPOLIA_TOKEN_RESOLVED, alchemyOptimismMainnetToken: ALCHEMY_OPTIMISM_MAINNET_TOKEN_RESOLVED, - alchemyOptimismGoerliToken: ALCHEMY_OPTIMISM_GOERLI_TOKEN_RESOLVED, alchemyOptimismSepoliaToken: ALCHEMY_OPTIMISM_SEPOLIA_TOKEN_RESOLVED, statusProxyStageName: STATUS_PROXY_STAGE_NAME_RESOLVED, statusProxyMarketUser: STATUS_PROXY_USER_RESOLVED, diff --git a/src/app_service/service/network/service.nim b/src/app_service/service/network/service.nim index 86b3c46336..ee97d9a722 100644 --- a/src/app_service/service/network/service.nim +++ b/src/app_service/service/network/service.nim @@ -140,8 +140,6 @@ proc getAppNetwork*(self: Service): NetworkItem = var networkId = Mainnet if self.settingsService.areTestNetworksEnabled(): networkId = Sepolia - if self.settingsService.isGoerliEnabled(): - networkId = Goerli let network = self.getNetworkByChainId(networkId) if network.isNil: # we should not be here ever diff --git a/src/app_service/service/network/types.nim b/src/app_service/service/network/types.nim index f52fffc341..1556af5b42 100644 --- a/src/app_service/service/network/types.nim +++ b/src/app_service/service/network/types.nim @@ -1,7 +1,6 @@ const Mainnet = 1 const Ropsten = 3 const Rinkeby = 4 -const Goerli = 5 const Sepolia = 11155111 const Optimism = 10 const Poa = 99 @@ -10,7 +9,7 @@ const XDai = 100 const NETWORK_LAYER_1 = 1 const NETWORK_LAYER_2 = 2 -export Mainnet, Ropsten, Rinkeby, Goerli, Optimism, Poa, XDai, Sepolia +export Mainnet, Ropsten, Rinkeby, Optimism, Poa, XDai, Sepolia export NETWORK_LAYER_1, NETWORK_LAYER_2 type @@ -18,7 +17,6 @@ type Mainnet = "mainnet_rpc", Testnet = "testnet_rpc", Rinkeby = "rinkeby_rpc", - Goerli = "goerli_rpc", Sepolia = "sepolia_rpc", XDai = "xdai_rpc", Poa = "poa_rpc", @@ -32,8 +30,6 @@ proc toNetworkType*(networkName: string): NetworkType = result = NetworkType.Testnet of "rinkeby_rpc": result = NetworkType.Rinkeby - of "goerli_rpc": - result = NetworkType.Goerli of "sepolia_rpc": result = NetworkType.Sepolia of "xdai_rpc": @@ -48,7 +44,6 @@ proc toChainId*(self: NetworkType): int = of NetworkType.Mainnet: result = Mainnet of NetworkType.Testnet: result = Ropsten of NetworkType.Rinkeby: result = Rinkeby - of NetworkType.Goerli: result = Goerli of NetworkType.Sepolia: result = Sepolia of NetworkType.XDai: result = XDai of NetworkType.Poa: result = 99 diff --git a/src/app_service/service/saved_address/async_tasks.nim b/src/app_service/service/saved_address/async_tasks.nim index 56bdd43e38..b578acfbee 100644 --- a/src/app_service/service/saved_address/async_tasks.nim +++ b/src/app_service/service/saved_address/async_tasks.nim @@ -19,7 +19,7 @@ type OnlyIfDifferent proc isValidChainId(chainId: int): bool = - return chainId == Mainnet or chainId == Goerli or chainId == Sepolia + return chainId == Mainnet or chainId == Sepolia proc checkForEnsNameAndUpdate(chainId: int, savedAddress: var SavedAddressDto, updateCriteria: UpdateCriteria): RpcResponse[JsonNode] {.raises: [RpcException].} = if savedAddress.isTest and chainId == Mainnet or diff --git a/src/app_service/service/settings/dto/settings.nim b/src/app_service/service/settings/dto/settings.nim index 74ab5befad..f6252b0faa 100644 --- a/src/app_service/service/settings/dto/settings.nim +++ b/src/app_service/service/settings/dto/settings.nim @@ -44,7 +44,6 @@ const KEY_GIF_API_KEY* = "gifs/api-key" const KEY_DISPLAY_NAME* = "display-name" const KEY_BIO* = "bio" const KEY_TEST_NETWORKS_ENABLED* = "test-networks-enabled?" -const KEY_IS_GOERLI_ENABLED* = "is-goerli-enabled?" const KEY_TOKEN_GROUP_BY_COMMUNITY* = "token-group-by-community?" const KEY_SHOW_COMMUNITY_ASSET_WHEN_SENDING_TOKENS* = "show-community-asset-when-sending-tokens?" const KEY_DISPLAY_ASSETS_BELOW_BALANCE* = "display-assets-below-balance?" @@ -156,7 +155,6 @@ type notificationsVolume*: int notificationsMessagePreview*: int profileMigrationNeeded*: bool - isGoerliEnabled*: bool tokenGroupByCommunity*: bool showCommunityAssetWhenSendingTokens*: bool displayAssetsBelowBalance*: bool @@ -216,7 +214,6 @@ proc toSettingsDto*(jsonObj: JsonNode): SettingsDto = discard jsonObj.getProp(KEY_GIF_RECENTS, result.gifRecents) discard jsonObj.getProp(KEY_GIF_FAVORITES, result.gifFavorites) discard jsonObj.getProp(KEY_TEST_NETWORKS_ENABLED, result.testNetworksEnabled) - discard jsonObj.getProp(KEY_IS_GOERLI_ENABLED, result.isGoerliEnabled) discard jsonObj.getProp(KEY_TOKEN_GROUP_BY_COMMUNITY, result.tokenGroupByCommunity) discard jsonObj.getProp(KEY_SHOW_COMMUNITY_ASSET_WHEN_SENDING_TOKENS, result.showCommunityAssetWhenSendingTokens) discard jsonObj.getProp(KEY_DISPLAY_ASSETS_BELOW_BALANCE, result.displayAssetsBelowBalance) diff --git a/src/app_service/service/settings/service.nim b/src/app_service/service/settings/service.nim index 4da14b15c6..82ea367e05 100644 --- a/src/app_service/service/settings/service.nim +++ b/src/app_service/service/settings/service.nim @@ -474,16 +474,6 @@ QtObject: return true return false - proc isGoerliEnabled*(self: Service): bool = - return self.settings.isGoerliEnabled - - proc toggleIsGoerliEnabled*(self: Service): bool = - let newValue = not self.settings.isGoerliEnabled - if(self.saveSetting(KEY_IS_GOERLI_ENABLED, newValue)): - self.settings.isGoerliEnabled = newValue - return true - return false - proc tokenGroupByCommunity*(self: Service): bool = return self.settings.tokenGroupByCommunity diff --git a/src/app_service/service/token/service.nim b/src/app_service/service/token/service.nim index e74adb1519..8969028a32 100644 --- a/src/app_service/service/token/service.nim +++ b/src/app_service/service/token/service.nim @@ -39,7 +39,7 @@ const SIGNAL_TOKENS_MARKET_VALUES_UPDATED* = "tokensMarketValuesUpdated" const SIGNAL_TOKENS_PRICES_UPDATED* = "tokensPricesValuesUpdated" const SIGNAL_TOKEN_PREFERENCES_UPDATED* = "tokenPreferencesUpdated" -type +type ResultArgs* = ref object of Args success*: bool @@ -265,7 +265,7 @@ QtObject: # Callback to process the response of getSupportedTokensList call proc supportedTokensListRetrieved(self: Service, response: string) {.slot.} = # this is emited so that the models can know that the seq it depends on has been updated - defer: + defer: self.fetchTokenPreferences() self.events.emit(SIGNAL_TOKENS_LIST_UPDATED, Args()) try: @@ -278,7 +278,7 @@ QtObject: if not errorString.isEmptyOrWhitespace: raise newException(Exception, "Error getting supported tokens list: " & errorString) - + if tokensResult.isNil or tokensResult.kind == JNull: raise newException(Exception, "Error in response of getting supported tokens list") @@ -372,7 +372,7 @@ QtObject: var data = WalletSignal(e) case data.eventType: of "wallet-tick-reload": - self.rebuildMarketData() + self.rebuildMarketData() # update and populate internal list and then emit signal when new custom token detected? proc getCurrency*(self: Service): string = @@ -449,10 +449,7 @@ QtObject: proc getStatusTokenKey*(self: Service): string = var token: TokenBySymbolItem if self.settingsService.areTestNetworksEnabled(): - if self.settingsService.isGoerliEnabled(): - token = self.getTokenBySymbolByContractAddr(STT_CONTRACT_ADDRESS_GOERLI) - else: - token = self.getTokenBySymbolByContractAddr(STT_CONTRACT_ADDRESS_SEPOLIA) + token = self.getTokenBySymbolByContractAddr(STT_CONTRACT_ADDRESS_SEPOLIA) else: token = self.getTokenBySymbolByContractAddr(SNT_CONTRACT_ADDRESS) if token != nil: diff --git a/src/app_service/service/wallet_account/service_account.nim b/src/app_service/service/wallet_account/service_account.nim index 7da648191f..1ed13a429a 100644 --- a/src/app_service/service/wallet_account/service_account.nim +++ b/src/app_service/service/wallet_account/service_account.nim @@ -544,14 +544,6 @@ proc toggleTestNetworksEnabled*(self: Service) = self.checkRecentHistory(addresses) self.events.emit(SIGNAL_WALLET_ACCOUNT_NETWORK_ENABLED_UPDATED, Args()) -proc toggleIsGoerliEnabled*(self: Service) = - discard self.settingsService.toggleIsGoerliEnabled() - self.networkService.resetNetworks() - let addresses = self.getWalletAddresses() - self.buildAllTokens(addresses, store = true) - self.checkRecentHistory(addresses) - self.events.emit(SIGNAL_WALLET_ACCOUNT_NETWORK_ENABLED_UPDATED, Args()) - proc updateWalletAccount*(self: Service, address: string, accountName: string, colorId: string, emoji: string): bool = try: var account = self.getAccountByAddress(address) @@ -749,9 +741,6 @@ proc getCurrencyFormat*(self: Service, symbol: string): CurrencyFormatDto = proc areTestNetworksEnabled*(self: Service): bool = return self.settingsService.areTestNetworksEnabled() -proc isGoerliEnabled*(self: Service): bool = - return self.settingsService.isGoerliEnabled() - proc hasPairedDevices*(self: Service): bool = return hasPairedDevices() diff --git a/src/constants.nim b/src/constants.nim index 1a5f5f04ea..ce5d21aa53 100644 --- a/src/constants.nim +++ b/src/constants.nim @@ -46,13 +46,10 @@ let INFURA_TOKEN_RESOLVED* = desktopConfig.infuraToken INFURA_TOKEN_SECRET_RESOLVED* = desktopConfig.infuraTokenSecret ALCHEMY_ETHEREUM_MAINNET_TOKEN_RESOLVED* = desktopConfig.alchemyEthereumMainnetToken - ALCHEMY_ETHEREUM_GOERLI_TOKEN_RESOLVED* = desktopConfig.alchemyEthereumGoerliToken ALCHEMY_ETHEREUM_SEPOLIA_TOKEN_RESOLVED* = desktopConfig.alchemyEthereumSepoliaToken ALCHEMY_ARBITRUM_MAINNET_TOKEN_RESOLVED* = desktopConfig.alchemyArbitrumMainnetToken - ALCHEMY_ARBITRUM_GOERLI_TOKEN_RESOLVED* = desktopConfig.alchemyArbitrumGoerliToken ALCHEMY_ARBITRUM_SEPOLIA_TOKEN_RESOLVED* = desktopConfig.alchemyArbitrumSepoliaToken ALCHEMY_OPTIMISM_MAINNET_TOKEN_RESOLVED* = desktopConfig.alchemyOptimismMainnetToken - ALCHEMY_OPTIMISM_GOERLI_TOKEN_RESOLVED* = desktopConfig.alchemyOptimismGoerliToken ALCHEMY_OPTIMISM_SEPOLIA_TOKEN_RESOLVED* = desktopConfig.alchemyOptimismSepoliaToken OPENSEA_API_KEY_RESOLVED* = desktopConfig.openseaApiKey RARIBLE_MAINNET_API_KEY_RESOLVED* = desktopConfig.raribleMainnetApiKey diff --git a/src/env_cli_vars.nim b/src/env_cli_vars.nim index 727b6e07fe..c1c7d32d65 100644 --- a/src/env_cli_vars.nim +++ b/src/env_cli_vars.nim @@ -19,13 +19,10 @@ const BASE_NAME_OPENSEA_API_KEY = "OPENSEA_API_KEY" const BASE_NAME_RARIBLE_MAINNET_API_KEY = "RARIBLE_MAINNET_API_KEY" const BASE_NAME_RARIBLE_TESTNET_API_KEY = "RARIBLE_TESTNET_API_KEY" const BASE_NAME_ALCHEMY_ETHEREUM_MAINNET_TOKEN = "ALCHEMY_ETHEREUM_MAINNET_TOKEN" -const BASE_NAME_ALCHEMY_ETHEREUM_GOERLI_TOKEN = "ALCHEMY_ETHEREUM_GOERLI_TOKEN" const BASE_NAME_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN = "ALCHEMY_ETHEREUM_SEPOLIA_TOKEN" const BASE_NAME_ALCHEMY_ARBITRUM_MAINNET_TOKEN = "ALCHEMY_ARBITRUM_MAINNET_TOKEN" -const BASE_NAME_ALCHEMY_ARBITRUM_GOERLI_TOKEN = "ALCHEMY_ARBITRUM_GOERLI_TOKEN" const BASE_NAME_ALCHEMY_ARBITRUM_SEPOLIA_TOKEN = "ALCHEMY_ARBITRUM_SEPOLIA_TOKEN" const BASE_NAME_ALCHEMY_OPTIMISM_MAINNET_TOKEN = "ALCHEMY_OPTIMISM_MAINNET_TOKEN" -const BASE_NAME_ALCHEMY_OPTIMISM_GOERLI_TOKEN = "ALCHEMY_OPTIMISM_GOERLI_TOKEN" const BASE_NAME_ALCHEMY_OPTIMISM_SEPOLIA_TOKEN = "ALCHEMY_OPTIMISM_SEPOLIA_TOKEN" const BASE_NAME_TENOR_API_KEY = "TENOR_API_KEY" const BASE_NAME_STATUS_PROXY_STAGE_NAME = "PROXY_STAGE_NAME" @@ -56,13 +53,10 @@ const BUILD_OPENSEA_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_OPENSEA_API_K const BUILD_RARIBLE_MAINNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_MAINNET_API_KEY) const BUILD_RARIBLE_TESTNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_TESTNET_API_KEY) const BUILD_ALCHEMY_ETHEREUM_MAINNET_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ETHEREUM_MAINNET_TOKEN) -const BUILD_ALCHEMY_ETHEREUM_GOERLI_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ETHEREUM_GOERLI_TOKEN) const BUILD_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN) const BUILD_ALCHEMY_ARBITRUM_MAINNET_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ARBITRUM_MAINNET_TOKEN) -const BUILD_ALCHEMY_ARBITRUM_GOERLI_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ARBITRUM_GOERLI_TOKEN) const BUILD_ALCHEMY_ARBITRUM_SEPOLIA_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_ARBITRUM_SEPOLIA_TOKEN) const BUILD_ALCHEMY_OPTIMISM_MAINNET_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_OPTIMISM_MAINNET_TOKEN) -const BUILD_ALCHEMY_OPTIMISM_GOERLI_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_OPTIMISM_GOERLI_TOKEN) const BUILD_ALCHEMY_OPTIMISM_SEPOLIA_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_ALCHEMY_OPTIMISM_SEPOLIA_TOKEN) const @@ -155,11 +149,6 @@ type StatusDesktopConfig = object desc: "Sets alchemy ethereum mainnet token" name: $BASE_NAME_ALCHEMY_ETHEREUM_MAINNET_TOKEN abbr: "alchemy-ethereum-mainnet-token" .}: string - alchemyEthereumGoerliToken* {. - defaultValue: BUILD_ALCHEMY_ETHEREUM_GOERLI_TOKEN - desc: "Sets alchemy ethereum goerli token" - name: $BASE_NAME_ALCHEMY_ETHEREUM_GOERLI_TOKEN - abbr: "alchemy-ethereum-goerli-token" .}: string alchemyEthereumSepoliaToken* {. defaultValue: BUILD_ALCHEMY_ETHEREUM_SEPOLIA_TOKEN desc: "Sets alchemy ethereum sepolia token" @@ -170,11 +159,6 @@ type StatusDesktopConfig = object desc: "Sets alchemy arbitrum mainnet token" name: $BASE_NAME_ALCHEMY_ARBITRUM_MAINNET_TOKEN abbr: "alchemy-arbitrum-mainnet-token" .}: string - alchemyArbitrumGoerliToken* {. - defaultValue: BUILD_ALCHEMY_ARBITRUM_GOERLI_TOKEN - desc: "Sets alchemy arbitrum goerli token" - name: $BASE_NAME_ALCHEMY_ARBITRUM_GOERLI_TOKEN - abbr: "alchemy-arbitrum-goerli-token" .}: string alchemyArbitrumSepoliaToken* {. defaultValue: BUILD_ALCHEMY_ARBITRUM_SEPOLIA_TOKEN desc: "Sets alchemy arbitrum sepolia token" @@ -185,11 +169,6 @@ type StatusDesktopConfig = object desc: "Sets alchemy optimism mainnet token" name: $BASE_NAME_ALCHEMY_OPTIMISM_MAINNET_TOKEN abbr: "alchemy-optimism-mainnet-token" .}: string - alchemyOptimismGoerliToken* {. - defaultValue: BUILD_ALCHEMY_OPTIMISM_GOERLI_TOKEN - desc: "Sets alchemy optimism goerli token" - name: $BASE_NAME_ALCHEMY_OPTIMISM_GOERLI_TOKEN - abbr: "alchemy-optimism-goerli-token" .}: string alchemyOptimismSepoliaToken* {. defaultValue: BUILD_ALCHEMY_OPTIMISM_SEPOLIA_TOKEN desc: "Sets alchemy optimism sepolia token" diff --git a/storybook/pages/EditAirdropViewPage.qml b/storybook/pages/EditAirdropViewPage.qml index 235d7b6821..91a42afc62 100644 --- a/storybook/pages/EditAirdropViewPage.qml +++ b/storybook/pages/EditAirdropViewPage.qml @@ -111,7 +111,7 @@ SplitView { function requestMockedFees(contractKeysAndAmounts) { if (!loader.item) return - + const view = loader.item view.feesAvailable = false view.totalFeeText = "" @@ -234,7 +234,7 @@ SplitView { }, ExpressionRole { name: "chainName" - expression: model.index ? "Ethereum Mainnet" : "Goerli" + expression: model.index ? "Ethereum Mainnet" : "Sepolia" }, ExpressionRole { readonly property string icon1: "network/Network=Ethereum" diff --git a/storybook/pages/EditNetworkViewPage.qml b/storybook/pages/EditNetworkViewPage.qml index 2538fb5f10..d5cf511f8a 100644 --- a/storybook/pages/EditNetworkViewPage.qml +++ b/storybook/pages/EditNetworkViewPage.qml @@ -21,8 +21,7 @@ SplitView { nativeCurrencyDecimals: 18, layer: 1, chainName: "Mainnet", - rpcURL: "https://eth-archival.rpc.grove.city/v1/7178a5d77466455882b2fb60", - fallbackURL: "https://eth-archival.rpc.grove.city/v1/7178a5d77466455882b2fb60", + rpcURL: "https://mainnet.infura.io/v3/", blockExplorerURL: "https://etherscan.io/", iconURL: "network/Network=Ethereum", nativeCurrencyName: "Ether", @@ -38,9 +37,8 @@ SplitView { nativeCurrencyDecimals: 18, layer: 1, chainName: "Mainnet", - rpcURL: "https://goerli-archival.rpc.grove.city/v1/7178a5d77466455882b2fb60", - fallbackURL: "https://eth-archival.rpc.grove.city/v1/7178a5d77466455882b2fb60", - blockExplorerURL: "https://goerli.etherscan.io/", + rpcURL: "https://sepolia.infura.io/v3/", + blockExplorerURL: "https://sepolia.etherscan.io/", iconURL: "network/Network=Ethereum", nativeCurrencyName: "Ether", nativeCurrencySymbol: "ETH", diff --git a/storybook/pages/HoldingsDropdownPage.qml b/storybook/pages/HoldingsDropdownPage.qml index 057fcd58a3..242a97dc24 100644 --- a/storybook/pages/HoldingsDropdownPage.qml +++ b/storybook/pages/HoldingsDropdownPage.qml @@ -116,7 +116,7 @@ SplitView { }, ExpressionRole { name: "chainName" - expression: model.index ? "Ethereum Mainnet" : "Goerli" + expression: model.index ? "Ethereum Mainnet" : "Sepolia" }, ExpressionRole { name: "decimals" diff --git a/storybook/pages/NetworkSelectorViewPage.qml b/storybook/pages/NetworkSelectorViewPage.qml index 5cc2ea6042..73360596e5 100644 --- a/storybook/pages/NetworkSelectorViewPage.qml +++ b/storybook/pages/NetworkSelectorViewPage.qml @@ -29,7 +29,7 @@ SplitView { Layout.fillHeight: true model: NetworksModel.flatNetworks - selection: [420] + selection: [11155420] showIndicator: true multiSelection: false } @@ -49,7 +49,7 @@ SplitView { showIndicator: true multiSelection: true - selection: [1, 420] + selection: [1, 11155420] } } } @@ -105,4 +105,4 @@ SplitView { } } -// category: Views \ No newline at end of file +// category: Views diff --git a/storybook/pages/SendModalPage.qml b/storybook/pages/SendModalPage.qml index 09cc95cbda..9862fd9f40 100644 --- a/storybook/pages/SendModalPage.qml +++ b/storybook/pages/SendModalPage.qml @@ -44,7 +44,7 @@ SplitView { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", }, { - chainId: "420", + chainId: "11155420", balance: "559133758939097000", account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240" } @@ -65,7 +65,7 @@ SplitView { communityId: "", balances: [ { - chainId: "420", + chainId: "11155420", balance: "1142155111", account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240" }, @@ -109,7 +109,7 @@ SplitView { property ListModel toModel: ListModel { ListElement { - chainId: 420 + chainId: 11155420 amountOut: "3003845308235848343" } ListElement { diff --git a/storybook/pages/SharedAddressesAccountSelectorPage.qml b/storybook/pages/SharedAddressesAccountSelectorPage.qml index 7c40136613..69cc209307 100644 --- a/storybook/pages/SharedAddressesAccountSelectorPage.qml +++ b/storybook/pages/SharedAddressesAccountSelectorPage.qml @@ -49,7 +49,7 @@ SplitView { balances: [ ListElement { - chainId: 420 + chainId: 11155420 balance: "1013151281976507736" account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240" }, diff --git a/storybook/pages/TokenSelectorAssetDelegatePage.qml b/storybook/pages/TokenSelectorAssetDelegatePage.qml index 6952220eb1..375afafb48 100644 --- a/storybook/pages/TokenSelectorAssetDelegatePage.qml +++ b/storybook/pages/TokenSelectorAssetDelegatePage.qml @@ -52,7 +52,7 @@ SplitView { { chainId: 1, balanceAsString: "1234.50", iconUrl: "network/Network=Ethereum" }, { chainId: 42161, balanceAsString: "55.91", iconUrl: "network/Network=Arbitrum" }, { chainId: 10, balanceAsString: "45.12", iconUrl: "network/Network=Optimism" }, - { chainId: 420, balanceAsString: "1.23", iconUrl: "network/Network=Testnet" } + { chainId: 11155420, balanceAsString: "1.23", iconUrl: "network/Network=Testnet" } ] Component.onCompleted: append(data) } diff --git a/storybook/qmlTests/tests/tst_BuyCryptoModal.qml b/storybook/qmlTests/tests/tst_BuyCryptoModal.qml index 6f07d1d10f..64c08686ae 100644 --- a/storybook/qmlTests/tests/tst_BuyCryptoModal.qml +++ b/storybook/qmlTests/tests/tst_BuyCryptoModal.qml @@ -232,7 +232,7 @@ Item { compare(selectedAssetButton.subname, modelDataToTest.symbol) //switch to a network that has no tokens and ensure its reset - controlUnderTest.buyCryptoInputParamsForm.selectedNetworkChainId = 421613 + controlUnderTest.buyCryptoInputParamsForm.selectedNetworkChainId = 421614 waitForRendering(selectParamsPanel) diff --git a/storybook/qmlTests/tests/tst_DAppsWorkflow.qml b/storybook/qmlTests/tests/tst_DAppsWorkflow.qml index 2f72c43dc3..e3e6a7e2fb 100644 --- a/storybook/qmlTests/tests/tst_DAppsWorkflow.qml +++ b/storybook/qmlTests/tests/tst_DAppsWorkflow.qml @@ -216,7 +216,7 @@ Item { } // Used by tst_balanceCheck ListElement { - chainId: 421613 + chainId: 421614 layer: 2 } } @@ -378,7 +378,7 @@ Item { }, { tag: "check_l2_doesnt_have_enough_funds_on_l1", - chainId: 421613, + chainId: 421614, // Override the l1 additional fees l1GasFee: 1000000000.0, @@ -389,7 +389,7 @@ Item { }, { tag: "check_l2_doesnt_have_enough_funds_on_l2", - chainId: 421613, + chainId: 421614, // Override the l2 to a higher value maxFeePerGasM: 1000000.0, /*GWEI*/ // Override the l1 additional fees diff --git a/storybook/qmlTests/tests/tst_SwapInputPanel.qml b/storybook/qmlTests/tests/tst_SwapInputPanel.qml index b5fc4f7a89..7fc41ecdcf 100644 --- a/storybook/qmlTests/tests/tst_SwapInputPanel.qml +++ b/storybook/qmlTests/tests/tst_SwapInputPanel.qml @@ -34,7 +34,7 @@ Item { QtObject { id: d - readonly property int goOptChainId: 420 + readonly property int goOptChainId: 11155420 readonly property SwapModalAdaptor adaptor: SwapModalAdaptor { swapStore: SwapStore { diff --git a/storybook/src/Models/GroupedAccountsAssetsModel.qml b/storybook/src/Models/GroupedAccountsAssetsModel.qml index 6dfc89ff81..19727af832 100644 --- a/storybook/src/Models/GroupedAccountsAssetsModel.qml +++ b/storybook/src/Models/GroupedAccountsAssetsModel.qml @@ -6,9 +6,9 @@ ListModel { tokensKey: "DAI", balances: [ { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 10, balance: "559133758939097000" }, - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "0" }, + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "0" }, { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155111, balance: "0" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 420, balance: "123456789123456789" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155420, balance: "123456789123456789" }, { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155111, balance: "123456789123456789" }, { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 42161, balance: "45123456789123456789" }, ] @@ -17,21 +17,21 @@ ListModel { tokensKey: "ETH", balances: [ { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 1, balance: "122082928968121891" }, - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "1013151281976507736" }, - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 421613, balance: "473057568699284613" }, + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "1013151281976507736" }, + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 421614, balance: "473057568699284613" }, { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155111, balance: "307400931315122839" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 420, balance: "122082928968121891" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 421613, balance: "0" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155420, balance: "122082928968121891" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 421614, balance: "0" }, ] }, { tokensKey: "STT", balances: [ { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 1, balance: "45123456789123456789" }, - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "999999999998998500000000000016777216" }, + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "999999999998998500000000000016777216" }, { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 10, balance: "1077000000000000000000" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 420, balance: "122082928968121891" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 421613, balance: "222000000000000000" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155420, balance: "122082928968121891" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 421614, balance: "222000000000000000" }, { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155111, balance: "559133758939097000" } ] }, @@ -39,9 +39,9 @@ ListModel { tokensKey: "aave", balances: [ { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 10, balance: "559133758939097000" }, - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "0" }, + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "0" }, { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155111, balance: "123456789123456789" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 420, balance: "123456789123456789" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155420, balance: "123456789123456789" }, { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155111, balance: "123456789123456789" }, { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 42161, balance: "45123456789123456789" }, ] @@ -49,27 +49,27 @@ ListModel { { tokensKey: "0x6b175474e89094c44da98b954eedeac495271e0f", balances: [ - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "100" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 420, balance: "1" } + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "100" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155420, balance: "1" } ] }, { tokensKey: "0x6b175474e89094c44da98b954eedeac495271p0f", balances: [ - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "20" }, - { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 420, balance: "10" } + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "20" }, + { account: "0x7F47C2e98a4BBf5487E6fb082eC2D9Ab0E6d8881", chainId: 11155420, balance: "10" } ] }, { tokensKey: "0x6b175474e89094c44da98b954eedeac495271d0f", balances: [ - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "1" } + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "1" } ] }, { tokensKey: "0x6b175474e89094c44da98b954eedeac495271a0f", balances: [ - { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 420, balance: "1" } + { account: "0x7F47C2e18a4BBf5487E6fb082eC2D9Ab0E6d7240", chainId: 11155420, balance: "1" } ] } ] diff --git a/storybook/src/Models/ManageCollectiblesModel.qml b/storybook/src/Models/ManageCollectiblesModel.qml index 7bee066008..79b0ab990f 100644 --- a/storybook/src/Models/ManageCollectiblesModel.qml +++ b/storybook/src/Models/ManageCollectiblesModel.qml @@ -115,7 +115,7 @@ ListModel { }, { uid: "34545656768", - chainId: 420, + chainId: 11155420, userHas: 1, name: "Kitty 1", collectionUid: "KT", @@ -161,7 +161,7 @@ ListModel { }, { uid: "123456", - chainId: 420, + chainId: 11155420, userHas: 0, name: "Kitty 2", collectionUid: "KT", @@ -210,7 +210,7 @@ ListModel { }, { uid: "12345645459537432", - chainId: 421613, + chainId: 421614, userHas: 0, name: "Big Kitty", collectionUid: "KT", @@ -261,7 +261,7 @@ ListModel { }, { uid: "pp21", - chainId: 421613, + chainId: 421614, userHas: 0, name: "pepepunk#21", collectionUid: "pepepunks", @@ -299,7 +299,7 @@ ListModel { }, { uid: "lp#666a", - chainId: 421613, + chainId: 421614, userHas: 0, name: "Lonely Panda #666", collectionUid: "lpan_collection", @@ -337,7 +337,7 @@ ListModel { }, { uid: "invalid#123", - chainId: 421613, + chainId: 421614, userHas: 0, name: "", collectionUid: "", @@ -401,7 +401,7 @@ ListModel { }, { uid: "691", - chainId: 421613, + chainId: 421614, name: "KILLABEAR #691", collectionUid: "", collectionName: "", @@ -429,7 +429,7 @@ ListModel { }, { uid: "8876", - chainId: 421613, + chainId: 421614, name: "KILLABEAR #2385", collectionUid: "", collectionName: "", @@ -541,7 +541,7 @@ ListModel { }, { uid: "lb#666", - chainId: 420, + chainId: 11155420, name: "Lonely Bear #666", collectionUid: "", collectionName: "", @@ -574,7 +574,7 @@ ListModel { }, { uid: "lb#777", - chainId: 420, + chainId: 11155420, name: "Lonely Turtle #777", collectionUid: "", collectionName: "", diff --git a/storybook/src/Models/NetworksModel.qml b/storybook/src/Models/NetworksModel.qml index 4bf6a274fa..e2214532c2 100644 --- a/storybook/src/Models/NetworksModel.qml +++ b/storybook/src/Models/NetworksModel.qml @@ -46,7 +46,7 @@ QtObject { return "Hermez" if(chainId === root.testnetNet) - return "Goerli" + return "Sepolia" if(chainId === root.customNet) return "Custom" @@ -97,12 +97,12 @@ QtObject { isRouteEnabled: true, }, { - chainId: 420, - chainName: "Optimism Goerli Testnet", - blockExplorerURL: "https://goerli-optimism.etherscan.io/", + chainId: 11155420, + chainName: "Optimism Sepolia", + blockExplorerURL: "https://sepolia-optimism.etherscan.io/", iconUrl: "network/Network=Optimism", chainColor: "#939BA1", - shortName: "goOpt", + shortName: "oeth", nativeCurrencyName: "Ether", nativeCurrencySymbol: "ETH", nativeCurrencyDecimals: 18, @@ -125,12 +125,12 @@ QtObject { isRouteEnabled: true, }, { - chainId: 421613, - chainName: "Arbitrum Goerli", - blockExplorerURL: "https://goerli.arbiscan.io/", + chainId: 421614, + chainName: "Arbitrum Sepolia", + blockExplorerURL: "https://sepolia-explorer.arbitrum.io/", iconUrl: "network/Network=Arbitrum", chainColor: "#939BA1", - shortName: "goArb", + shortName: "arb1", nativeCurrencyName: "Ether", nativeCurrencySymbol: "ETH", nativeCurrencyDecimals: 18, diff --git a/storybook/src/Models/OnRampProvidersModel.qml b/storybook/src/Models/OnRampProvidersModel.qml index 1433fb0582..81d046e6ab 100644 --- a/storybook/src/Models/OnRampProvidersModel.qml +++ b/storybook/src/Models/OnRampProvidersModel.qml @@ -49,8 +49,8 @@ ListModel { supportsRecurrentPurchase: true, supportedAssets:[ { key: "111551110x0000000000000000000000000000000000000000", chainId: 11155111, address: "0x0000000000000000000000000000000000000000"}, - { key: "4200x0000000000000000000000000000000000000000", chainId: 420, address: "0x0000000000000000000000000000000000000000"}, - { key: "4200xf2edf1c091f683e3fb452497d9a98a49cba84669", chainId: 420, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84669"}, + { key: "4200x0000000000000000000000000000000000000000", chainId: 11155420, address: "0x0000000000000000000000000000000000000000"}, + { key: "4200xf2edf1c091f683e3fb452497d9a98a49cba84669", chainId: 11155420, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84669"}, ], urlsNeedParameters: true } diff --git a/storybook/src/Models/SwapTransactionRoutes.qml b/storybook/src/Models/SwapTransactionRoutes.qml index 5a43a22096..8689b1d2e4 100644 --- a/storybook/src/Models/SwapTransactionRoutes.qml +++ b/storybook/src/Models/SwapTransactionRoutes.qml @@ -45,7 +45,7 @@ QtObject { property ListModel toModel: ListModel { ListElement { - chainId: 420 + chainId: 11155420 chainName: "Optimism" iconUrl: "network/Network=Optimism" amountOut: "3003845308235848343" diff --git a/storybook/src/Models/TokensBySymbolModel.qml b/storybook/src/Models/TokensBySymbolModel.qml index 59b26deab7..c35e7e8f2c 100644 --- a/storybook/src/Models/TokensBySymbolModel.qml +++ b/storybook/src/Models/TokensBySymbolModel.qml @@ -18,9 +18,9 @@ ListModel { { chainId: 1, address: "0x0000000000000000000000000000000000000000"}, { chainId: 5, address: "0x0000000000000000000000000000000000000000"}, { chainId: 10, address: "0x0000000000000000000000000000000000000000"}, - { chainId: 420, address: "0x0000000000000000000000000000000000000000"}, + { chainId: 11155420, address: "0x0000000000000000000000000000000000000000"}, { chainId: 42161, address: "0x0000000000000000000000000000000000000000"}, - { chainId: 421613, address: "0x0000000000000000000000000000000000000000"}, + { chainId: 421614, address: "0x0000000000000000000000000000000000000000"}, { chainId: 11155111, address: "0x0000000000000000000000000000000000000000"}, ], decimals: 18, @@ -48,8 +48,8 @@ ListModel { sources: ";" + status + ";", addressPerChain: [ {chainId: 5, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, - { chainId: 420, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, - { chainId: 421613, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, + { chainId: 11155420, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, + { chainId: 421614, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, { chainId: 11155111, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, { chainId: 10, address: "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"}, ], @@ -82,8 +82,8 @@ ListModel { { chainId: 42161, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, { chainId: 5, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84666"}, { chainId: 11155111, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, - { chainId: 420, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84669"}, - { chainId: 421613, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84666"}, + { chainId: 11155420, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84669"}, + { chainId: 421614, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84666"}, ], decimals: 18, type: 1, @@ -112,7 +112,7 @@ ListModel { sources: ";" + uniswap + ";" + status + ";", addressPerChain: [ { chainId: 11155111, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, - { chainId: 421613, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, + { chainId: 421614, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, ], decimals: 18, type: 1, @@ -169,8 +169,8 @@ ListModel { communityId: "", sources: ";" + uniswap + ";" + status + ";", addressPerChain: [ - { chainId: 420, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84666"}, - { chainId: 421613, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, + { chainId: 11155420, address: "0xf2edf1c091f683e3fb452497d9a98a49cba84666"}, + { chainId: 421614, address: "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}, ], decimals: 18, type: 1, @@ -197,7 +197,7 @@ ListModel { symbol: "ZRX", sources: ";" + custom + ";", addressPerChain: [ - { chainId: 420, address: "0x6b175474e89094c44da98b954eedeac495271e0f"} + { chainId: 11155420, address: "0x6b175474e89094c44da98b954eedeac495271e0f"} ], decimals: 0, type: 1, @@ -223,7 +223,7 @@ ListModel { symbol: "OMG", sources: ";" + custom + ";", addressPerChain: [ - { chainId: 420, address: "0x6b175474e89094c44da98b954eedeac495271p0f"} + { chainId: 11155420, address: "0x6b175474e89094c44da98b954eedeac495271p0f"} ], decimals: 0, type: 1, @@ -249,7 +249,7 @@ ListModel { symbol: "MET", sources: ";" + custom + ";", addressPerChain: [ - { chainId: 420, address: "0x6b175474e89094c44da98b954eedeac495271d0f"}, + { chainId: 11155420, address: "0x6b175474e89094c44da98b954eedeac495271d0f"}, { chainId: 10, address: "0x6b175474e89094c44da98b954eedeac495271d0f"} ], decimals: 0, @@ -276,7 +276,7 @@ ListModel { symbol: "AST", sources: ";" + custom + ";", addressPerChain: [ - { chainId: 420, address: "0x6b175474e89094c44da98b954eedeac495271a0f"} + { chainId: 11155420, address: "0x6b175474e89094c44da98b954eedeac495271a0f"} ], decimals: 0, type: 1, diff --git a/ui/app/AppLayouts/Profile/popups/WalletAddressMenu.qml b/ui/app/AppLayouts/Profile/popups/WalletAddressMenu.qml index 7d09c1f49b..f02ce4c0a6 100644 --- a/ui/app/AppLayouts/Profile/popups/WalletAddressMenu.qml +++ b/ui/app/AppLayouts/Profile/popups/WalletAddressMenu.qml @@ -28,7 +28,6 @@ StatusMenu { colorId: "", }) property bool areTestNetworksEnabled: false - property bool isGoerliEnabled: false signal copyToClipboard(string address) @@ -42,7 +41,7 @@ StatusMenu { text: qsTr("View on Etherscan") icon.name: "link" onTriggered: { - let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, root.areTestNetworksEnabled, root.isGoerliEnabled, root.selectedAccount.address?? "") + let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, root.areTestNetworksEnabled, root.selectedAccount.address?? "") Global.openLink(link) } } diff --git a/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml b/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml index 0c0e78b892..a743ebb2d0 100644 --- a/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml +++ b/ui/app/AppLayouts/Profile/stores/AdvancedStore.qml @@ -43,8 +43,6 @@ QtObject { readonly property bool refreshTokenEnabled: localAppSettings.refreshTokenEnabled ?? false - readonly property bool isGoerliEnabled: networksModuleInst.isGoerliEnabled - function logDir() { if(!root.advancedModule) return "" @@ -202,9 +200,4 @@ QtObject { localAppSettings.scrollDeceleration = value } - - function toggleIsGoerliEnabled(){ - networksModule.toggleIsGoerliEnabled() - } - } diff --git a/ui/app/AppLayouts/Profile/stores/WalletStore.qml b/ui/app/AppLayouts/Profile/stores/WalletStore.qml index c9fe5e003b..4e84cd6c81 100644 --- a/ui/app/AppLayouts/Profile/stores/WalletStore.qml +++ b/ui/app/AppLayouts/Profile/stores/WalletStore.qml @@ -18,7 +18,6 @@ QtObject { property var accountSensitiveSettings: Global.appIsReady? localAccountSensitiveSettings : null readonly property bool areTestNetworksEnabled: networksModuleInst.areTestNetworksEnabled - readonly property bool isGoerliEnabled: networksModuleInst.isGoerliEnabled readonly property var combinedNetworks: networksModuleInst.combinedNetworks diff --git a/ui/app/AppLayouts/Profile/views/AdvancedView.qml b/ui/app/AppLayouts/Profile/views/AdvancedView.qml index 011c579d90..4678f071a1 100644 --- a/ui/app/AppLayouts/Profile/views/AdvancedView.qml +++ b/ui/app/AppLayouts/Profile/views/AdvancedView.qml @@ -441,15 +441,6 @@ SettingsContentBase { } } - StatusSettingsLineButton { - anchors.leftMargin: 0 - anchors.rightMargin: 0 - text: qsTr("Enable Goerli as Test Network") - isSwitch: true - switchChecked: root.advancedStore.isGoerliEnabled - onClicked: Global.openPopup(enableSepoliaConfirmationDialogComponent) - } - StatusSettingsLineButton { anchors.leftMargin: 0 anchors.rightMargin: 0 @@ -505,26 +496,6 @@ SettingsContentBase { } } - Component { - id: enableSepoliaConfirmationDialogComponent - ConfirmationDialog { - property bool mode: false - - id: confirmDialog - destroyOnClose: true - showCancelButton: true - confirmationText: qsTr("Are you sure you want to toggle sepolia? The app will be restarted.") - onConfirmButtonClicked: { - root.advancedStore.toggleIsGoerliEnabled() - close() - SystemUtils.restartApplication() - } - onCancelButtonClicked: { - close() - } - } - } - Component { id: enableDeveloperFeaturesConfirmationDialogComponent ConfirmationDialog { diff --git a/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml b/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml index 848716e370..d2e6177cf5 100644 --- a/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml +++ b/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml @@ -293,7 +293,6 @@ ColumnLayout { id: addressMenu selectedAccount: root.account areTestNetworksEnabled: root.walletStore.areTestNetworksEnabled - isGoerliEnabled: root.walletStore.isGoerliEnabled onCopyToClipboard: ClipboardUtils.setText(address) } diff --git a/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml b/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml index 9c80594362..d96b6075f2 100644 --- a/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml @@ -27,7 +27,6 @@ StatusListItem { property string ens property string colorId property bool areTestNetworksEnabled: false - property bool isGoerliEnabled: false property int usage: SavedAddressesDelegate.Usage.Delegate property bool showButtons: sensor.containsMouse @@ -212,7 +211,7 @@ StatusListItem { text: qsTr("View on Etherscan") icon.name: "link" onTriggered: { - let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, root.areTestNetworksEnabled, root.isGoerliEnabled, d.visibleAddress ? d.visibleAddress : root.ens) + let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, root.areTestNetworksEnabled, d.visibleAddress ? d.visibleAddress : root.ens) Global.openLink(link) } } diff --git a/ui/app/AppLayouts/Wallet/panels/ContractInfoButtonWithMenu.qml b/ui/app/AppLayouts/Wallet/panels/ContractInfoButtonWithMenu.qml index e58ff47a2f..85815d481d 100644 --- a/ui/app/AppLayouts/Wallet/panels/ContractInfoButtonWithMenu.qml +++ b/ui/app/AppLayouts/Wallet/panels/ContractInfoButtonWithMenu.qml @@ -28,10 +28,10 @@ StatusFlatButton { onClicked: moreMenu.popup(-moreMenu.width + width, height + 4) function getExplorerName() { - if (root.networkShortName === Constants.networkShortChainNames.arbitrum || root.networkShortName === Constants.networkShortChainNames.arbitrum_goerli) { + if (root.networkShortName === Constants.networkShortChainNames.arbitrum) { return qsTr("Arbiscan") } - if (root.networkShortName === Constants.networkShortChainNames.optimism || root.networkShortName === Constants.networkShortChainNames.optimism_goerli) { + if (root.networkShortName === Constants.networkShortChainNames.optimism) { return qsTr("Optimistic") } return qsTr("Etherscan") diff --git a/ui/app/AppLayouts/Wallet/panels/WalletNftPreview.qml b/ui/app/AppLayouts/Wallet/panels/WalletNftPreview.qml index 190c493bbc..5dd3ba7ca7 100644 --- a/ui/app/AppLayouts/Wallet/panels/WalletNftPreview.qml +++ b/ui/app/AppLayouts/Wallet/panels/WalletNftPreview.qml @@ -19,7 +19,6 @@ ColumnLayout { property string tokenAddress property bool strikethrough: false property bool areTestNetworksEnabled: false - property bool isGoerliEnabled: false spacing: Theme.padding @@ -106,11 +105,7 @@ ColumnLayout { onClicked: { let link = Constants.networkExplorerLinks.etherscan if (areTestNetworksEnabled) { - if (root.isGoerliEnabled) { - link = Constants.networkExplorerLinks.goerliEtherscan - } else { - link = Constants.networkExplorerLinks.sepoliaEtherscan - } + link = Constants.networkExplorerLinks.sepoliaEtherscan } Global.openLink("%1/nft/%2/%3".arg(link).arg(root.tokenAddress).arg(root.tokenId)) } diff --git a/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml b/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml index 95a2073766..bfd07a7e07 100644 --- a/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml @@ -157,7 +157,6 @@ StatusModal { statusListItemTitle.font.bold: Font.Bold areTestNetworksEnabled: WalletStore.RootStore.areTestNetworksEnabled - isGoerliEnabled: WalletStore.RootStore.isGoerliEnabled onAboutToOpenPopup: { root.close() diff --git a/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml b/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml index 010e3c3139..6bebdd6731 100644 --- a/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml @@ -36,7 +36,6 @@ StatusMenu { property ProfileStores.ContactsStore contactsStore property NetworkConnectionStore networkConnectionStore property bool areTestNetworksEnabled: false - property bool isGoerliEnabled: false signal openSendModal(address: string) @@ -216,8 +215,7 @@ StatusMenu { text: d.getViewText(qsTr("Etherscan")) icon.name: "link" onTriggered: { - let url = Utils.getEtherscanUrl(d.chains.mainnet, root.areTestNetworksEnabled, !root.isGoerliEnabled, - d.cleanSelectedAddress, d.isAddress) + let url = Utils.getEtherscanUrl(d.chains.mainnet, root.areTestNetworksEnabled, d.cleanSelectedAddress, d.isAddress) Global.openLink(url) } } @@ -227,8 +225,7 @@ StatusMenu { text: d.getViewText(qsTr("Arbiscan")) icon.name: "link" onTriggered: { - let url = Utils.getEtherscanUrl(d.chains.arbitrum, root.areTestNetworksEnabled, !root.isGoerliEnabled, - d.cleanSelectedAddress, d.isAddress) + let url = Utils.getEtherscanUrl(d.chains.arbitrum, root.areTestNetworksEnabled, d.cleanSelectedAddress, d.isAddress) Global.openLink(url) } } @@ -238,8 +235,7 @@ StatusMenu { text: d.getViewText(qsTr("Optimism Explorer")) icon.name: "link" onTriggered: { - let url = Utils.getEtherscanUrl(d.chains.optimism, root.areTestNetworksEnabled, !root.isGoerliEnabled, - d.cleanSelectedAddress, d.isAddress) + let url = Utils.getEtherscanUrl(d.chains.optimism, root.areTestNetworksEnabled, d.cleanSelectedAddress, d.isAddress) Global.openLink(url) } } diff --git a/ui/app/AppLayouts/Wallet/stores/RootStore.qml b/ui/app/AppLayouts/Wallet/stores/RootStore.qml index d58e1f2d68..c28fb9eb22 100644 --- a/ui/app/AppLayouts/Wallet/stores/RootStore.qml +++ b/ui/app/AppLayouts/Wallet/stores/RootStore.qml @@ -54,7 +54,6 @@ QtObject { property CollectiblesStore collectiblesStore: CollectiblesStore {} readonly property bool areTestNetworksEnabled: networksModule.areTestNetworksEnabled - readonly property bool isGoerliEnabled: profileSectionModule.walletModule.networksModule.isGoerliEnabled property var savedAddresses: SortFilterProxyModel { sourceModel: walletSectionSavedAddresses.model @@ -405,30 +404,18 @@ QtObject { let link = Constants.networkExplorerLinks.etherscan if (networkShortName === Constants.networkShortChainNames.mainnet) { if (root.areTestNetworksEnabled) { - if (!root.isGoerliEnabled) { - link = Constants.networkExplorerLinks.sepoliaEtherscan - } else { - link = Constants.networkExplorerLinks.goerliEtherscan - } + link = Constants.networkExplorerLinks.sepoliaEtherscan } } if (networkShortName === Constants.networkShortChainNames.arbitrum) { link = Constants.networkExplorerLinks.arbiscan if (root.areTestNetworksEnabled) { - if (!root.isGoerliEnabled) { - link = Constants.networkExplorerLinks.sepoliaArbiscan - } else { - link = Constants.networkExplorerLinks.goerliArbiscan - } + link = Constants.networkExplorerLinks.sepoliaArbiscan } } else if (networkShortName === Constants.networkShortChainNames.optimism) { link = Constants.networkExplorerLinks.optimism if (root.areTestNetworksEnabled) { - if (!root.isGoerliEnabled) { - link = Constants.networkExplorerLinks.sepoliaOptimism - } else { - link = Constants.networkExplorerLinks.goerliOptimism - } + link = Constants.networkExplorerLinks.sepoliaOptimism } } return link @@ -458,30 +445,18 @@ QtObject { let networkName = Constants.openseaExplorerLinks.ethereum if (networkShortName === Constants.networkShortChainNames.mainnet) { if (root.areTestNetworksEnabled) { - if (!root.isGoerliEnabled) { - networkName = Constants.openseaExplorerLinks.sepoliaEthereum - } else { - networkName = Constants.openseaExplorerLinks.goerliEthereum - } + networkName = Constants.openseaExplorerLinks.sepoliaEthereum } } if (networkShortName === Constants.networkShortChainNames.arbitrum) { networkName = Constants.openseaExplorerLinks.arbitrum if (root.areTestNetworksEnabled) { - if (!root.isGoerliEnabled) { - networkName = Constants.openseaExplorerLinks.sepoliaArbitrum - } else { - networkName = Constants.openseaExplorerLinks.goerliArbitrum - } + networkName = Constants.openseaExplorerLinks.sepoliaArbitrum } } else if (networkShortName === Constants.networkShortChainNames.optimism) { networkName = Constants.openseaExplorerLinks.optimism if (root.areTestNetworksEnabled) { - if (!root.isGoerliEnabled) { - networkName = Constants.openseaExplorerLinks.sepoliaOptimism - } else { - networkName = Constants.openseaExplorerLinks.goerliOptimism - } + networkName = Constants.openseaExplorerLinks.sepoliaOptimism } } return networkName diff --git a/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml b/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml index e1e6581243..75dc66fd20 100644 --- a/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml +++ b/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml @@ -149,7 +149,6 @@ ColumnLayout { colorId: model.colorId networkConnectionStore: root.networkConnectionStore areTestNetworksEnabled: RootStore.areTestNetworksEnabled - isGoerliEnabled: RootStore.isGoerliEnabled onOpenSendModal: root.sendModal.open(recipient); states: [ diff --git a/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml b/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml index bf7c60f824..6f03a70ea6 100644 --- a/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml @@ -219,7 +219,6 @@ Item { tokenId: d.isTransactionValid ? transaction.tokenID : "" tokenAddress: d.isTransactionValid ? transaction.tokenAddress : "" areTestNetworksEnabled: WalletStores.RootStore.areTestNetworksEnabled - isGoerliEnabled: WalletStores.RootStore.isGoerliEnabled } Column { @@ -819,7 +818,6 @@ Item { id: addressMenu areTestNetworksEnabled: WalletStores.RootStore.areTestNetworksEnabled - isGoerliEnabled: WalletStores.RootStore.isGoerliEnabled contactsStore: root.contactsStore networkConnectionStore: root.networkConnectionStore onOpenSendModal: (address) => root.sendModal.open(address) diff --git a/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml b/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml index f3972198a4..b91afa6319 100644 --- a/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml +++ b/ui/imports/shared/popups/keycard/helpers/KeyPairUnknownItem.qml @@ -144,7 +144,6 @@ Rectangle { onClicked: { let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, WalletStore.RootStore.areTestNetworksEnabled, - WalletStore.RootStore.isGoerliEnabled, model.account.address) Global.openLink(link) } diff --git a/ui/imports/shared/popups/keycard/states/ManageAccounts.qml b/ui/imports/shared/popups/keycard/states/ManageAccounts.qml index 7abf2c4ca8..982a58e1e0 100644 --- a/ui/imports/shared/popups/keycard/states/ManageAccounts.qml +++ b/ui/imports/shared/popups/keycard/states/ManageAccounts.qml @@ -189,7 +189,6 @@ Item { onClicked: { let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, WalletStore.RootStore.areTestNetworksEnabled, - WalletStore.RootStore.isGoerliEnabled, root.sharedKeycardModule.keyPairHelper.observedAccount.address) Global.openLink(link) } diff --git a/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml b/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml index e5b7cddf98..95e8ceb449 100644 --- a/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml +++ b/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml @@ -156,7 +156,6 @@ Item { onTriggered: { let link = Utils.getUrlForAddressOnNetwork(Constants.networkShortChainNames.mainnet, root.walletStore.areTestNetworksEnabled, - root.walletStore.isGoerliEnabled, contextMenu.accountAddress); Global.openLinkWithConfirmation(link, StatusQUtils.StringUtils.extractDomainFromLink(link)); } diff --git a/ui/imports/utils/Constants.qml b/ui/imports/utils/Constants.qml index b1259f5be7..3848cc5854 100644 --- a/ui/imports/utils/Constants.qml +++ b/ui/imports/utils/Constants.qml @@ -900,9 +900,6 @@ QtObject { readonly property string mainnet: "eth" readonly property string arbitrum: "arb1" readonly property string optimism: "oeth" - - readonly property string optimism_goerli: "goOpt" - readonly property string arbitrum_goerli: "goArb" } readonly property QtObject networkExplorerLinks: QtObject { @@ -910,10 +907,6 @@ QtObject { readonly property string arbiscan: "https://arbiscan.io" readonly property string optimism: "https://optimistic.etherscan.io" - readonly property string goerliEtherscan: "https://goerli.etherscan.io" - readonly property string goerliArbiscan: "https://goerli.arbiscan.io" - readonly property string goerliOptimism: "https://goerli-optimism.etherscan.io" - readonly property string sepoliaEtherscan: "https://sepolia.etherscan.io/" readonly property string sepoliaArbiscan: "https://sepolia.arbiscan.io/" readonly property string sepoliaOptimism: "https://sepolia-optimism.etherscan.io/" @@ -930,10 +923,6 @@ QtObject { readonly property string arbitrum: "arbitrum" readonly property string optimism: "optimism" - readonly property string goerliEthereum: "goerli" - readonly property string goerliArbitrum: "arbitrum-goerli" - readonly property string goerliOptimism: "optimism-goerli" - readonly property string sepoliaEthereum: "sepolia" readonly property string sepoliaArbitrum: "arbitrum-sepolia" readonly property string sepoliaOptimism: "optimism-sepolia" diff --git a/ui/imports/utils/Utils.qml b/ui/imports/utils/Utils.qml index e4df6b59d4..81d24e2017 100644 --- a/ui/imports/utils/Utils.qml +++ b/ui/imports/utils/Utils.qml @@ -609,36 +609,24 @@ QtObject { Theme.palette.warningColor1 } - function getEtherscanUrl(networkShortName, testnetMode, sepoliaEnabled, addressOrTx, isAddressNotTx) { + function getEtherscanUrl(networkShortName, testnetMode, addressOrTx, isAddressNotTx) { const type = isAddressNotTx ? Constants.networkExplorerLinks.addressPath : Constants.networkExplorerLinks.txPath let link = Constants.networkExplorerLinks.etherscan if (testnetMode) { - if (sepoliaEnabled) { - link = Constants.networkExplorerLinks.sepoliaEtherscan - } else { - link = Constants.networkExplorerLinks.goerliEtherscan - } + link = Constants.networkExplorerLinks.sepoliaEtherscan } if (networkShortName === Constants.networkShortChainNames.arbitrum) { link = Constants.networkExplorerLinks.arbiscan if (testnetMode) { - if (sepoliaEnabled) { - link = Constants.networkExplorerLinks.sepoliaArbiscan - } else { - link = Constants.networkExplorerLinks.goerliArbiscan - } + link = Constants.networkExplorerLinks.sepoliaArbiscan } } else if (networkShortName === Constants.networkShortChainNames.optimism) { link = Constants.networkExplorerLinks.optimism if (testnetMode) { - if (sepoliaEnabled) { - link = Constants.networkExplorerLinks.sepoliaOptimism - } else { - link = Constants.networkExplorerLinks.goerliOptimism - } + link = Constants.networkExplorerLinks.sepoliaOptimism } } @@ -646,13 +634,13 @@ QtObject { } // Etherscan URL for an address - function getUrlForAddressOnNetwork(networkShortName, testnetMode, sepoliaEnabled, address) { - return getEtherscanUrl(networkShortName, testnetMode, sepoliaEnabled, address, true /* is address */) + function getUrlForAddressOnNetwork(networkShortName, testnetMode, address) { + return getEtherscanUrl(networkShortName, testnetMode, address, true /* is address */) } // Etherscan URL for a transaction - function getUrlForTxOnNetwork(networkShortName, testnetMode, sepoliaEnabled, tx) { - return getEtherscanUrl(networkShortName, testnetMode, sepoliaEnabled, tx, false /* is TX */) + function getUrlForTxOnNetwork(networkShortName, testnetMode, tx) { + return getEtherscanUrl(networkShortName, testnetMode, tx, false /* is TX */) } // Leave this function at the bottom of the file as QT Creator messes up the code color after this