Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed May 27, 2021
1 parent 2a1371c commit 8674d94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion web3/_utils/module_testing/eth_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def test_gas_price_strategy_middleware(
def higher_gas_price_strategy(web3: "Web3", txn: TxParams) -> Wei:
return Wei(20)

await async_w3.async_eth.set_gas_price_strategy(higher_gas_price_strategy)
async_w3.async_eth.set_gas_price_strategy(higher_gas_price_strategy)

txn_hash = await async_w3.async_eth.send_transaction(txn_params)
txn = await async_w3.async_eth.get_transaction(txn_hash)
Expand Down
5 changes: 0 additions & 5 deletions web3/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ async def send_transaction(self, transaction: TxParams) -> HexBytes:
async def get_transaction(self, transaction_hash: _Hash32) -> TxData:
return await self._get_transaction(transaction_hash) # type: ignore

async def set_gas_price_strategy( # type: ignore
self, gas_price_strategy: GasPriceStrategy
) -> None:
self.gasPriceStrategy = gas_price_strategy # type: ignore

async def generate_gas_price(
self, transaction_params: Optional[TxParams] = None
) -> Optional[Wei]:
Expand Down
4 changes: 2 additions & 2 deletions web3/middleware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ async def async_combine_middlewares(
"""
accumulator_fn = provider_request_fn
for middleware in reversed(middlewares):
accumulator_fn = await apply_middleware(middleware, accumulator_fn, web3)
accumulator_fn = await construct_middleware(middleware, accumulator_fn, web3)
return accumulator_fn


async def apply_middleware(
async def construct_middleware(
middleware: Middleware,
fn: Callable[..., RPCResponse],
w3: 'Web3'
Expand Down

0 comments on commit 8674d94

Please sign in to comment.