Skip to content

Commit 459f7b1

Browse files
committed
fix(insights): do not display the token warning if the selected source is a replay symbol
1 parent 0ac50b6 commit 459f7b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/insights/src/components/PythProDemoCards/price-card.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
datasourceRequiresApiToken,
1919
getColorForDataSource,
2020
isAllowedSymbol,
21+
isReplaySymbol,
2122
} from "../../util/pyth-pro-demo";
2223

2324
type PriceCardProps = {
@@ -102,7 +103,9 @@ export function PythProDemoCard({
102103
{socketStatus && (
103104
<div className={classes.socketStatus}>
104105
{/* the token is either missing or it's a bad token */}
105-
{requiresToken && (!apiToken || socketStatus === "closed") ? (
106+
{!isReplaySymbol(selectedSource) &&
107+
requiresToken &&
108+
(!apiToken || socketStatus === "closed") ? (
106109
<>
107110
Please enter a good API token
108111
<br />

0 commit comments

Comments
 (0)