Skip to content

Commit

Permalink
Fix empty proxy entries in Data Feeds list (#1772)
Browse files Browse the repository at this point in the history
* Fix empty proxy entries in Data Feeds list

* Fix filter

* Fix Data Streams

* Lint fix
  • Loading branch information
dwightjl authored Feb 21, 2024
1 parent 76fef3f commit 14ae8c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
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

0 comments on commit 14ae8c6

Please sign in to comment.