diff --git a/content/_code-samples/freeze/py/unfreeze_token.py b/content/_code-samples/freeze/py/unfreeze_token.py index 43f1ba0082..946e328f64 100644 --- a/content/_code-samples/freeze/py/unfreeze_token.py +++ b/content/_code-samples/freeze/py/unfreeze_token.py @@ -1,8 +1,7 @@ from xrpl.clients import JsonRpcClient -from xrpl.models import IssuedCurrencyAmount, TrustSet +from xrpl.models import IssuedCurrencyAmount, TrustSet, TrustSetFlag from xrpl.transaction import (safe_sign_and_autofill_transaction, send_reliable_submission) -from xrpl.models import TrustSetFlag from xrpl.wallet import generate_faucet_wallet client = JsonRpcClient("https://s.altnet.rippletest.net:51234") # connect to testnet @@ -43,9 +42,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}') -if stxn_result["meta"]["TransactionResult"] == "tecNoLineRedundant": +if stxn_result["meta"]["TransactionResult"] == "tecNO_LINE_REDUNDANT": 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(f"Transaction failed with {stxn_result['meta']['TransactionResult']}") print(stxn_result["hash"])