-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BLCKCHN-203] CronosId TS client Integration #9
base: main
Are you sure you want to change the base?
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@babel/[email protected], npm/@rollup/[email protected], npm/@rollup/[email protected], npm/[email protected], npm/[email protected] |
*/ | ||
export const resolveName = async (name: string): Promise<ApiResponse<ResolveNameResponse>> => { | ||
const chainId = Client.getChainId(); | ||
const url = `${BASE_URL}/api/v1/cdc-developer-platform/cronosid/resolve/${name}?chainId=${chainId}`; |
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.
how about using encodeURIComponent for name, chainId?
}); | ||
|
||
if (!response.ok) { | ||
const errorBody = await response.json(); |
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.
how about adding validation whether response is json
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
Pull Request Template
Description
https://mcoproduct.atlassian.net/browse/BLCKCHN-203
Screen.Recording.2024-12-25.at.3.15.07.PM.mov
Type of change
Checklist:
Before you submit the pull request, please review the following checklist:
Linked Issues
Mention the issues that are addressed by this PR. You can use the
#
symbol to link an issue.