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

@@ -3,7 +3,7 @@ from xrpl.clients import JsonRpcClient
from xrpl.models.amounts import IssuedCurrencyAmount
from xrpl.models.requests import AccountLines
from xrpl.models.transactions import Payment, PaymentFlag, TrustSet
from xrpl.transaction import autofill_and_sign, send_reliable_submission
from xrpl.transaction import submit_and_wait
from xrpl.wallet import generate_faucet_wallet
# References
@@ -30,8 +30,7 @@ trust_set_tx = TrustSet(
)
# Sign and autofill, then send transaction to the ledger
signed_trust_set_tx = autofill_and_sign(trust_set_tx, wallet2, client)
send_reliable_submission(signed_trust_set_tx, client)
signed_trust_set_tx = submit_and_wait(trust_set_tx, client, wallet2)
# Both balances should be zero since nothing has been sent yet
print("Balances after trustline is claimed:")
@@ -53,8 +52,7 @@ payment_tx = Payment(
)
# Sign and autofill, then send transaction to the ledger
signed_payment_tx = autofill_and_sign(payment_tx, wallet1, client)
payment_response = send_reliable_submission(signed_payment_tx, client)
payment_response = submit_and_wait(payment_tx, client, wallet1)
print("Initial Payment response: ", payment_response)
# Issuer (wallet1) should have -3840 FOO and destination (wallet2) should have 3840 FOO
@@ -90,8 +88,7 @@ partial_payment_tx = Payment(
)
# Sign and autofill, then send transaction to the ledger
signed_partial_payment_tx = autofill_and_sign(partial_payment_tx, wallet2, client)
partial_payment_response = send_reliable_submission(signed_partial_payment_tx, client)
partial_payment_response = submit_and_wait(partial_payment_tx, client, wallet2)
print("Partial Payment response: ", partial_payment_response)
# Tried sending 4000 of 3840 FOO -> wallet1 and wallet2 should have 0 FOO