@@ -680,6 +680,7 @@ def convert_operation(cls, operation_json: Dict[str, Any], type_: Optional[str]
680680 sender_json = operation_json .get ('sender' ) or {}
681681 target_json = operation_json .get ('target' ) or {}
682682 initiator_json = operation_json .get ('initiator' ) or {}
683+ delegate_json = operation_json .get ('delegate' ) or {}
683684 parameter_json = operation_json .get ('parameter' ) or {}
684685 originated_contract_json = operation_json .get ('originatedContract' ) or {}
685686
@@ -703,7 +704,7 @@ def convert_operation(cls, operation_json: Dict[str, Any], type_: Optional[str]
703704 sender_address = sender_json .get ('address' ),
704705 target_address = target_json .get ('address' ),
705706 initiator_address = initiator_json .get ('address' ),
706- amount = operation_json .get ('amount' ) or operation_json .get ('contractBalance' ),
707+ amount = operation_json .get ('amount' , operation_json .get ('contractBalance' ) ),
707708 status = operation_json ['status' ],
708709 has_internals = operation_json .get ('hasInternals' ),
709710 sender_alias = operation_json ['sender' ].get ('alias' ),
@@ -717,6 +718,8 @@ def convert_operation(cls, operation_json: Dict[str, Any], type_: Optional[str]
717718 originated_contract_code_hash = originated_contract_json .get ('codeHash' ),
718719 storage = operation_json .get ('storage' ),
719720 diffs = operation_json .get ('diffs' ) or (),
721+ delegate_address = delegate_json .get ('address' ),
722+ delegate_alias = delegate_json .get ('alias' ),
720723 )
721724
722725 @classmethod
0 commit comments