Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty proxy entries in Data Feeds list #1772

Merged
merged 5 commits into from
Feb 21, 2024
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
4 changes: 3 additions & 1 deletion src/features/data/api/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export const getServerSideChainMetadata = async (chains: Chain[]): Promise<Recor
type: "json", // we’ll parse JSON for you
}).then((metadata) => ({
...nw,
metadata: metadata.filter((meta) => meta.docs?.hidden !== true),
metadata: metadata.filter(
(meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount || meta.feedId)
),
}))
: undefined
)
Expand Down
4 changes: 3 additions & 1 deletion src/features/data/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export const getChainMetadata = async (chain: Chain): Promise<ChainMetadata | an
network?.rddUrl
? getFeedsMetadata(network?.rddUrl).then((metadata) => ({
...network,
metadata: metadata.filter((meta) => meta.docs?.hidden !== true),
metadata: metadata.filter(
(meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount || meta.feedId)
),
}))
: undefined
)
Expand Down
12 changes: 1 addition & 11 deletions src/features/feeds/components/Tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ const StreamsTr = ({ network, proxy, showExtraDetails }) => (
<tr>
<td class={tableStyles.pairCol}>
<div className={tableStyles.assetPair}>
{feedCategories[proxy.docs.feedCategory] || ""}
{proxy.pair[0]}/{proxy.pair[1]}
{proxy.docs.schema ? <div>Schema: {proxy.docs.schema}</div> : ""}
</div>
{proxy.docs.shutdownDate && (
<div className={clsx(feedList.shutDate)}>
Expand Down Expand Up @@ -392,16 +392,6 @@ const StreamsTr = ({ network, proxy, showExtraDetails }) => (
</div>
<div>
<dl class={tableStyles.porDl}>
{proxy.docs.schema ? (
<div>
<dt>
<span class="label">Report schema:</span>
</dt>
<dd>{proxy.docs.schema}</dd>
</div>
) : (
""
)}
{proxy.docs.productType ? (
<div>
<dt>
Expand Down
Loading