From 893e2514b65bddd8d2c3dd2c4626927f18e7f784 Mon Sep 17 00:00:00 2001 From: liquid-8 <72107640+liquid-8@users.noreply.github.com> Date: Thu, 1 Apr 2021 00:51:10 +0300 Subject: [PATCH] Update uniswap.py --- uniswap/uniswap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uniswap/uniswap.py b/uniswap/uniswap.py index d488083..b88dbc6 100644 --- a/uniswap/uniswap.py +++ b/uniswap/uniswap.py @@ -611,7 +611,7 @@ def _eth_to_token_swap_output( else: if recipient is None: recipient = self.address - eth_qty = self.get_eth_token_output_price(output_token, qty) + eth_qty = int((1 + self.max_slippage)*self.get_eth_token_output_price(output_token, qty)) return self._build_and_send_tx( self.router.functions.swapETHForExactTokens( qty,