Skip to content

Commit

Permalink
refactor: use updated amount out
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Aug 26, 2024
1 parent ee8d61f commit 4c2c8a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/keeper-bots/src/providers/pancake-swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class PancakeSwapProvider extends SwapProvider {

return this.getBestTrade(tokenConverter, swapFrom, swapTo, (updatedAmountIn[1] * 75n) / 100n);
}
return [trade, amount];
return [trade, updatedAmountIn[0]];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/keeper-bots/src/providers/uniswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class UniswapProvider extends SwapProvider {
throw new Error("No trade found");
}

return [trade, amount];
return [trade, updatedAmountIn[0]];
}

/**
Expand Down

0 comments on commit 4c2c8a8

Please sign in to comment.