From afd905317f642d8f015d20813f0ac274b9da28bb Mon Sep 17 00:00:00 2001 From: Dwight Lyle Date: Wed, 21 Feb 2024 01:01:34 -0700 Subject: [PATCH 1/4] Fix empty proxy entries in Data Feeds list --- src/features/data/api/backend.ts | 2 +- src/features/data/api/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/data/api/backend.ts b/src/features/data/api/backend.ts index 5a0e9ef7a2a..576176cea10 100644 --- a/src/features/data/api/backend.ts +++ b/src/features/data/api/backend.ts @@ -13,7 +13,7 @@ export const getServerSideChainMetadata = async (chains: Chain[]): Promise ({ ...nw, - metadata: metadata.filter((meta) => meta.docs?.hidden !== true), + metadata: metadata.filter((meta) => meta.docs?.hidden !== true || meta.proxyAddress !== null), })) : undefined ) diff --git a/src/features/data/api/index.ts b/src/features/data/api/index.ts index 225daba93cc..8ca49000c65 100644 --- a/src/features/data/api/index.ts +++ b/src/features/data/api/index.ts @@ -48,7 +48,7 @@ export const getChainMetadata = async (chain: Chain): Promise ({ ...network, - metadata: metadata.filter((meta) => meta.docs?.hidden !== true), + metadata: metadata.filter((meta) => meta.docs?.hidden !== true || meta.proxyAddress !== null), })) : undefined ) From e8972fb3e4c836873350edc85ee7e5d36e3fd2c8 Mon Sep 17 00:00:00 2001 From: Dwight Lyle Date: Wed, 21 Feb 2024 01:53:55 -0700 Subject: [PATCH 2/4] Fix filter --- src/features/data/api/backend.ts | 4 +++- src/features/data/api/index.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/features/data/api/backend.ts b/src/features/data/api/backend.ts index 576176cea10..0b415a21b12 100644 --- a/src/features/data/api/backend.ts +++ b/src/features/data/api/backend.ts @@ -13,7 +13,9 @@ export const getServerSideChainMetadata = async (chains: Chain[]): Promise ({ ...nw, - metadata: metadata.filter((meta) => meta.docs?.hidden !== true || meta.proxyAddress !== null), + metadata: metadata.filter( + (meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount) + ), })) : undefined ) diff --git a/src/features/data/api/index.ts b/src/features/data/api/index.ts index 8ca49000c65..82082871c09 100644 --- a/src/features/data/api/index.ts +++ b/src/features/data/api/index.ts @@ -48,7 +48,9 @@ export const getChainMetadata = async (chain: Chain): Promise ({ ...network, - metadata: metadata.filter((meta) => meta.docs?.hidden !== true || meta.proxyAddress !== null), + metadata: metadata.filter( + (meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount) + ), })) : undefined ) From 61f450413170eb0f7ecabebf48ae23d89ecf634d Mon Sep 17 00:00:00 2001 From: Dwight Lyle Date: Wed, 21 Feb 2024 12:20:27 -0700 Subject: [PATCH 3/4] Fix Data Streams --- src/features/data/api/backend.ts | 2 +- src/features/data/api/index.ts | 2 +- src/features/feeds/components/Tables.tsx | 18 +++++++----------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/features/data/api/backend.ts b/src/features/data/api/backend.ts index 0b415a21b12..347a90b4104 100644 --- a/src/features/data/api/backend.ts +++ b/src/features/data/api/backend.ts @@ -14,7 +14,7 @@ export const getServerSideChainMetadata = async (chains: Chain[]): Promise ({ ...nw, metadata: metadata.filter( - (meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount) + (meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount || meta.feedId) ), })) : undefined diff --git a/src/features/data/api/index.ts b/src/features/data/api/index.ts index 82082871c09..73cfee18e44 100644 --- a/src/features/data/api/index.ts +++ b/src/features/data/api/index.ts @@ -49,7 +49,7 @@ export const getChainMetadata = async (chain: Chain): Promise ({ ...network, metadata: metadata.filter( - (meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount) + (meta) => meta.docs?.hidden !== true && (meta.proxyAddress || meta.transmissionsAccount || meta.feedId) ), })) : undefined diff --git a/src/features/feeds/components/Tables.tsx b/src/features/feeds/components/Tables.tsx index 24b8c0e10db..65866be670e 100644 --- a/src/features/feeds/components/Tables.tsx +++ b/src/features/feeds/components/Tables.tsx @@ -348,8 +348,14 @@ const StreamsTr = ({ network, proxy, showExtraDetails }) => (
- {feedCategories[proxy.docs.feedCategory] || ""} {proxy.pair[0]}/{proxy.pair[1]} + {proxy.docs.schema ? ( +
+ Schema: {proxy.docs.schema} +
+ ) : ( + "" + )}
{proxy.docs.shutdownDate && (
@@ -392,16 +398,6 @@ const StreamsTr = ({ network, proxy, showExtraDetails }) => (
- {proxy.docs.schema ? ( -
-
- Report schema: -
-
{proxy.docs.schema}
-
- ) : ( - "" - )} {proxy.docs.productType ? (
From 34ee151a179d07f63e8a589dca80f734a4f2c1c1 Mon Sep 17 00:00:00 2001 From: Dwight Lyle Date: Wed, 21 Feb 2024 12:38:27 -0700 Subject: [PATCH 4/4] Lint fix --- src/features/feeds/components/Tables.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/features/feeds/components/Tables.tsx b/src/features/feeds/components/Tables.tsx index 65866be670e..e85d48ead69 100644 --- a/src/features/feeds/components/Tables.tsx +++ b/src/features/feeds/components/Tables.tsx @@ -349,13 +349,7 @@ const StreamsTr = ({ network, proxy, showExtraDetails }) => (
{proxy.pair[0]}/{proxy.pair[1]} - {proxy.docs.schema ? ( -
- Schema: {proxy.docs.schema} -
- ) : ( - "" - )} + {proxy.docs.schema ?
Schema: {proxy.docs.schema}
: ""}
{proxy.docs.shutdownDate && (