diff --git a/golem/rpc/api/ethereum_.py b/golem/rpc/api/ethereum_.py index 9a4dff81f6..4c102a271b 100644 --- a/golem/rpc/api/ethereum_.py +++ b/golem/rpc/api/ethereum_.py @@ -143,8 +143,8 @@ def payment(wallet_operation_id: int) -> typing.Optional[dict]: 'task_id': o.task, 'subtask_id': o.subtask, 'charged_from_deposit': o.charged_from_deposit, - 'accepted_ts': str(o.accepted_ts) if o.accepted_ts else None, - 'settled_ts': str(o.settled_ts) if o.settled_ts else None, + 'accepted_ts': o.accepted_ts if o.accepted_ts else None, + 'settled_ts': o.settled_ts if o.settled_ts else None, 'missing_amount': str(o.missing_amount), 'created': common.datetime_to_timestamp_utc(o.created_date), 'modified': common.datetime_to_timestamp_utc(o.modified_date), diff --git a/tests/golem/rpc/api/test_ethereum.py b/tests/golem/rpc/api/test_ethereum.py index a1df3072b2..a482a4d8be 100644 --- a/tests/golem/rpc/api/test_ethereum.py +++ b/tests/golem/rpc/api/test_ethereum.py @@ -111,3 +111,24 @@ def test_wallet_operation(self): count, 1, ) + + def test_operation_type(self): + operation_types = model.WalletOperation.TYPE + _ = model_factory.WalletOperation( + operation_type=operation_types.deposit_transfer, + ) + + count0, _result0 = self.ets_provider.get_operations( + operation_type=operation_types.task_payment, + ) + self.assertEqual( + count0, + 0, + ) + count, _result = self.ets_provider.get_operations( + operation_type=operation_types.deposit_transfer, + ) + self.assertEqual( + count, + 1, + )