Skip to content

Commit 287296e

Browse files
Merge branch 'main' into main
2 parents 601e4e7 + 09e5852 commit 287296e

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

.changeset/light-paws-jump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@chainlink/anchorage-adapter': minor
3+
---
4+
5+
Use different endpoint for COLLATERAL_API

packages/sources/anchorage/src/config/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ export const config = new AdapterConfig({
1212
type: 'string',
1313
sensitive: true,
1414
},
15+
COLLATERAL_API_ENDPOINT: {
16+
description: 'An API endpoint for Anchorage collateral_management endpoints',
17+
type: 'string',
18+
default: 'https://api.anchorage.com',
19+
},
1520
API_LIMIT: {
1621
description: 'The maximum number of results to request from the API',
1722
type: 'number',

packages/sources/anchorage/src/transport/packages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class PackagesTransport extends SubscriptionTransport<BaseEndpointTypes>
7171

7272
const response = await request<PackageResponse>(
7373
this.requester,
74-
this.settings.API_ENDPOINT,
74+
this.settings.COLLATERAL_API_ENDPOINT,
7575
'v2/collateral_management/packages',
7676
// Validated not null in endpoint
7777
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

packages/sources/anchorage/test/integration/adapter.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ describe('execute', () => {
1515
process.env.ETHHOL_API_KEY = 'fake-api-key'
1616
process.env.COLLATERAL_API_KEY = 'fake-collateral-api-key'
1717
process.env.API_ENDPOINT = 'https://localhost:3324'
18+
process.env.COLLATERAL_API_ENDPOINT = 'https://localhost:3325'
1819
process.env.API_LIMIT = '1'
1920
process.env.BACKGROUND_EXECUTE_MS = '0'
2021
const mockDate = new Date('2001-01-01T11:11:11.111Z')

packages/sources/anchorage/test/integration/fixtures.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const mockResponseSuccess = (): nock.Scope =>
157157
.persist()
158158

159159
export const mockPackagesResponseSuccess = (): nock.Scope =>
160-
nock('https://localhost:3324', {
160+
nock('https://localhost:3325', {
161161
encodedQueryParams: true,
162162
})
163163
.persist()

0 commit comments

Comments
 (0)