Skip to content

Commit

Permalink
Update Apex url
Browse files Browse the repository at this point in the history
  • Loading branch information
mxiao-cll committed Feb 24, 2025
1 parent a7d1809 commit e641ff7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-dolphins-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/apex-adapter': patch
---

Update url
2 changes: 1 addition & 1 deletion packages/sources/apex/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const config = new AdapterConfig({
NAV_API_ENDPOINT: {
description: 'An API endpoint for Data Provider',
type: 'string',
default: 'https://api.apexgroup.com/v1/reports/NAV',
default: 'https://api.apexgroup.com/1ASkuiqAPUyZTQqYIK8RlC6G8tWupuC7/v1/reports/NAV',
},
AUTH_API_ENDPOINT: {
description: 'An auth API endpoint for Data Provider',
Expand Down
14 changes: 5 additions & 9 deletions packages/sources/apex/src/transport/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,14 @@ class NavTransport extends SubscriptionTransport<HttpTransportTypes> {
}

async getNav(accountName: string, token: string): Promise<NavResponseSchema> {
const baseURL = this.settings.NAV_API_ENDPOINT
const headers = {
Authorization: `Bearer ${token}`,
}
const requestConfig = {
baseURL,
headers,
params: {
accountName,
baseURL: this.settings.NAV_API_ENDPOINT,
url: `?accountName=${accountName}`,
headers: {
Authorization: `Bearer ${token}`,
},
}
const a = await this.requester.request(baseURL, requestConfig)
const a = await this.requester.request(JSON.stringify(requestConfig), requestConfig)
if (a.response.status == 401) {
throw new AdapterError({
statusCode: 502,
Expand Down

0 comments on commit e641ff7

Please sign in to comment.