-
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.
- Loading branch information
Showing
5 changed files
with
80 additions
and
61 deletions.
There are no files selected for viewing
17 changes: 6 additions & 11 deletions
17
...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,19 +1,14 @@ | ||
<script lang="ts"> | ||
import { DrawerTemplate } from '@components' | ||
import { selectedChain, NetworkNamespace } from '@core/network' | ||
import { Router } from '@core/router' | ||
import { NetworkConfigRoute } from '../' | ||
import { EvmChainInformation, StardustInformation } from './components' | ||
import { EvmChainInformationDrawer, StardustInformationDrawer } from './components' | ||
export let drawerRouter: Router<NetworkConfigRoute> | ||
</script> | ||
|
||
<DrawerTemplate title={$selectedChain?.name} {drawerRouter}> | ||
<div class="w-full h-full px-6"> | ||
{#if $selectedChain && $selectedChain.namespace === NetworkNamespace.Evm} | ||
<EvmChainInformation network={$selectedChain} /> | ||
{:else if $selectedChain && $selectedChain.namespace === NetworkNamespace.Stardust} | ||
<StardustInformation /> | ||
{/if} | ||
</div> | ||
</DrawerTemplate> | ||
{#if $selectedChain && $selectedChain.namespace === NetworkNamespace.Evm} | ||
<EvmChainInformationDrawer network={$selectedChain} {drawerRouter} /> | ||
{:else if $selectedChain && $selectedChain.namespace === NetworkNamespace.Stardust} | ||
<StardustInformationDrawer network={$selectedChain} {drawerRouter} /> | ||
{/if} |
43 changes: 0 additions & 43 deletions
43
...esktop/views/dashboard/drawers/network-config/views/components/EvmChainInformation.svelte
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
.../views/dashboard/drawers/network-config/views/components/EvmChainInformationDrawer.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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<script lang="ts"> | ||
import { localize } from '@core/i18n' | ||
import { IEvmNetwork, IIscChain, NetworkType } from '@core/network' | ||
import { Table } from '@bloomwalletio/ui' | ||
import { DrawerTemplate } from '@components/drawers' | ||
import { NetworkConfigRoute } from '../../network-config-route.enum' | ||
import { Router } from '@core/router' | ||
export let drawerRouter: Router<NetworkConfigRoute> | ||
export let network: IEvmNetwork | ||
const localeKey = 'views.dashboard.drawers.networkConfig.chain' | ||
function isIscChain(network: IEvmNetwork): network is IIscChain { | ||
return network.type === NetworkType.Isc | ||
} | ||
</script> | ||
|
||
<DrawerTemplate title={network.name} {drawerRouter}> | ||
<div class="w-full h-full px-6"> | ||
<Table | ||
orientation="vertical" | ||
items={[ | ||
{ | ||
key: localize(`${localeKey}.chainId`), | ||
value: network.chainId ?? undefined, | ||
copyable: true, | ||
}, | ||
{ | ||
key: localize(`${localeKey}.rpcEndpoint`), | ||
value: network.rpcEndpoint ?? undefined, | ||
copyable: true, | ||
}, | ||
{ | ||
key: localize(`${localeKey}.explorerUrl`), | ||
value: network.explorerUrl ?? undefined, | ||
copyable: true, | ||
}, | ||
...(isIscChain(network) | ||
? [ | ||
{ | ||
key: localize(`${localeKey}.aliasAddress`), | ||
value: network.aliasAddress ?? undefined, | ||
copyable: true, | ||
}, | ||
] | ||
: []), | ||
]} | ||
/> | ||
</div> | ||
</DrawerTemplate> |
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
4 changes: 2 additions & 2 deletions
4
packages/desktop/views/dashboard/drawers/network-config/views/components/index.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { default as AddIscChainForm } from './AddIscChainForm.svelte' | ||
export { default as EvmChainInformation } from './EvmChainInformation.svelte' | ||
export { default as StardustInformation } from './StardustInformation.svelte' | ||
export { default as EvmChainInformationDrawer } from './EvmChainInformationDrawer.svelte' | ||
export { default as StardustInformationDrawer } from './StardustInformationDrawer.svelte' |