diff --git a/packages/desktop/components/NetworkCard.svelte b/packages/desktop/components/NetworkCard.svelte index 3702067c7a..73d63957e2 100644 --- a/packages/desktop/components/NetworkCard.svelte +++ b/packages/desktop/components/NetworkCard.svelte @@ -32,12 +32,8 @@ } function onCardClick(): void { - if (network.namespace === NetworkNamespace.Stardust) { - $networkConfigRouter.goTo(NetworkConfigRoute.NetworkSettings) - } else { - setSelectedChain(network) - $networkConfigRouter.goTo(NetworkConfigRoute.ChainInformation) - } + setSelectedChain(network) + $networkConfigRouter.goTo(NetworkConfigRoute.ChainInformation) } function onQrCodeIconClick(): void { diff --git a/packages/desktop/views/dashboard/drawers/network-config/NetworkConfigRouterView.svelte b/packages/desktop/views/dashboard/drawers/network-config/NetworkConfigRouterView.svelte index 9911a03f62..b4856bc3cc 100644 --- a/packages/desktop/views/dashboard/drawers/network-config/NetworkConfigRouterView.svelte +++ b/packages/desktop/views/dashboard/drawers/network-config/NetworkConfigRouterView.svelte @@ -9,7 +9,6 @@ ConfirmLedgerEvmAddressDrawer, ConnectedNetworksDrawer, EditNetworkDrawer, - NetworkSettingsDrawer, RemoveNetworkDrawer, } from './views' import { clearSelectedChain } from '@core/network' @@ -39,8 +38,6 @@ {:else if $networkConfigRoute === NetworkConfigRoute.ChainInformation} -{:else if $networkConfigRoute === NetworkConfigRoute.NetworkSettings} - {:else if $networkConfigRoute === NetworkConfigRoute.EditChain} {:else if $networkConfigRoute === NetworkConfigRoute.RemoveChain} diff --git a/packages/desktop/views/dashboard/drawers/network-config/components/index.ts b/packages/desktop/views/dashboard/drawers/network-config/components/index.ts deleted file mode 100644 index c7b236b2f6..0000000000 --- a/packages/desktop/views/dashboard/drawers/network-config/components/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as ConfigureNodeList } from './ConfigureNodeList.svelte' -export { default as LocalProofOfWork } from './LocalProofOfWork.svelte' diff --git a/packages/desktop/views/dashboard/drawers/network-config/network-config-route.enum.ts b/packages/desktop/views/dashboard/drawers/network-config/network-config-route.enum.ts index 31d9fcf02c..2231d60ae7 100644 --- a/packages/desktop/views/dashboard/drawers/network-config/network-config-route.enum.ts +++ b/packages/desktop/views/dashboard/drawers/network-config/network-config-route.enum.ts @@ -2,7 +2,6 @@ export enum NetworkConfigRoute { AddChain = 'addChain', ChainDepositAddress = 'chainDepositAddress', ChainInformation = 'chainInformation', - NetworkSettings = 'networkSettings', ConfirmLedgerEvmAddress = 'confirmLedgerEvmAddress', ConnectedChains = 'connectedChains', EditChain = 'editChain', diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/NetworkInformationDrawer.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/NetworkInformationDrawer.svelte index a0c49aa00f..f9511fac43 100644 --- a/packages/desktop/views/dashboard/drawers/network-config/views/NetworkInformationDrawer.svelte +++ b/packages/desktop/views/dashboard/drawers/network-config/views/NetworkInformationDrawer.svelte @@ -1,21 +1,14 @@ - -
- {#if evmNetwork?.type === NetworkType.Isc} - - {:else if evmNetwork?.type === NetworkType.Evm} - - {/if} -
-
+{#if $selectedChain && $selectedChain.namespace === NetworkNamespace.Evm} + +{:else if $selectedChain && $selectedChain.namespace === NetworkNamespace.Stardust} + +{/if} diff --git a/packages/desktop/views/dashboard/drawers/network-config/components/ConfigureNodeList.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/components/ConfigureNodeList.svelte similarity index 100% rename from packages/desktop/views/dashboard/drawers/network-config/components/ConfigureNodeList.svelte rename to packages/desktop/views/dashboard/drawers/network-config/views/components/ConfigureNodeList.svelte diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/components/EvmChainInformation.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/components/EvmChainInformation.svelte deleted file mode 100644 index f10df475cf..0000000000 --- a/packages/desktop/views/dashboard/drawers/network-config/views/components/EvmChainInformation.svelte +++ /dev/null @@ -1,4 +0,0 @@ - - - evm diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/components/EvmChainInformationDrawer.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/components/EvmChainInformationDrawer.svelte new file mode 100644 index 0000000000..6a337b7c9c --- /dev/null +++ b/packages/desktop/views/dashboard/drawers/network-config/views/components/EvmChainInformationDrawer.svelte @@ -0,0 +1,51 @@ + + + +
+ + + diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/components/IscChainInformation.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/components/IscChainInformation.svelte deleted file mode 100644 index 30770faf55..0000000000 --- a/packages/desktop/views/dashboard/drawers/network-config/views/components/IscChainInformation.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - -
diff --git a/packages/desktop/views/dashboard/drawers/network-config/components/LocalProofOfWork.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/components/LocalProofOfWork.svelte similarity index 100% rename from packages/desktop/views/dashboard/drawers/network-config/components/LocalProofOfWork.svelte rename to packages/desktop/views/dashboard/drawers/network-config/views/components/LocalProofOfWork.svelte diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/NetworkSettingsDrawer.svelte b/packages/desktop/views/dashboard/drawers/network-config/views/components/StardustInformationDrawer.svelte similarity index 79% rename from packages/desktop/views/dashboard/drawers/network-config/views/NetworkSettingsDrawer.svelte rename to packages/desktop/views/dashboard/drawers/network-config/views/components/StardustInformationDrawer.svelte index a0f6a48bd1..cc84436300 100644 --- a/packages/desktop/views/dashboard/drawers/network-config/views/NetworkSettingsDrawer.svelte +++ b/packages/desktop/views/dashboard/drawers/network-config/views/components/StardustInformationDrawer.svelte @@ -3,12 +3,14 @@ import { DrawerTemplate } from '@components' import { localize } from '@core/i18n' import { Router } from '@core/router' - import { activeProfile } from '@core/profile/stores' - import { NetworkConfigRoute } from '..' - import { ConfigureNodeList, LocalProofOfWork } from '../components' import { PopupId, closePopup, openPopup } from '@desktop/auxiliary/popup' + import ConfigureNodeList from './ConfigureNodeList.svelte' + import LocalProofOfWork from './LocalProofOfWork.svelte' + import { IStardustNetwork } from '@core/network' + import { NetworkConfigRoute } from '../../network-config-route.enum' export let drawerRouter: Router + export let network: IStardustNetwork let nodesContainer: HTMLElement @@ -31,7 +33,7 @@ } - +
diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/components/index.ts b/packages/desktop/views/dashboard/drawers/network-config/views/components/index.ts index 8be41f9615..7fbc354972 100644 --- a/packages/desktop/views/dashboard/drawers/network-config/views/components/index.ts +++ b/packages/desktop/views/dashboard/drawers/network-config/views/components/index.ts @@ -1,3 +1,3 @@ export { default as AddIscChainForm } from './AddIscChainForm.svelte' -export { default as EvmChainInformation } from './EvmChainInformation.svelte' -export { default as IscChainInformation } from './IscChainInformation.svelte' +export { default as EvmChainInformationDrawer } from './EvmChainInformationDrawer.svelte' +export { default as StardustInformationDrawer } from './StardustInformationDrawer.svelte' diff --git a/packages/desktop/views/dashboard/drawers/network-config/views/index.ts b/packages/desktop/views/dashboard/drawers/network-config/views/index.ts index 96dc427012..1f6483d1ca 100644 --- a/packages/desktop/views/dashboard/drawers/network-config/views/index.ts +++ b/packages/desktop/views/dashboard/drawers/network-config/views/index.ts @@ -4,5 +4,4 @@ export { default as NetworkInformationDrawer } from './NetworkInformationDrawer. export { default as ConfirmLedgerEvmAddressDrawer } from './ConfirmLedgerEvmAddressDrawer.svelte' export { default as ConnectedNetworksDrawer } from './ConnectedNetworksDrawer.svelte' export { default as EditNetworkDrawer } from './EditNetworkDrawer.svelte' -export { default as NetworkSettingsDrawer } from './NetworkSettingsDrawer.svelte' export { default as RemoveNetworkDrawer } from './RemoveNetworkDrawer.svelte' diff --git a/packages/shared/src/lib/core/network/stores/selected-chain.store.ts b/packages/shared/src/lib/core/network/stores/selected-chain.store.ts index 2edbe51534..629eb1024f 100644 --- a/packages/shared/src/lib/core/network/stores/selected-chain.store.ts +++ b/packages/shared/src/lib/core/network/stores/selected-chain.store.ts @@ -1,9 +1,9 @@ import { Writable, writable } from 'svelte/store' -import { IEvmNetwork } from '../interfaces' +import { Network } from '../types' -export const selectedChain: Writable = writable(undefined) +export const selectedChain: Writable = writable(undefined) -export function setSelectedChain(evmNetwork: IEvmNetwork): void { +export function setSelectedChain(evmNetwork: Network): void { selectedChain.set(evmNetwork) }