mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
Fixup
This commit is contained in:
@@ -2,6 +2,7 @@ from xrpl.clients import JsonRpcClient
|
|||||||
from xrpl.models.transactions import AccountSet
|
from xrpl.models.transactions import AccountSet
|
||||||
from xrpl.transaction import safe_sign_and_submit_transaction
|
from xrpl.transaction import safe_sign_and_submit_transaction
|
||||||
from xrpl.wallet import generate_faucet_wallet
|
from xrpl.wallet import generate_faucet_wallet
|
||||||
|
from xrpl.models.requests import AccountInfo
|
||||||
|
|
||||||
# Connect to a testnet node
|
# Connect to a testnet node
|
||||||
JSON_RPC_URL = "https://s.altnet.rippletest.net:51234/"
|
JSON_RPC_URL = "https://s.altnet.rippletest.net:51234/"
|
||||||
@@ -19,15 +20,18 @@ tx = AccountSet(
|
|||||||
|
|
||||||
# Sign the transaction locally and submit to a node
|
# Sign the transaction locally and submit to a node
|
||||||
my_tx_payment_signed = safe_sign_and_submit_transaction(tx, wallet=test_wallet, client=client)
|
my_tx_payment_signed = safe_sign_and_submit_transaction(tx, wallet=test_wallet, client=client)
|
||||||
my_tx_payment_signed = my_tx_payment_signed.result
|
my_tx_payment_signed = my_tx_payment_signed.result["engine_result"]
|
||||||
result = my_tx_payment_signed["engine_result"]
|
|
||||||
|
|
||||||
print(f"Account: {myAddr}")
|
print(f"Transaction result: {my_tx_payment_signed}")
|
||||||
if result == "tesSUCCESS":
|
|
||||||
print("AccountSet transaction successful, Destination Tag is now required for all incoming transactions")
|
# Verify Account Settings
|
||||||
elif result == "tefMAX_LEDGER":
|
get_acc_flag = AccountInfo(
|
||||||
print("Transaction failed to achieve consensus")
|
account=myAddr
|
||||||
elif result == "unknown":
|
)
|
||||||
print("Transaction status unknown")
|
|
||||||
|
response = client.request(get_acc_flag)
|
||||||
|
|
||||||
|
if response.result['account_data']['Flags'] == 131072:
|
||||||
|
print("Require Destination Tag is enabled.")
|
||||||
else:
|
else:
|
||||||
print(f"Transaction failed with code {result}")
|
print("Require Destination Tag is DISABLED.")
|
||||||
|
|||||||
Reference in New Issue
Block a user