Skip to content
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: create quote response submit method, typescript #312

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

anihamde
Copy link
Contributor

@anihamde anihamde commented Jan 7, 2025

This PR adds a method to submit a quote request from the client. It only adds this to the TS sdk, and it is not complete--it is meant just to serve as a quick reference for integrating routers.

user_wallet_address: quoteRequest.userWallet.toBase58(),
version: "v1" as const,
};
const response = await client.POST("/v1/opportunities/quote", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap it in try?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the error should be caught below, i don't think we wrap anything else in try in the JS SDK?

Copy link
Contributor

@danimhr danimhr Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The await should be wrapped in try, or it cause the whole process to be killed (if any throw happens in the POST function we used)

sdk/js/src/index.ts Outdated Show resolved Hide resolved
@anihamde anihamde merged commit dbd90a1 into main Jan 8, 2025
1 check failed
@anihamde anihamde deleted the feat/sdk-quote-req branch January 8, 2025 17:19
anihamde added a commit that referenced this pull request Jan 9, 2025
* create quote response submit method, typescript

* ignore generated files in linting

* bump package version

* convert to date

* add todo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants