Skip to content

Commit

Permalink
fix: update path for aggregator name
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Feb 5, 2024
1 parent 7a09641 commit dfc6684
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cli/src/delegator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions cli/src/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions cli/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit dfc6684

Please sign in to comment.