Skip to content

Commit

Permalink
fix: return the correct object keys for getUserOperationByHash
Browse files Browse the repository at this point in the history
  • Loading branch information
sherifahmed990 committed Dec 29, 2024
1 parent d237b0c commit 454b4ea
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions voltaire_bundler/user_operation/v7/user_operation_handler_v7.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,20 @@ async def get_user_operation_by_hash_rpc(
user_operation_json["factory"] = to_checksum_address(
user_operation_list[2][:20])
if len(user_operation_list[2]) > 20:
user_operation_json["factory_data"] = "0x" + user_operation_list[2][20:].hex()
user_operation_json["factoryData"] = (
"0x" + user_operation_list[2][20:].hex())
else:
user_operation_json["factory_data"] = "0x"
user_operation_json["factoryData"] = "0x"

if user_operation_list[7] != b'':
user_operation_json["paymaster"] = to_checksum_address(
user_operation_list[7][:20])
user_operation_json["paymaster_verification_gas_limit"] = hex(
user_operation_json["paymasterVerificationGasLimit"] = hex(
int(user_operation_list[7][20:36].hex(), 16))
user_operation_json["paymaster_post_op_gas_limit"] = hex(
user_operation_json["paymasterPostOpGasLimit"] = hex(
int(user_operation_list[7][36:52].hex(), 16))
user_operation_json["paymaster_data"] = "0x" + user_operation_list[7][52:].hex()
user_operation_json["paymasterData"] = (
"0x" + user_operation_list[7][52:].hex())

user_operation_by_hash_json = {
"userOperation": user_operation_json,
Expand Down

0 comments on commit 454b4ea

Please sign in to comment.