Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add nova new network type #1473

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/src/models/db/networkType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const SHIMMER = "shimmer";
const TESTNET = "testnet";
const IOTA_TESTNET = "iota-testnet";
const SHIMMER_TESTNET = "shimmer-testnet";
const IOTA2_TESTNET = "iota2-testnet";
const ALPHANET = "alphanet";
const CUSTOM = "custom";

Expand All @@ -19,6 +20,7 @@ const networkTypes = [
TESTNET,
IOTA_TESTNET,
SHIMMER_TESTNET,
IOTA2_TESTNET,
ALPHANET,
CUSTOM,
] as const;
Expand Down
15 changes: 13 additions & 2 deletions client/src/app/AppUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ import React, { ReactNode } from "react";
import { Helmet } from "react-helmet";
import NetworkContext from "./context/NetworkContext";
import { INetwork } from "~models/config/INetwork";
import { ALPHANET, CHRYSALIS_MAINNET, DEVNET, LEGACY_MAINNET, MAINNET, NetworkType, SHIMMER, TESTNET } from "~models/config/networkType";
import {
ALPHANET,
CHRYSALIS_MAINNET,
DEVNET,
IOTA2_TESTNET,
LEGACY_MAINNET,
MAINNET,
NetworkType,
SHIMMER,
TESTNET,
} from "~models/config/networkType";
import { IOTA_UI, Theme } from "~models/config/uiTheme";
import { IStardustNodeInfo } from "~services/stardust/nodeInfoService";
import { ServiceFactory } from "~/factories/serviceFactory";
Expand Down Expand Up @@ -132,7 +142,8 @@ export const buildMetaLabel = (network: NetworkType | undefined): string => {
metaLabel = "Shimmer Explorer";
break;
}
case TESTNET: {
case TESTNET:
case IOTA2_TESTNET: {
metaLabel = "Testnet Explorer";
break;
}
Expand Down
4 changes: 3 additions & 1 deletion client/src/helpers/networkHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
CHRYSALIS_MAINNET,
CUSTOM,
DEVNET,
IOTA2_TESTNET,
IOTA_TESTNET,
LEGACY_MAINNET,
MAINNET,
Expand All @@ -26,7 +27,8 @@ export const getNetworkOrder = (networkType: NetworkType) => {
case SHIMMER: {
return 1;
}
case IOTA_TESTNET: {
case IOTA_TESTNET:
case IOTA2_TESTNET: {
return 2;
}
case SHIMMER_TESTNET: {
Expand Down
2 changes: 2 additions & 0 deletions client/src/models/config/networkType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const SHIMMER = "shimmer";
export const TESTNET = "testnet";
export const IOTA_TESTNET = "iota-testnet";
export const SHIMMER_TESTNET = "shimmer-testnet";
export const IOTA2_TESTNET = "iota2-testnet";
export const ALPHANET = "alphanet";
export const CUSTOM = "custom";

Expand All @@ -20,6 +21,7 @@ export type NetworkType =
| typeof SHIMMER
| typeof TESTNET
| typeof IOTA_TESTNET
| typeof IOTA2_TESTNET
| typeof SHIMMER_TESTNET
| typeof ALPHANET
| typeof CUSTOM;
Loading