-
Notifications
You must be signed in to change notification settings - Fork 73
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
feat(endpoints): centralised all endpoints with types #438
feat(endpoints): centralised all endpoints with types #438
Conversation
// Get the version override for a particular endpoint | ||
// FIXME: We will remove this completly once v0.1 is deployed to all public networks | ||
if (isNode()) { | ||
versionOverride = process.env[`${params.endpoint.envName}`] || undefined; | ||
} |
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.
what is the purpose of this currently? It looks like a local test override but not completely sure.
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.
yea, it's local test override so we can test habanero, manzano and cayenne which are on v0
right now, and code freeze & develop
on v1
now
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.
seems good to me! thx
V1 = '/v1', | ||
} | ||
|
||
export const LIT_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.
Could be beneficial to add a type annotation for this, so that any typos in this array are flagged by compiler here, rather than getting a 'path is type string | undefined' some where else in the code.
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.
You're right! will do that in a separate PR!
Let's track it on Linear @Ansonhkg |
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.
LGTM!
feature/lit-3032-auth-unification-remove-all-v0-stuff-after-we-deployed-v1 |
|
44afb5c
into
feature/lit-2958-auth-unification-ts-tests
Description
This PR introduces a centralised location to store all our endpoints. They are typed, which allows us to easily switch to another endpoint version when we release new versions.
NOTE: A new PR should be made to remove version overriding and change the executeJs and pkpSign endpoints to v1.
Type of change
How Has This Been Tested?
I will create another PR for all the tests which will be merged into #435, and they will be tested all together.
Checklist: