mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-23 13:15:49 +00:00
clean up snippets
This commit is contained in:
@@ -35,7 +35,9 @@ send_reliable_submission(signed_trust_set_tx, client)
|
||||
|
||||
# Both balances should be zero since nothing has been sent yet
|
||||
print("Balances after trustline is claimed:")
|
||||
print("Balance of ${wallet1.classic_address} is:")
|
||||
print((client.request(AccountLines(account=wallet1.classic_address))).result["lines"])
|
||||
print("Balance of ${wallet2.classic_address} is:")
|
||||
print((client.request(AccountLines(account=wallet2.classic_address))).result["lines"])
|
||||
|
||||
# Create a Payment to send 3840 FOO from wallet1 (issuer) to destination (wallet2)
|
||||
@@ -53,11 +55,13 @@ 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)
|
||||
print(payment_response)
|
||||
print("Initial Payment response: ", payment_response)
|
||||
|
||||
# Issuer (wallet1) should have -3840 FOO and destination (wallet2) should have 3840 FOO
|
||||
print("Balances after wallet1 sends 3840 FOO to wallet2:")
|
||||
print("Balance of ${wallet1.classic_address} is:")
|
||||
print((client.request(AccountLines(account=wallet1.classic_address))).result["lines"])
|
||||
print("Balance of ${wallet2.classic_address} is:")
|
||||
print((client.request(AccountLines(account=wallet2.classic_address))).result["lines"])
|
||||
|
||||
# Send money less than the amount specified on 2 conditions:
|
||||
@@ -88,9 +92,11 @@ 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)
|
||||
print(partial_payment_response)
|
||||
print("Partial Payment response: ", partial_payment_response)
|
||||
|
||||
# Tried sending 4000 of 3840 FOO -> wallet1 and wallet2 should have 0 FOO
|
||||
print("Balances after Partial Payment, when wallet2 tried to send 4000 FOOs")
|
||||
print("Balance of ${wallet1.classic_address} is:")
|
||||
print((client.request(AccountLines(account=wallet1.classic_address))).result["lines"])
|
||||
print("Balance of ${wallet2.classic_address} is:")
|
||||
print((client.request(AccountLines(account=wallet2.classic_address))).result["lines"])
|
||||
|
||||
Reference in New Issue
Block a user