send_reliable_submission -> submit_and_wait

This commit is contained in:
JST5000
2023-06-05 16:05:04 -07:00
parent 82a880580a
commit 676e75da16
32 changed files with 127 additions and 208 deletions

View File

@@ -1,7 +1,7 @@
from xrpl.clients import JsonRpcClient
from xrpl.models.transactions import AccountSet
from xrpl.transaction import safe_sign_and_autofill_transaction, send_reliable_submission
from xrpl.wallet import Wallet, generate_faucet_wallet
from xrpl.transaction import submit_and_wait
from xrpl.wallet import generate_faucet_wallet
# Connect to a testnet node
JSON_RPC_URL = "https://s.altnet.rippletest.net:51234/"
@@ -16,10 +16,8 @@ tx = AccountSet(
account=myAddr
)
# Sign the transaction locally
my_tx_payment_signed = safe_sign_and_autofill_transaction(transaction=tx, wallet=test_wallet, client=client)
# Submit transaction and verify its validity on the ledger
response = send_reliable_submission(transaction=my_tx_payment_signed, client=client)
response = submit_and_wait(transaction=tx, client=client, wallet=test_wallet)
result = response.result["meta"]["TransactionResult"]
print(f"Account: {myAddr}")