is trade buy

This commit is contained in:
Kirill Litvinov
2024-05-22 22:51:03 +03:00
parent 32836a2bde
commit ac6b331eca
9 changed files with 29 additions and 29 deletions

View File

@@ -19,7 +19,7 @@ export type GetSwapInfoParams = {
poolOnly?: boolean
}
walletAddress?: string
isExactReceive?: boolean
isTradeBuy?: boolean
}
export default async function getSwapInfo({
@@ -31,7 +31,7 @@ export default async function getSwapInfo({
aggregator,
options,
walletAddress,
isExactReceive = false,
isTradeBuy = false,
}: GetSwapInfoParams) {
if (amount === '') throw new Error('Amount can not be empty');
if (assetIn === '') throw new Error('AssetIn can not be empty');
@@ -68,7 +68,7 @@ export default async function getSwapInfo({
options?.poolOnly !== undefined && options.poolOnly
? 'pools'
: undefined,
isExactReceive,
isTradeBuy,
);
const { exchanges: swapExchanges } = swapInfo;