Skip to content

Commit

Permalink
bug: combine_argument_formatters is deprecated
Browse files Browse the repository at this point in the history
Changed to apply_formatters_to_sequence
  • Loading branch information
fubuloubu authored and kclowes committed May 24, 2019
1 parent e5f8fc7 commit 609b465
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web3/middleware/pythonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import operator

from eth_utils.curried import (
combine_argument_formatters,
apply_formatters_to_sequence,
is_address,
is_bytes,
is_integer,
Expand Down Expand Up @@ -273,10 +273,10 @@ def to_hexbytes(num_bytes, val, variable_length=False):
)

estimate_gas_without_block_id = apply_formatter_at_index(transaction_param_formatter, 0)
estimate_gas_with_block_id = combine_argument_formatters(
estimate_gas_with_block_id = apply_formatters_to_sequence([
transaction_param_formatter,
block_number_formatter,
)
])


pythonic_middleware = construct_formatting_middleware(
Expand Down Expand Up @@ -304,10 +304,10 @@ def to_hexbytes(num_bytes, val, variable_length=False):
'eth_getUncleByBlockHashAndIndex': apply_formatter_at_index(integer_to_hex, 1),
'eth_newFilter': apply_formatter_at_index(filter_params_formatter, 0),
'eth_getLogs': apply_formatter_at_index(filter_params_formatter, 0),
'eth_call': combine_argument_formatters(
'eth_call': apply_formatters_to_sequence([
transaction_param_formatter,
block_number_formatter,
),
]),
'eth_estimateGas': apply_one_of_formatters((
(estimate_gas_without_block_id, is_length(1)),
(estimate_gas_with_block_id, is_length(2)),
Expand Down

0 comments on commit 609b465

Please sign in to comment.