-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Peregrine Data External Adapter Submission #3590
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 0ef17bb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to run yarn as well as yarn test peregrine-fund-admin/test
packages/sources/peregrine-fund-admin/src/config/overrides.json
Outdated
Show resolved
Hide resolved
packages/sources/peregrine-fund-admin/test/integration/fixtures.ts
Outdated
Show resolved
Hide resolved
once changes are made, please run |
packages/sources/peregrine-fund-admin/test/integration/fixtures.ts
Outdated
Show resolved
Hide resolved
packages/sources/peregrine-fund-admin/test/integration/fixtures.ts
Outdated
Show resolved
Hide resolved
this has now been run and commited in latest for this PR. |
this has been run. |
what is the correct way to run test in my directory? I tried yarn test, etc. |
yarn test peregrine-fund-admin/test in root |
` PASS packages/sources/peregrine-fund-admin/test/integration/adapter.test.ts Test Suites: 1 passed, 1 total Please confirm running the integration tests pass as expected. |
Please run end to end manual tests as well on the package.
and request against your local EA with a curl like this (plus any additional params you add)
hope this will help with the e2e debugging 🙏 |
…rs-js Major Change Peregrine Fund Admin External Adapter
Updated Please
Should I run the yarn in the root of the directory or in the EA package |
@droconnel22 please run > yarn build; yarn start from the EA package dir, ie: $REPO/packages/sources/peregrine-fund-admin This will run an instance of your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file
@@ -0,0 +1,5 @@ | |||
--- | |||
'@chainlink/peregrine-fund-admin-adapter': patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'@chainlink/peregrine-fund-admin-adapter': patch | |
'@chainlink/peregrine-fund-admin-adapter': major |
API_BASE_URL: { | ||
description: 'Base URL to Fund Admin Server Endpoint', | ||
type: 'string', | ||
default: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default: '', | |
default: 'https://fund-admin-data-adapter-v1-960005989691.europe-west2.run.app', |
type: 'string', | ||
required: true, | ||
sensitive: true, | ||
default: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
API_RESERVE_ENDPOINT: { | ||
description: 'API Endpoint to get the latest Proof of Reserves for a given asset', | ||
type: 'string', | ||
default: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default: '', | |
default: '/api/v1/reserves', |
description: | ||
'An API endpoint for the latest Net Asset Value (NAV) calculation for a given asset', | ||
type: 'string', | ||
default: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default: '', | |
default: '/api/v1/nav', |
|
||
export interface ResponseSchema { | ||
equityNav: number | ||
seniorNav: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this changed on your side in the API response?
params: [param], | ||
request: { | ||
baseURL: config.API_BASE_URL, | ||
url: config.API_NAV_ENDPOINT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url: config.API_NAV_ENDPOINT, | |
url: `${config.API_NAV_ENDPOINT}/${param.assetId}`, |
return { | ||
params: param, | ||
response: { | ||
result: Number(response.data.equityNav), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result: Number(response.data.equityNav), | |
result: Number(equityNav), |
response: { | ||
result: Number(response.data.equityNav), | ||
data: { | ||
result: Number(response.data.equityNav), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result: Number(response.data.equityNav), | |
result: Number(equityNav), |
data: { | ||
result: Number(response.data.equityNav), | ||
timestamps: { | ||
providerIndicatedTimeUnixMs: Number(response.data.updateDateTime) * 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateDateTime returns a formatted string, not a number that can be cast. Please use a proper conversion here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the same changes as above nav.ts
file in this file as well.
Closes #ISSUE_NUMBER_GOES_HERE
Description
......
Changes
Steps to Test
Quality Assurance
infra-k8s
configuration file.adapter-secrets
configuration file or update the soak testing blacklist.test-payload.json
file with relevant requests.feature/x
,chore/x
,release/x
,hotfix/x
,fix/x
) or is created from Jira.