From ed3b46440ef284d998b68593ea69b3bf975ad8fb Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 5 Feb 2024 17:00:20 +0900 Subject: [PATCH] fix: update path for aggregator name --- cli/src/delegator.ts | 4 ++-- cli/src/listener.ts | 4 ++-- cli/src/reporter.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/src/delegator.ts b/cli/src/delegator.ts index 7f1e6e854..22f55088d 100644 --- a/cli/src/delegator.ts +++ b/cli/src/delegator.ts @@ -306,8 +306,8 @@ export function reporterListHandler() { const url = new URL(AGGREGATOR_ENDPOINT) url.searchParams.append('address', reporter.contract[0]) const aggregatorResult = (await axios.get(url.toString())).data - if (aggregatorResult && aggregatorResult.name) { - reporter.name = aggregatorResult.name + if (aggregatorResult && aggregatorResult[0].name) { + reporter.name = aggregatorResult[0].name } } diff --git a/cli/src/listener.ts b/cli/src/listener.ts index 08a5884c0..5d37c9871 100644 --- a/cli/src/listener.ts +++ b/cli/src/listener.ts @@ -134,8 +134,8 @@ export function listHandler(print?: boolean) { const url = new URL(AGGREGATOR_ENDPOINT) url.searchParams.append('address', listener.address) const aggregatorResult = (await axios.get(url.toString())).data - if (aggregatorResult && aggregatorResult.name) { - listener.name = aggregatorResult.name + if (aggregatorResult && aggregatorResult[0].name) { + listener.name = aggregatorResult[0].name } } diff --git a/cli/src/reporter.ts b/cli/src/reporter.ts index 75ca2ac1a..42410f9d6 100644 --- a/cli/src/reporter.ts +++ b/cli/src/reporter.ts @@ -157,8 +157,8 @@ export function listHandler(print?: boolean) { const url = new URL(AGGREGATOR_ENDPOINT) url.searchParams.append('address', reporter.oracleAddress) const aggregatorResult = (await axios.get(url.toString())).data - if (aggregatorResult && aggregatorResult.name) { - reporter.name = aggregatorResult.name + if (aggregatorResult && aggregatorResult[0].name) { + reporter.name = aggregatorResult[0].name } }