@@ -60,7 +58,7 @@ const renderHeader = () => {
-
Overview
+ Supply Overview
diff --git a/explorer/src/components/TabbedPage.tsx b/explorer/src/components/TabbedPage.tsx
deleted file mode 100644
index 87fbfc0827..0000000000
--- a/explorer/src/components/TabbedPage.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import React from "react";
-import { Link } from "react-router-dom";
-import { useClusterModal } from "providers/cluster";
-import ClusterStatusButton from "components/ClusterStatusButton";
-import { pickCluster } from "utils/url";
-
-export type Tab = "Transactions" | "Accounts" | "Supply" | "Stats";
-
-type Props = { children: React.ReactNode; tab: Tab };
-export default function TabbedPage({ children, tab }: Props) {
- const [, setShow] = useClusterModal();
-
- return (
-
-
-
-
-
- setShow(true)} />
-
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- setShow(true)} />
-
-
-
-
-
- {children}
-
- );
-}
-
-function NavLink({
- href,
- tab,
- current,
-}: {
- href: string;
- tab: Tab;
- current: Tab;
-}) {
- let classes = "nav-link";
- if (tab === current) {
- classes += " active";
- }
-
- return (
- ({ ...pickCluster(location), pathname: href })}
- className={classes}
- >
- {tab}
-
- );
-}
diff --git a/explorer/src/components/TopAccountsCard.tsx b/explorer/src/components/TopAccountsCard.tsx
index 311f8dbaf7..3cbb293be9 100644
--- a/explorer/src/components/TopAccountsCard.tsx
+++ b/explorer/src/components/TopAccountsCard.tsx
@@ -124,7 +124,10 @@ const renderAccountRow = (
{lamportsToSolString(account.lamports, 0)} |
- {`${((100 * account.lamports) / supply).toFixed(3)}%`} |
+ {`${(
+ (100 * account.lamports) /
+ supply
+ ).toFixed(3)}%`} |
({
diff --git a/explorer/src/components/TransactionDetails.tsx b/explorer/src/components/TransactionDetails.tsx
index d74e033e74..1d1ddda495 100644
--- a/explorer/src/components/TransactionDetails.tsx
+++ b/explorer/src/components/TransactionDetails.tsx
@@ -6,18 +6,16 @@ import {
FetchStatus,
} from "../providers/transactions";
import { useFetchTransactionDetails } from "providers/transactions/details";
-import { useCluster, useClusterModal } from "providers/cluster";
+import { useCluster } from "providers/cluster";
import {
TransactionSignature,
SystemProgram,
StakeProgram,
SystemInstruction,
} from "@solana/web3.js";
-import ClusterStatusButton from "components/ClusterStatusButton";
import { lamportsToSolString } from "utils";
import { displayAddress } from "utils/tx";
import Copyable from "./Copyable";
-import { useHistory, useLocation } from "react-router-dom";
import { UnknownDetailsCard } from "./instruction/UnknownDetailsCard";
import { SystemDetailsCard } from "./instruction/system/SystemDetailsCard";
import { StakeDetailsCard } from "./instruction/stake/StakeDetailsCard";
@@ -31,63 +29,20 @@ import { isCached } from "providers/transactions/cached";
type Props = { signature: TransactionSignature };
export default function TransactionDetails({ signature }: Props) {
const fetchTransaction = useFetchTransactionStatus();
- const [, setShow] = useClusterModal();
- const [search, setSearch] = React.useState(signature);
- const history = useHistory();
- const location = useLocation();
-
- const updateSignature = () => {
- history.push({ ...location, pathname: "/tx/" + search });
- };
// Fetch transaction on load
React.useEffect(() => {
fetchTransaction(signature);
}, [signature]); // eslint-disable-line react-hooks/exhaustive-deps
- const searchInput = (
- setSearch(e.target.value)}
- onKeyUp={(e) => e.key === "Enter" && updateSignature()}
- className="form-control form-control-prepended search text-monospace"
- placeholder="Search for signature"
- />
- );
-
return (
-
-
- Details
- Transaction
-
-
- setShow(true)} />
-
-
-
-
-
-
-
- {searchInput}
-
-
+ Transaction
+
+ {signature}
+
diff --git a/explorer/src/components/TransactionsCard.tsx b/explorer/src/components/TransactionsCard.tsx
deleted file mode 100644
index 22b81cbdda..0000000000
--- a/explorer/src/components/TransactionsCard.tsx
+++ /dev/null
@@ -1,177 +0,0 @@
-import React from "react";
-import { Link } from "react-router-dom";
-import {
- useTransactions,
- TransactionStatus,
- FetchStatus,
- useFetchTransactionStatus,
-} from "../providers/transactions";
-import bs58 from "bs58";
-import { assertUnreachable } from "../utils";
-import Copyable from "./Copyable";
-
-function TransactionsCard() {
- const { transactions, idCounter } = useTransactions();
- const fetchTransaction = useFetchTransactionStatus();
- const signatureInput = React.useRef (null);
- const [error, setError] = React.useState("");
-
- const onNew = (signature: string) => {
- if (signature.length === 0) return;
- try {
- const length = bs58.decode(signature).length;
- if (length > 64) {
- setError("Signature is too long");
- return;
- } else if (length < 64) {
- setError("Signature is too short");
- return;
- }
- } catch (err) {
- setError(`${err}`);
- return;
- }
-
- fetchTransaction(signature);
- const inputEl = signatureInput.current;
- if (inputEl) {
- inputEl.value = "";
- }
- };
-
- return (
-
- );
-}
-
-const renderHeader = () => {
- return (
-
-
-
- Look Up Transaction(s)
-
-
-
- );
-};
-
-const renderTransactionRow = (transactionStatus: TransactionStatus) => {
- const { fetchStatus, info, signature, id } = transactionStatus;
-
- let statusText;
- let statusClass;
- switch (fetchStatus) {
- case FetchStatus.FetchFailed:
- statusClass = "dark";
- statusText = "Cluster Error";
- break;
- case FetchStatus.Fetching:
- statusClass = "info";
- statusText = "Fetching";
- break;
- case FetchStatus.Fetched: {
- if (!info) {
- statusClass = "warning";
- statusText = "Not Found";
- } else if (info.result.err) {
- statusClass = "danger";
- statusText = "Failed";
- } else {
- statusClass = "success";
- statusText = "Success";
- }
- break;
- }
- default:
- return assertUnreachable(fetchStatus);
- }
-
- let slotText = "-";
- let confirmationsText = "-";
- if (info) {
- slotText = `${info.slot}`;
- confirmationsText = `${info.confirmations}`;
- }
-
- return (
-
-
- {id}
- |
-
- {statusText}
- |
-
-
- {signature}
-
- |
- {confirmationsText} |
- {slotText} |
-
- ({ ...location, pathname: "/tx/" + signature })}
- className="btn btn-rounded-circle btn-white btn-sm"
- >
-
-
- |
-
- );
-};
-
-export default TransactionsCard;
diff --git a/explorer/src/scss/_solana-variables.scss b/explorer/src/scss/_solana-variables.scss
index 7d409738b0..154f8e1612 100644
--- a/explorer/src/scss/_solana-variables.scss
+++ b/explorer/src/scss/_solana-variables.scss
@@ -31,10 +31,10 @@ $rainbow-3: #79abd2;
$rainbow-4: #38d0bd;
$rainbow-5: #1dd79b;
-$primary: #65D39F;
+$success: #42ba96;
+$primary: $success;
$primary-desat: #42ba96;
$secondary: $gray-700;
-$success: #42ba96;
$info: #b45be1;
$info-muted: #9272a3;
$warning: #d83aeb;
|