Skip to content
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
1 change: 1 addition & 0 deletions apps/staking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@heroicons/react": "^2.1.4",
"@next/third-parties": "^14.2.5",
"@pythnetwork/hermes-client": "workspace:*",
"@pythnetwork/known-publishers": "workspace:*",
"@pythnetwork/staking-sdk": "workspace:*",
"@react-aria/toast": "3.0.0-beta.16",
"@react-hookz/web": "^24.0.4",
Expand Down
14 changes: 3 additions & 11 deletions apps/staking/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { HermesClient, PublisherCaps } from "@pythnetwork/hermes-client";
import { lookup } from "@pythnetwork/known-publishers";
import {
epochToDate,
extractPublisherData,
Expand All @@ -12,8 +13,6 @@ import {
import { PublicKey } from "@solana/web3.js";
import { z } from "zod";

import { KNOWN_PUBLISHERS } from "./known-publishers";

const publishersRankingSchema = z
.object({
publisher: z.string(),
Expand Down Expand Up @@ -49,9 +48,7 @@ type Data = {
m: bigint;
z: bigint;
integrityStakingPublishers: {
identity:
| (typeof KNOWN_PUBLISHERS)[keyof typeof KNOWN_PUBLISHERS]
| undefined;
identity: ReturnType<typeof lookup>;
publicKey: PublicKey;
stakeAccount: PublicKey | undefined;
selfStake: bigint;
Expand Down Expand Up @@ -270,12 +267,7 @@ const loadPublisherData = async (

return {
apyHistory,
identity: (
KNOWN_PUBLISHERS as Record<
string,
(typeof KNOWN_PUBLISHERS)[keyof typeof KNOWN_PUBLISHERS]
>
)[publisher.pubkey.toBase58()],
identity: lookup(publisher.pubkey.toBase58()),
numFeeds: numberOfSymbols ?? 0,
poolCapacity: getPublisherCap(publisherCaps, publisher.pubkey),
poolUtilization: publisher.totalDelegation,
Expand Down
12 changes: 3 additions & 9 deletions apps/staking/src/components/OracleIntegrityStaking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ChevronDoubleLeftIcon,
ChevronDoubleRightIcon,
} from "@heroicons/react/24/outline";
import type { lookup } from "@pythnetwork/known-publishers";
import { calculateApy } from "@pythnetwork/staking-sdk";
import { PublicKey } from "@solana/web3.js";
import clsx from "clsx";
Expand All @@ -21,8 +22,6 @@ import {
type SetStateAction,
type HTMLAttributes,
type FormEvent,
type ComponentType,
type SVGProps,
} from "react";
import { useFilter, useCollator } from "react-aria";
import {
Expand Down Expand Up @@ -1171,12 +1170,7 @@ type PublisherProps = {
totalStaked: bigint;
isSelf?: boolean | undefined;
publisher: {
identity:
| {
name: string;
icon: ComponentType<SVGProps<SVGSVGElement>>;
}
| undefined;
identity: ReturnType<typeof lookup>;
publicKey: PublicKey;
stakeAccount: PublicKey | undefined;
selfStake: bigint;
Expand Down Expand Up @@ -1723,7 +1717,7 @@ const PublisherIdentity = ({
props.children.identity ? (
<span className={clsx(className, withNameClassName)}>
<span>
{createElement(props.children.identity.icon, {
{createElement(props.children.identity.icon.monochrome, {
className: "mr-2 inline-block h-[20px] align-sub",
})}
<span className="mr-[0.5em]">{props.children.identity.name}</span>
Expand Down
38 changes: 0 additions & 38 deletions apps/staking/src/known-publishers.ts

This file was deleted.

6 changes: 0 additions & 6 deletions apps/staking/src/publisher-icons/blocksize.svg

This file was deleted.

3 changes: 0 additions & 3 deletions apps/staking/src/publisher-icons/elfomo.svg

This file was deleted.

5 changes: 0 additions & 5 deletions apps/staking/src/publisher-icons/finazon.svg

This file was deleted.

3 changes: 0 additions & 3 deletions apps/staking/src/publisher-icons/gluex.svg

This file was deleted.

6 changes: 0 additions & 6 deletions apps/staking/src/publisher-icons/ltp.svg

This file was deleted.

4 changes: 0 additions & 4 deletions apps/staking/src/publisher-icons/sentio.svg

This file was deleted.

4 changes: 0 additions & 4 deletions apps/staking/src/publisher-icons/woo.svg

This file was deleted.

Loading
Loading