Skip to content

Commit

Permalink
add swapnet client param includeRfq
Browse files Browse the repository at this point in the history
  • Loading branch information
novaliu86 committed Aug 7, 2024
1 parent c617885 commit b52a5d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export class SwapnetClient {
sellAmount: bigint | undefined,
buyAmount: bigint | undefined,
userAddress: string | undefined = undefined,
includeRfq: boolean | undefined = undefined,
): Promise<{
succeeded: true,
swapResponse: ISwapResponse,
Expand All @@ -100,7 +101,8 @@ export class SwapnetClient {
`buyToken=${buyTokenAddress}` +
(sellAmount !== undefined ? `&sellAmount=${sellAmount.toString()}` : "") +
(buyAmount !== undefined ? `&buyAmount=${buyAmount.toString()}` : "") +
(userAddress !== undefined ? `&userAddress=${userAddress}` : "");
(userAddress !== undefined ? `&userAddress=${userAddress}` : "") +
(includeRfq !== undefined ? `&includeRfq=${includeRfq}` : "");

const response = await fetch(url);
const { succeeded, error } = await resolveErrorAsync(response);
Expand Down

0 comments on commit b52a5d0

Please sign in to comment.