Skip to content

Commit d845a3d

Browse files
authored
fix: correct response code check for token freeze verification (hiero-ledger#1688)
Signed-off-by: achahid19 <anasks1999@gmail.com> Signed-off-by: anas chahid ksabi <125438524+achahid19@users.noreply.github.com>
1 parent 21fcbcf commit d845a3d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
145145
- Replaced the docstring in `entity_id_helper.py` with one that is correct. (#1623)
146146

147147
### Changed
148+
- Update `verify_freeze()` to treat only ACCOUNT_FROZEN_FOR_TOKEN as a successful freeze verification (#1515)
148149
- Updated team.md with new triage, committers and maintainer (#1692)
149150
- Removed outdated "Common Issues" section from CONTRIBUTING.md that referenced non-existent docs/common_issues.md (`#1665`)
150151
- Hide the commit verification bot marker in pull request comments.

examples/tokens/token_freeze_transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def verify_freeze(token_id, client, operator_id, operator_key):
110110

111111
status_name = ResponseCode(transfer_receipt.status).name
112112

113-
if status_name in ["ACCOUNT_FROZEN_FOR_TOKEN", "ACCOUNT_FROZEN"]:
113+
if status_name == "ACCOUNT_FROZEN_FOR_TOKEN":
114114
print(
115115
f"✅ Verified: Transfer blocked as expected due to freeze. Status: {status_name}"
116116
)

0 commit comments

Comments
 (0)