From ebdbc0bdeaaae7d3b0f8416f87838d62be2436ae Mon Sep 17 00:00:00 2001 From: SIARHEI PALISHCHUK Date: Mon, 14 Oct 2024 12:08:15 +0200 Subject: [PATCH] Repair if statment -> always False --- modules/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/client.py b/modules/client.py index a496870..5d5a222 100644 --- a/modules/client.py +++ b/modules/client.py @@ -462,7 +462,7 @@ async def prepare_transaction(self, value: int = 0) -> dict: max_priority_fee_per_gas = await self.get_priotiry_fee() max_fee_per_gas = int(base_fee + max_priority_fee_per_gas * 1.05 * GAS_PRICE_MULTIPLIER) - if self.network.name == ['Scroll', 'Optimism']: + if self.network.name in ['Scroll', 'Optimism']: max_fee_per_gas = int(max_fee_per_gas / GAS_PRICE_MULTIPLIER * 1.1) if max_priority_fee_per_gas > max_fee_per_gas: @@ -476,7 +476,7 @@ async def prepare_transaction(self, value: int = 0) -> dict: tx_params['gasPrice'] = self.w3.to_wei(round(random.uniform(1.4, 1.5), 1), 'gwei') else: gas_price = await self.w3.eth.gas_price - if self.network.name == ['Scroll', 'Optimism']: + if self.network.name in ['Scroll', 'Optimism']: gas_price = int(gas_price / GAS_PRICE_MULTIPLIER * 1.1) tx_params['gasPrice'] = int(gas_price * 1.2 * GAS_PRICE_MULTIPLIER)