Skip to content

Commit

Permalink
make small changes for initial deploy for eclipse devnet
Browse files Browse the repository at this point in the history
  • Loading branch information
dlin128 committed Oct 26, 2023
1 parent e7ee73d commit 059652a
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 23 deletions.
Binary file modified app/apple-icon.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import Logo from '@img/logos-solana/dark-explorer-logo.svg';
import Logo from '@img/logos-eclipse/Eclipse_LogoType_White.svg';
import { useClusterPath } from '@utils/url';
import Image from 'next/image';
import Link from 'next/link';
Expand All @@ -21,7 +21,7 @@ export function Navbar() {
<nav className="navbar navbar-expand-md navbar-light">
<div className="container">
<Link href={homePath}>
<Image alt="Solana Explorer" height={22} src={Logo} width={250} />
<Image alt="Eclipse Explorer" height={45} src={Logo} width={200} />
</Link>

<button className="navbar-toggler" type="button" onClick={() => setCollapse(value => !value)}>
Expand Down
Binary file modified app/favicon.ico
Binary file not shown.
74 changes: 74 additions & 0 deletions app/img/logos-eclipse/Eclipse_LogoType_Green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions app/img/logos-eclipse/Eclipse_LogoType_White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 18 additions & 19 deletions app/utils/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ export enum ClusterStatus {
}

export enum Cluster {
MainnetBeta,
Testnet,

Devnet,
Custom,
}

export const CLUSTERS = [Cluster.MainnetBeta, Cluster.Testnet, Cluster.Devnet, Cluster.Custom];
export const CLUSTERS = [Cluster.Devnet, Cluster.Custom];

export function clusterSlug(cluster: Cluster): string {
switch (cluster) {
case Cluster.MainnetBeta:
return 'mainnet-beta';
case Cluster.Testnet:
return 'testnet';
// case Cluster.MainnetBeta:
// return 'mainnet-beta';
// case Cluster.Testnet:
// return 'testnet';
case Cluster.Devnet:
return 'devnet';
case Cluster.Custom:
Expand All @@ -28,20 +27,20 @@ export function clusterSlug(cluster: Cluster): string {

export function clusterName(cluster: Cluster): string {
switch (cluster) {
case Cluster.MainnetBeta:
return 'Mainnet Beta';
case Cluster.Testnet:
return 'Testnet';
// case Cluster.MainnetBeta:
// return 'Mainnet Beta';
// case Cluster.Testnet:
// return 'Testnet';
case Cluster.Devnet:
return 'Devnet';
case Cluster.Custom:
return 'Custom';
}
}

export const MAINNET_BETA_URL = 'https://api.mainnet-beta.solana.com';
export const TESTNET_URL = 'https://api.testnet.solana.com';
export const DEVNET_URL = 'https://api.devnet.solana.com';
// export const MAINNET_BETA_URL = 'https://api.mainnet-beta.solana.com';
// export const TESTNET_URL = 'https://api.testnet.solana.com';
export const DEVNET_URL = 'https://staging-rpc.dev.eclipsenetwork.xyz';

export function clusterUrl(cluster: Cluster, customUrl: string): string {
const modifyUrl = (url: string): string => {
Expand All @@ -55,13 +54,13 @@ export function clusterUrl(cluster: Cluster, customUrl: string): string {
switch (cluster) {
case Cluster.Devnet:
return process.env.NEXT_PUBLIC_DEVNET_RPC_URL ?? modifyUrl(DEVNET_URL);
case Cluster.MainnetBeta:
return process.env.NEXT_PUBLIC_MAINNET_RPC_URL ?? modifyUrl(MAINNET_BETA_URL);
case Cluster.Testnet:
return process.env.NEXT_PUBLIC_TESTNET_RPC_URL ?? modifyUrl(TESTNET_URL);
// case Cluster.MainnetBeta:
// return process.env.NEXT_PUBLIC_MAINNET_RPC_URL ?? modifyUrl(MAINNET_BETA_URL);
// case Cluster.Testnet:
// return process.env.NEXT_PUBLIC_TESTNET_RPC_URL ?? modifyUrl(TESTNET_URL);
case Cluster.Custom:
return customUrl;
}
}

export const DEFAULT_CLUSTER = Cluster.MainnetBeta;
export const DEFAULT_CLUSTER = Cluster.Devnet;
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Solana Explorer",
"name": "Inspect transactions, accounts, blocks, and more on the Solana blockchain",
"short_name": "Eclipse Explorer",
"name": "Inspect transactions, accounts, blocks, and more on the Eclipse L2",
"icons": [
{
"src": "favicon.ico",
Expand Down

0 comments on commit 059652a

Please sign in to comment.