Skip to content

Commit

Permalink
feat(JUP): jup exactOut add failback exactIn
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKozAllB committed Jul 18, 2024
1 parent 5f31af2 commit 0eaff99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/bridge/sol/jupiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,19 @@ export class JupiterService {

let transactionResponse: any;
try {
const APPLICATION_JSON = "application/json";
transactionResponse = await axios.post(
`${this.jupiterUrl}/swap`,
JSON.stringify({
quoteResponse: quoteResponse.data,
userPublicKey: userAddress,
wrapAndUnwrapSol: true,
})
}),
{
headers: {
"Content-Type": APPLICATION_JSON,
},
}
);
} catch (err) {
if (err instanceof AxiosError && err.response && err.response.data && err.response.data.error) {
Expand Down

0 comments on commit 0eaff99

Please sign in to comment.