From 4aee9c3111a33b570a43002f3340dc99a40d9089 Mon Sep 17 00:00:00 2001 From: Gamaliel Padillo Date: Thu, 21 Nov 2024 10:21:02 -0800 Subject: [PATCH 01/10] devop: start renames --- packages/extension/src/ui/action/App.vue | 6 +++--- .../ui/action/views/add-network/views/add-network-list.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index a251d0b00..357d16c40 100644 --- a/packages/extension/src/ui/action/App.vue +++ b/packages/extension/src/ui/action/App.vue @@ -12,8 +12,8 @@
- - Custom networks + + Other networks Lock Enkrypt @@ -535,7 +535,7 @@ const settingsAction = () => { closeMoreMenu(); settingsShow.value = !settingsShow.value; }; -const customNetworksAction = () => { +const otherNetworksAction = () => { closeMoreMenu(); addNetworkShow.value = !addNetworkShow.value; }; diff --git a/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue b/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue index c65031c57..f51aa286b 100644 --- a/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue +++ b/packages/extension/src/ui/action/views/add-network/views/add-network-list.vue @@ -4,7 +4,7 @@ class="add-network__header" :class="{ border: isHasScroll() && scrollProgress > 0 }" > -

Manage networks

+

Custom Networks & Testnets

From 8b22f8b98aef9477a9530d3a403603e9d2b707c5 Mon Sep 17 00:00:00 2001 From: Gamaliel Padillo Date: Fri, 22 Nov 2024 10:41:59 -0800 Subject: [PATCH 02/10] devop: minor changes --- .../views/add-network/components/add-network-search.vue | 9 +++++---- .../action/views/add-network/views/add-network-list.vue | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue b/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue index 085457d2b..580808a1a 100644 --- a/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue +++ b/packages/extension/src/ui/action/views/add-network/components/add-network-search.vue @@ -6,10 +6,11 @@ @@ -31,7 +32,7 @@ diff --git a/packages/extension/src/ui/action/views/add-network/views/add-custom-network.vue b/packages/extension/src/ui/action/views/add-network/views/add-custom-network.vue index ea1eaaec2..33b9a5877 100644 --- a/packages/extension/src/ui/action/views/add-network/views/add-custom-network.vue +++ b/packages/extension/src/ui/action/views/add-network/views/add-custom-network.vue @@ -86,9 +86,13 @@ import ArrowBack from '@action/icons/common/arrow-back.vue'; import LabelInput from '@action/components/label-input/index.vue'; import BaseButton from '@action/components/base-button/index.vue'; import Web3 from 'web3-eth'; -import { CustomEvmNetworkOptions } from '@/providers/ethereum/types/custom-evm-network'; +import { + CustomEvmNetwork, + CustomEvmNetworkOptions, +} from '@/providers/ethereum/types/custom-evm-network'; import { toHex } from 'web3-utils'; import CustomNetworksState from '@/libs/custom-networks-state'; +import NetworksState from '@/libs/networks-state'; interface NetworkConfigItem { name: string; @@ -105,6 +109,7 @@ interface NetworkConfigItem { } const customNetworksState = new CustomNetworksState(); +const networksState = new NetworksState(); const nameValue = ref(''); const nameInvalid = ref(false); @@ -256,6 +261,7 @@ const sendAction = async () => { }; await customNetworksState.addCustomNetwork(customNetworkOptions); + await networksState.setNetworkStatus(customNetworkOptions.name, true); nameValue.value = ''; symbolValue.value = ''; From b7fd8e31b08dd708b0e533c9368d1b8b40ce6123 Mon Sep 17 00:00:00 2001 From: Gamaliel Padillo Date: Wed, 27 Nov 2024 12:16:28 -0800 Subject: [PATCH 07/10] devop: remove extra styles --- packages/extension/src/ui/action/App.vue | 14 +-- .../components/add-network-item.vue | 99 +++++++++++++++++-- .../add-network/views/add-network-list.vue | 12 +-- 3 files changed, 101 insertions(+), 24 deletions(-) diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index b336b8fa3..c9b602b7f 100644 --- a/packages/extension/src/ui/action/App.vue +++ b/packages/extension/src/ui/action/App.vue @@ -80,7 +80,7 @@
@@ -201,13 +201,13 @@ const setActiveNetworks = async () => { }); networks.value = [ ...pinnedNetworks.value, - ...allNetworks.filter( - network => !pinnedNetworkNames.includes(network.name), - ), - ]; - networks.value = [ - ...networks.value.filter(network => !network.isTestNetwork), + ...allNetworks + .filter(network => !pinnedNetworkNames.includes(network.name)) + .filter(network => !network.isTestNetwork), ]; + // networks.value = [ + // ...networks.value.filter(network => !network.isTestNetwork), + // ]; // if (!pinnedNetworks.value.includes(currentNetwork.value)) { // setNetwork(pinnedNetworks.value[0]); // } diff --git a/packages/extension/src/ui/action/views/add-network/components/add-network-item.vue b/packages/extension/src/ui/action/views/add-network/components/add-network-item.vue index d93b2569c..10de4519a 100644 --- a/packages/extension/src/ui/action/views/add-network/components/add-network-item.vue +++ b/packages/extension/src/ui/action/views/add-network/components/add-network-item.vue @@ -18,20 +18,29 @@ > - - - - +

+ +

+