From bb837e1d2da9b28a557d7fe70c80124087d8ce59 Mon Sep 17 00:00:00 2001 From: Obiajulu <47371105+ObiajuluM@users.noreply.github.com> Date: Sat, 5 Nov 2022 06:56:33 -0700 Subject: [PATCH] Update unfreeze_token.py --- content/_code-samples/freeze/py/unfreeze_token.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/_code-samples/freeze/py/unfreeze_token.py b/content/_code-samples/freeze/py/unfreeze_token.py index fb7bb42120..c850e90489 100644 --- a/content/_code-samples/freeze/py/unfreeze_token.py +++ b/content/_code-samples/freeze/py/unfreeze_token.py @@ -41,7 +41,9 @@ stxn_result = stxn_response.result # Print result and transaction hash if stxn_result["meta"]["TransactionResult"] == "tesSUCCESS": print(f'Successfully enabled no freeze for {sender_wallet.classic_address}') - print(stxn_result["hash"]) -else: +if stxn_result["meta"]["TransactionResult"] == "tecNoLineRedundant": + print("This was used on an account which didn't have a trustline yet. To try this out, modify `target_addr` to point to an account with a frozen trustline, and make sure the currency code matches.") +else: print(stxn_result["meta"]["TransactionResult"]) - print(stxn_result["hash"]) + +print(stxn_result["hash"])