-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rename selected chain to selected (#2431)
* add network information for evm chains * remove networksettingsdrawer and unify with network informations * cleanup information drawers * rename selected chain to selected * rename `selectedNetwork` to `selectedNetworkForNetworkDrawer` --------- Co-authored-by: Nicole O'Brien <[email protected]>
- Loading branch information
1 parent
d2aa87d
commit dc47edb
Showing
10 changed files
with
43 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ages/desktop/views/dashboard/drawers/network-config/views/NetworkInformationDrawer.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<script lang="ts"> | ||
import { selectedChain, NetworkNamespace } from '@core/network' | ||
import { selectedNetworkForNetworkDrawer, NetworkNamespace } from '@core/network' | ||
import { Router } from '@core/router' | ||
import { NetworkConfigRoute } from '../' | ||
import { EvmChainInformationDrawer, StardustInformationDrawer } from './components' | ||
export let drawerRouter: Router<NetworkConfigRoute> | ||
</script> | ||
|
||
{#if $selectedChain && $selectedChain.namespace === NetworkNamespace.Evm} | ||
<EvmChainInformationDrawer network={$selectedChain} {drawerRouter} /> | ||
{:else if $selectedChain && $selectedChain.namespace === NetworkNamespace.Stardust} | ||
<StardustInformationDrawer network={$selectedChain} {drawerRouter} /> | ||
{#if $selectedNetworkForNetworkDrawer && $selectedNetworkForNetworkDrawer.namespace === NetworkNamespace.Evm} | ||
<EvmChainInformationDrawer network={$selectedNetworkForNetworkDrawer} {drawerRouter} /> | ||
{:else if $selectedNetworkForNetworkDrawer && $selectedNetworkForNetworkDrawer.namespace === NetworkNamespace.Stardust} | ||
<StardustInformationDrawer network={$selectedNetworkForNetworkDrawer} {drawerRouter} /> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './networks.store' | ||
export * from './node-info.store' | ||
export * from './selected-chain.store' | ||
export * from './selected-network-for-network-drawer.store' |
12 changes: 0 additions & 12 deletions
12
packages/shared/src/lib/core/network/stores/selected-chain.store.ts
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/shared/src/lib/core/network/stores/selected-network-for-network-drawer.store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Writable, writable } from 'svelte/store' | ||
import { Network } from '../types' | ||
|
||
export const selectedNetworkForNetworkDrawer: Writable<Network | undefined> = writable(undefined) | ||
|
||
export function setSelectedNetworkForNetworkDrawer(evmNetwork: Network): void { | ||
selectedNetworkForNetworkDrawer.set(evmNetwork) | ||
} | ||
|
||
export function clearSelectedNetworkForNetworkDrawer(): void { | ||
selectedNetworkForNetworkDrawer.set(undefined) | ||
} |