Skip to content

Commit 74052a9

Browse files
BobTheBuidlerpacrob
authored andcommitted
feat: optimize apply_abi_formatters_to_dict
1 parent 8a2f478 commit 74052a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web3/_utils/rpc_abi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ def apply_abi_formatters_to_dict(
218218
[abi_dict[field] for field in fields],
219219
[data[field] for field in fields],
220220
)
221-
formatted_dict = dict(zip(fields, formatted_values))
222-
return dict(data, **formatted_dict)
221+
formatted_dict = data.copy()
222+
formatted_dict.update(zip(fields, formatted_values))
223+
return formatted_dict
223224

224225

225226
@to_dict

0 commit comments

Comments
 (0)