mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
Optimize result's output
This commit is contained in:
@@ -24,8 +24,15 @@ tx = AccountSet(
|
||||
|
||||
# Sign the transaction locally & submit transaction and verify its validity on the ledger
|
||||
my_tx_payment_signed = safe_sign_and_submit_transaction(transaction=tx, wallet=wallet_from_seed, client=client)
|
||||
my_tx_payment_signed = my_tx_payment_signed.result
|
||||
|
||||
if my_tx_payment_signed.is_successful():
|
||||
result = my_tx_payment_signed["engine_result"]
|
||||
|
||||
if result == "tesSUCCESS":
|
||||
print("Transaction successful!")
|
||||
elif result == "tefMAX_LEDGER":
|
||||
print("Transaction failed to achieve consensus")
|
||||
elif result == "unknown":
|
||||
print("Transaction status unknown")
|
||||
else:
|
||||
print("Transaction failed")
|
||||
print(f"Transaction failed with code {result}")
|
||||
|
||||
Reference in New Issue
Block a user