diff --git a/apps/insights/src/components/PriceComponentDrawer/index.tsx b/apps/insights/src/components/PriceComponentDrawer/index.tsx
index 349db5aafc..978583745f 100644
--- a/apps/insights/src/components/PriceComponentDrawer/index.tsx
+++ b/apps/insights/src/components/PriceComponentDrawer/index.tsx
@@ -31,6 +31,7 @@ import { StateType, useData } from "../../hooks/use-data";
import { Cluster, ClusterToName } from "../../services/pyth";
import type { Status } from "../../status";
import { LiveConfidence, LivePrice, LiveComponentValue } from "../LivePrices";
+import { PriceName } from "../PriceName";
import { Score } from "../Score";
import { Status as StatusComponent } from "../Status";
@@ -48,6 +49,7 @@ type Props = {
publisherKey: string;
symbol: string;
displaySymbol: string;
+ assetClass: string;
feedKey: string;
score: number | undefined;
rank: number | undefined;
@@ -63,6 +65,7 @@ export const PriceComponentDrawer = ({
onClose,
symbol,
displaySymbol,
+ assetClass,
feedKey,
score,
rank,
@@ -135,13 +138,21 @@ export const PriceComponentDrawer = ({
+ Aggregated
+ >
+ }
small
stat={ }
/>
+ Publisher
+ >
+ }
variant="primary"
small
stat={
diff --git a/apps/insights/src/components/PriceComponentsCard/index.tsx b/apps/insights/src/components/PriceComponentsCard/index.tsx
index f5ba71bed3..6f8406d903 100644
--- a/apps/insights/src/components/PriceComponentsCard/index.tsx
+++ b/apps/insights/src/components/PriceComponentsCard/index.tsx
@@ -30,6 +30,7 @@ import { EvaluationTime } from "../Explanations";
import { FormattedNumber } from "../FormattedNumber";
import { LivePrice, LiveConfidence, LiveComponentValue } from "../LivePrices";
import { NoResults } from "../NoResults";
+import { PriceName } from "../PriceName";
import rootStyles from "../Root/index.module.scss";
import { Score } from "../Score";
import { Status as StatusComponent } from "../Status";
@@ -45,6 +46,7 @@ type Props = {
searchPlaceholder: string;
onPriceComponentAction: (component: T) => void;
toolbarExtra?: ReactNode;
+ assetClass?: string | undefined;
};
type PriceComponent = {
@@ -279,6 +281,7 @@ type PriceComponentsCardProps = Pick<
| "label"
| "searchPlaceholder"
| "toolbarExtra"
+ | "assetClass"
> &
(
| { isLoading: true }
@@ -369,7 +372,10 @@ export const PriceComponentsCardContents = ({
},
})}
items={[
- { id: "prices", children: "Prices" },
+ {
+ id: "prices",
+ children: ,
+ },
{ id: "quality", children: "Quality" },
]}
/>
@@ -456,8 +462,9 @@ export const PriceComponentsCardContents = ({
const otherColumns = ({
metricsTime,
+ assetClass,
...props
-}: { metricsTime?: Date | undefined } & (
+}: { metricsTime?: Date | undefined; assetClass?: string | undefined } & (
| { isLoading: true }
| { isLoading?: false; showQuality: boolean }
)) => {
@@ -500,8 +507,8 @@ const otherColumns = ({
DEVIATION SCORE
- Deviation measures how close a publisher{"'"}s price is to
- what Pyth believes to be the true market price.
+ Deviation measures how close a publisher{"'"}s quote is to
+ what Pyth believes to be the true market quote.
{metricsTime && }
A feed is considered stalled if it is publishing the same
- value repeatedly for the price. This score component is
+ value repeatedly for the quote. This score component is
reduced each time a feed is stalled.
{metricsTime && }
@@ -584,7 +591,12 @@ const otherColumns = ({
]
: [
{ id: "slot", name: "SLOT", alignment: "left" as const, width: 40 },
- { id: "price", name: "PRICE", alignment: "left" as const, width: 40 },
+ {
+ id: "price",
+ name: ,
+ alignment: "left" as const,
+ width: 40,
+ },
{
id: "confidence",
name: "CONFIDENCE INTERVAL",
diff --git a/apps/insights/src/components/PriceFeed/layout.tsx b/apps/insights/src/components/PriceFeed/layout.tsx
index 8fab8cd2ab..1d1c90df3c 100644
--- a/apps/insights/src/components/PriceFeed/layout.tsx
+++ b/apps/insights/src/components/PriceFeed/layout.tsx
@@ -26,6 +26,7 @@ import {
PriceFeedChangePercent,
} from "../PriceFeedChangePercent";
import { PriceFeedTag } from "../PriceFeedTag";
+import { PriceName } from "../PriceName";
import { TabPanel, TabRoot, Tabs } from "../Tabs";
type Props = {
@@ -110,7 +111,11 @@ export const PriceFeedLayout = async ({ children, params }: Props) => {
+ Aggregated
+ >
+ }
stat={
{
}
/>
+ 1-Day Change
+ >
+ }
stat={
{
const logger = useLogger();
@@ -91,6 +93,7 @@ const ResolvedPublishersCard = ({
)}
diff --git a/apps/insights/src/components/PriceFeed/publishers.tsx b/apps/insights/src/components/PriceFeed/publishers.tsx
index e265306ce9..8e8b5091d1 100644
--- a/apps/insights/src/components/PriceFeed/publishers.tsx
+++ b/apps/insights/src/components/PriceFeed/publishers.tsx
@@ -52,6 +52,7 @@ export const Publishers = async ({ params }: Props) => {
nameLoadingSkeleton={ }
symbol={symbol}
displaySymbol={feed.product.display_symbol}
+ assetClass={feed.product.asset_type}
priceComponents={publishers.map(
({ ranking, publisher, status, cluster, knownPublisher }) => ({
id: `${publisher}-${ClusterToName[cluster]}`,
diff --git a/apps/insights/src/components/PriceFeeds/price-feeds-card.tsx b/apps/insights/src/components/PriceFeeds/price-feeds-card.tsx
index 77ba52774a..ddfd5b5be1 100644
--- a/apps/insights/src/components/PriceFeeds/price-feeds-card.tsx
+++ b/apps/insights/src/components/PriceFeeds/price-feeds-card.tsx
@@ -29,6 +29,7 @@ import {
} from "../LivePrices";
import { NoResults } from "../NoResults";
import { PriceFeedTag } from "../PriceFeedTag";
+import { PriceName } from "../PriceName";
import rootStyles from "../Root/index.module.scss";
type Props = {
@@ -317,7 +318,7 @@ const PriceFeedsCardContents = ({ id, ...props }: PriceFeedsCardContents) => (
},
{
id: "price",
- name: "PRICE",
+ name: ,
alignment: "right",
width: 40,
loadingSkeletonWidth: SKELETON_WIDTH,
diff --git a/apps/insights/src/components/PriceName/index.tsx b/apps/insights/src/components/PriceName/index.tsx
new file mode 100644
index 0000000000..d198422a5d
--- /dev/null
+++ b/apps/insights/src/components/PriceName/index.tsx
@@ -0,0 +1,54 @@
+type Props = {
+ assetClass?: string | undefined;
+ uppercase?: boolean | undefined;
+ plural?: boolean | undefined;
+};
+
+export const PriceName = ({ assetClass, uppercase, plural }: Props) =>
+ getLabels(assetClass)[plural ? "plural" : "singular"][
+ uppercase ? "upcase" : "title"
+ ];
+
+const getLabels = (assetClass?: string | undefined) => {
+ if (assetClass === undefined) {
+ return LABELS.ambiguous;
+ } else {
+ const lowercaseAssetClass = assetClass.toLowerCase();
+ return lowercaseAssetClass in LABELS
+ ? LABELS[lowercaseAssetClass as keyof typeof LABELS]
+ : LABELS.default;
+ }
+};
+
+const LABELS = {
+ rates: {
+ plural: {
+ upcase: "YIELDS",
+ title: "Yields",
+ },
+ singular: {
+ upcase: "YIELD",
+ title: "Yield",
+ },
+ },
+ ambiguous: {
+ plural: {
+ upcase: "PRICES / YIELDS",
+ title: "Prices / Yields",
+ },
+ singular: {
+ upcase: "PRICE / YIELD",
+ title: "Price / Yield",
+ },
+ },
+ default: {
+ plural: {
+ upcase: "PRICES",
+ title: "Prices",
+ },
+ singular: {
+ upcase: "PRICE",
+ title: "Price",
+ },
+ },
+};
diff --git a/apps/insights/src/components/Publisher/layout.tsx b/apps/insights/src/components/Publisher/layout.tsx
index 95d9d4aaf5..d67b818131 100644
--- a/apps/insights/src/components/Publisher/layout.tsx
+++ b/apps/insights/src/components/Publisher/layout.tsx
@@ -97,6 +97,7 @@ export const PublishersLayout = async ({ children, params }: Props) => {
score: ranking?.final_score,
rank: ranking?.final_rank,
firstEvaluation: ranking?.first_ranking_time,
+ assetClass: feed.product.asset_type,
status,
}))}
>
diff --git a/apps/insights/src/components/Publisher/price-feed-drawer-provider.tsx b/apps/insights/src/components/Publisher/price-feed-drawer-provider.tsx
index 6ea9a34dd6..51d91bd338 100644
--- a/apps/insights/src/components/Publisher/price-feed-drawer-provider.tsx
+++ b/apps/insights/src/components/Publisher/price-feed-drawer-provider.tsx
@@ -40,6 +40,7 @@ type PriceFeed = {
rank: number | undefined;
status: Status;
firstEvaluation: Date | undefined;
+ assetClass: string;
};
export const PriceFeedDrawerProvider = (
@@ -100,6 +101,7 @@ const PriceFeedDrawerProviderImpl = ({
navigateHref={feedHref}
title={ }
cluster={cluster}
+ assetClass={selectedFeed.assetClass}
/>
)}