Skip to content
Snippets Groups Projects
Commit 8f1728ef authored by Michał Kudela's avatar Michał Kudela
Browse files

Create `SimpleTransactionLegacy` class

parent b8634046
No related branches found
No related tags found
1 merge request!241Create `SimpleTransactionLegacy` class
Pipeline #116244 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment