Skip to content

Commit 4c8cdc6

Browse files
committed
fix(topic): separate topic memo from transaction memo
Signed-off-by: iron-prog <dt915725@gmail.com>
1 parent e8513a2 commit 4c8cdc6

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/hiero_sdk_python/consensus/topic_create_transaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(
6363
fee_exempt_keys (list[Key], optional): Optional list of fee exempt keys for the topic (PrivateKey or PublicKey).
6464
"""
6565
super().__init__()
66-
self.memo: str = memo or ""
66+
self.topic_memo: str = memo or ""
6767
self.admin_key: Key | None = admin_key
6868
self.submit_key: Key | None = submit_key
6969
self.auto_renew_period: Duration = auto_renew_period or Duration(7890000)
@@ -84,7 +84,7 @@ def set_memo(self, memo: str) -> TopicCreateTransaction:
8484
TopicCreateTransaction: The current instance for method chaining.
8585
"""
8686
self._require_not_frozen()
87-
self.memo = memo
87+
self.topic_memo = memo
8888
return self
8989

9090
def set_admin_key(self, key: Key) -> TopicCreateTransaction:
@@ -237,7 +237,7 @@ def _build_proto_body(self) -> consensus_create_topic_pb2.ConsensusCreateTopicTr
237237
submitKey=key_to_proto(self.submit_key),
238238
autoRenewPeriod=(self.auto_renew_period._to_proto() if self.auto_renew_period is not None else None),
239239
autoRenewAccount=(self.auto_renew_account._to_proto() if self.auto_renew_account is not None else None),
240-
memo=self.memo,
240+
memo=self.topic_memo,
241241
custom_fees=[custom_fee._to_topic_fee_proto() for custom_fee in self.custom_fees],
242242
fee_schedule_key=key_to_proto(self.fee_schedule_key),
243243
fee_exempt_key_list=[key_to_proto(key) for key in self.fee_exempt_keys],

src/hiero_sdk_python/consensus/topic_update_transaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
"""
5858
super().__init__()
5959
self.topic_id: TopicId | None = topic_id
60-
self.memo: str = memo or ""
60+
self.topic_memo: str = memo or ""
6161
self.admin_key: Key | None = admin_key
6262
self.submit_key: Key | None = submit_key
6363
self.auto_renew_period: Duration | None = auto_renew_period
@@ -93,7 +93,7 @@ def set_memo(self, memo: str) -> TopicUpdateTransaction:
9393
TopicUpdateTransaction: Returns the instance for method chaining.
9494
"""
9595
self._require_not_frozen()
96-
self.memo = memo
96+
self.topic_memo = memo
9797
return self
9898

9999
def set_admin_key(self, key: Key) -> TopicUpdateTransaction:
@@ -271,7 +271,7 @@ def _build_proto_body(self) -> consensus_update_topic_pb2.ConsensusUpdateTopicTr
271271
),
272272
autoRenewAccount=(self.auto_renew_account._to_proto() if self.auto_renew_account else None),
273273
expirationTime=self.expiration_time._to_protobuf() if self.expiration_time else None,
274-
memo=_wrappers_pb2.StringValue(value=self.memo) if self.memo is not None else None,
274+
memo=_wrappers_pb2.StringValue(value=self.topic_memo) if self.topic_memo is not None else None,
275275
custom_fees=custom_fees,
276276
fee_schedule_key=key_to_proto(self.fee_schedule_key) if self.fee_schedule_key else None,
277277
fee_exempt_key_list=fee_exempt_key_list,

0 commit comments

Comments
 (0)