Skip to content

Commit

Permalink
TW-1622 Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
keshan3262 committed Dec 18, 2024
1 parent 5f55cbb commit 504eb76
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib/utils/swap.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,11 @@ export const getSwapTransferParams = async (
swapBeforeEstimateParams = [];
const xtzSwapOut = tokensToAtoms(chains.xtzTree.tokenOutAmount, toRoute3Token.decimals);
const tzbtcSwapOut = tokensToAtoms(chains.tzbtcTree.tokenOutAmount, toRoute3Token.decimals);
const xtzSwapMinOut = multiplyAtomicAmount(xtzSwapOut, slippageRatio, BigNumber.ROUND_FLOOR);
const tzbtcSwapMinOut = multiplyAtomicAmount(tzbtcSwapOut, slippageRatio, BigNumber.ROUND_FLOOR);
if (chains.xtzHops.length > 0) {
const xtzSwapMethod = swapContract.methodsObject.execute({
token_in_id: THREE_ROUTE_TEZ_TOKEN.id,
token_out_id: toRoute3Token.id,
min_out: xtzSwapMinOut,
min_out: multiplyAtomicAmount(xtzSwapOut, slippageRatio, BigNumber.ROUND_FLOOR),
receiver: accountPkh,
hops: mapToRoute3ExecuteHops(chains.xtzHops),
app_id: APP_ID
Expand All @@ -159,7 +157,7 @@ export const getSwapTransferParams = async (
const tzbtcSwapMethod = swapContract.methodsObject.execute({
token_in_id: THREE_ROUTE_TZBTC_TOKEN.id,
token_out_id: toRoute3Token.id,
min_out: tzbtcSwapMinOut,
min_out: multiplyAtomicAmount(tzbtcSwapOut, slippageRatio, BigNumber.ROUND_FLOOR),
receiver: accountPkh,
hops: mapToRoute3ExecuteHops(chains.tzbtcHops),
app_id: APP_ID
Expand Down

0 comments on commit 504eb76

Please sign in to comment.