Skip to content

Commit

Permalink
add return amount simulate
Browse files Browse the repository at this point in the history
  • Loading branch information
vuonghuuhung committed Sep 9, 2024
1 parent 31b2306 commit c693a52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oraiswap-v3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraiswap-v3",
"version": "0.1.6-beta.7",
"version": "0.1.6-beta.8",
"main": "build/index.js",
"files": [
"build/"
Expand Down
2 changes: 2 additions & 0 deletions packages/oraiswap-v3/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,6 @@ export type ZapOutLiquidityResponse = {
operationFromX?: SwapOperation[];
operationFromY?: SwapOperation[];
positionIndex: number;
amountToX: bigint;
amountToY: bigint;
};
3 changes: 3 additions & 0 deletions packages/oraiswap-v3/src/zap-consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ export class ZapConsumer {
messages.operationFromX = xRouteInfo.routes ? generateMessageSwapOperation(xRouteInfo) : [];
messages.operationFromY = yRouteInfo.routes ? generateMessageSwapOperation(yRouteInfo) : [];

messages.amountToX = BigInt(xRouteInfo.returnAmount);
messages.amountToY = BigInt(yRouteInfo.returnAmount);

return messages;
}
}

0 comments on commit c693a52

Please sign in to comment.