Skip to content

Commit 800734e

Browse files
committed
fix: added unknown network fallback
1 parent cd62b95 commit 800734e

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

shared/icons/network/network-icon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{#if icon}
1111
<div class="network-icon" aria-label={`Network: ${capitalize(network)}`}>
1212
<svelte:component this={icon} />
13-
<span>{capitalize(network)}</span>
13+
<span>{capitalize(network) || "Unknown"}</span>
1414
</div>
1515
{/if}
1616

shared/icons/unkown.svelte

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<svg
2+
width="24"
3+
height="24"
4+
viewBox="0 0 12 12"
5+
enable-background="new 0 0 12 12"
6+
id="Слой_1"
7+
version="1.1"
8+
xml:space="preserve"
9+
xmlns="http://www.w3.org/2000/svg"
10+
xmlns:xlink="http://www.w3.org/1999/xlink"
11+
fill="#000000"
12+
><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g
13+
id="SVGRepo_tracerCarrier"
14+
stroke-linecap="round"
15+
stroke-linejoin="round"
16+
></g><g id="SVGRepo_iconCarrier"
17+
><path
18+
d="M6,0C2.6862793,0,0,2.6862793,0,6s2.6862793,6,6,6s6-2.6862793,6-6S9.3137207,0,6,0z M6.5,9.5h-1v-1h1V9.5z M7.2651367,6.1738281C6.7329102,6.5068359,6.5,6.6845703,6.5,7v0.5h-1V7c0-0.9023438,0.7138672-1.3486328,1.2348633-1.6738281 C7.2670898,4.9931641,7.5,4.8154297,7.5,4.5c0-0.5517578-0.4487305-1-1-1h-1c-0.5512695,0-1,0.4482422-1,1V5h-1V4.5 c0-1.1025391,0.8969727-2,2-2h1c1.1030273,0,2,0.8974609,2,2C8.5,5.4023438,7.7861328,5.8486328,7.2651367,6.1738281z"
19+
fill="#1D1D1B"
20+
></path></g
21+
></svg
22+
>

shared/utils/getNetworkIcon.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import OptimismIcon from "../icons/network/optimism.svelte";
1414
import ArbitrumIcon from "../icons/network/arbitrum.svelte";
1515
import MoonbeamIcon from "../icons/network/moonbeam.svelte";
1616
import FantomIcon from "../icons/network/fantom.svelte";
17-
17+
import Unkown from "../icons/unkown.svelte";
1818
export const getNetworkIcon = (network: string) => {
1919
const icons = {
2020
bsc: BscIcon,
@@ -35,5 +35,5 @@ export const getNetworkIcon = (network: string) => {
3535
moonbeam: MoonbeamIcon,
3636
};
3737

38-
return icons[network] || EthereumIcon;
38+
return icons[network] || Unkown;
3939
};

0 commit comments

Comments
 (0)