From 8f1728efba4de87fdcaea8f4ec17951b295f7639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kudela?= <kudmich@syncad.com> Date: Thu, 9 Jan 2025 11:21:56 +0100 Subject: [PATCH] Create `SimpleTransactionLegacy` class --- package/test_tools/__private/wallet/constants.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/test_tools/__private/wallet/constants.py b/package/test_tools/__private/wallet/constants.py index 0e4e83a51..e5e5fabec 100644 --- a/package/test_tools/__private/wallet/constants.py +++ b/package/test_tools/__private/wallet/constants.py @@ -8,6 +8,7 @@ from schemas.fields.basic import AccountName, EmptyString, PrivateKey, PublicKey from schemas.fields.compound import HbdExchangeRate from schemas.fields.hive_datetime import HiveDateTime from schemas.operations.representations.hf26_representation import HF26Representation +from schemas.operations.representations.legacy_representation import LegacyRepresentation from schemas.transaction import Transaction if TYPE_CHECKING: @@ -62,6 +63,11 @@ class SimpleTransaction(Transaction): self.operations.append(HF26Representation(type=operation.get_name_with_suffix(), value=operation)) +class SimpleTransactionLegacy(Transaction): + def add_operation(self, operation: AnyOperation) -> None: + self.operations.append(LegacyRepresentation(type=operation.get_name(), value=operation)) + + class WalletResponseBase(SimpleTransaction): transaction_id: str -- GitLab