Update param order for autofill_and_sign and sign_and_submit

This commit is contained in:
JST5000
2023-06-15 15:42:03 -07:00
parent 445b58bdd5
commit 968df9d379
12 changed files with 13 additions and 13 deletions

View File

@@ -131,7 +131,7 @@ class XRPLMonitorThread(Thread):
# send too many transactions too fast. You can send transactions more # send too many transactions too fast. You can send transactions more
# rapidly if you track the sequence number more carefully. # rapidly if you track the sequence number more carefully.
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign( tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
tx, self.wallet, self.client) tx, self.client, self.wallet)
await xrpl.asyncio.transaction.submit(tx_signed, self.client) await xrpl.asyncio.transaction.submit(tx_signed, self.client)
wx.CallAfter(self.gui.add_pending_tx, tx_signed) wx.CallAfter(self.gui.add_pending_tx, tx_signed)

View File

@@ -185,7 +185,7 @@ class XRPLMonitorThread(Thread):
# send too many transactions too fast. You can send transactions more # send too many transactions too fast. You can send transactions more
# rapidly if you track the sequence number more carefully. # rapidly if you track the sequence number more carefully.
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign( tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
tx, self.wallet, self.client) tx, self.client, self.wallet)
await xrpl.asyncio.transaction.submit(tx_signed, self.client) await xrpl.asyncio.transaction.submit(tx_signed, self.client)
wx.CallAfter(self.gui.add_pending_tx, tx_signed) wx.CallAfter(self.gui.add_pending_tx, tx_signed)

View File

@@ -203,7 +203,7 @@ class XRPLMonitorThread(Thread):
# send too many transactions too fast. You can send transactions more # send too many transactions too fast. You can send transactions more
# rapidly if you track the sequence number more carefully. # rapidly if you track the sequence number more carefully.
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign( tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
tx, self.wallet, self.client) tx, self.client, self.wallet)
await xrpl.asyncio.transaction.submit(tx_signed, self.client) await xrpl.asyncio.transaction.submit(tx_signed, self.client)
wx.CallAfter(self.gui.add_pending_tx, tx_signed) wx.CallAfter(self.gui.add_pending_tx, tx_signed)

View File

@@ -221,7 +221,7 @@ class XRPLMonitorThread(Thread):
# send too many transactions too fast. You can send transactions more # send too many transactions too fast. You can send transactions more
# rapidly if you track the sequence number more carefully. # rapidly if you track the sequence number more carefully.
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign( tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
tx, self.wallet, self.client) tx, self.client, self.wallet)
await xrpl.asyncio.transaction.submit(tx_signed, self.client) await xrpl.asyncio.transaction.submit(tx_signed, self.client)
wx.CallAfter(self.gui.add_pending_tx, tx_signed) wx.CallAfter(self.gui.add_pending_tx, tx_signed)

View File

@@ -33,7 +33,7 @@ signer_list_set_tx = SignerListSet(
signer_quorum=2, signer_quorum=2,
signer_entries=signer_entries, signer_entries=signer_entries,
) )
signed_signer_list_set_tx = autofill_and_sign(signer_list_set_tx, master_wallet, client) signed_signer_list_set_tx = autofill_and_sign(signer_list_set_tx, client, master_wallet)
print("Constructed SignerListSet and submitting it to the ledger...") print("Constructed SignerListSet and submitting it to the ledger...")
signed_list_set_tx_response = submit_and_wait( signed_list_set_tx_response = submit_and_wait(

View File

@@ -47,4 +47,4 @@ payment_tx = Payment(
paths=paths, paths=paths,
) )
print("signed: ", autofill_and_sign(payment_tx, wallet, client)) print("signed: ", autofill_and_sign(payment_tx, client, wallet))

View File

@@ -27,7 +27,7 @@ async def main() -> int:
) )
# Sign and autofill the transaction (ready to submit) # Sign and autofill the transaction (ready to submit)
signed_tx = await autofill_and_sign(tx, wallet, client) signed_tx = await autofill_and_sign(tx, client, wallet)
print("Transaction hash:", signed_tx.get_hash()) print("Transaction hash:", signed_tx.get_hash())
# Submit the transaction and wait for response (validated or rejected) # Submit the transaction and wait for response (validated or rejected)

View File

@@ -42,7 +42,7 @@ payment_tx = Payment(
# Sign the transaction # Sign the transaction
print("Submitting a payment transaction with our memo...") print("Submitting a payment transaction with our memo...")
payment_tx_signed = autofill_and_sign(payment_tx, wallet=test_wallet, client=client) payment_tx_signed = autofill_and_sign(payment_tx, client=client, wallet=test_wallet)
print(f"\n Encoded Transaction MEMO: {payment_tx_signed.memos}") print(f"\n Encoded Transaction MEMO: {payment_tx_signed.memos}")
# Send the transaction to the node # Send the transaction to the node

View File

@@ -26,7 +26,7 @@ print("Payment object:", my_payment)
# Sign transaction ------------------------------------------------------------- # Sign transaction -------------------------------------------------------------
signed_tx = xrpl.transaction.autofill_and_sign( signed_tx = xrpl.transaction.autofill_and_sign(
my_payment, test_wallet, client) my_payment, client, test_wallet)
max_ledger = signed_tx.last_ledger_sequence max_ledger = signed_tx.last_ledger_sequence
tx_id = signed_tx.get_hash() tx_id = signed_tx.get_hash()
print("Signed transaction:", signed_tx) print("Signed transaction:", signed_tx)

View File

@@ -170,7 +170,7 @@ async def main() -> int:
) )
# Sign and autofill the transaction (ready to submit) # Sign and autofill the transaction (ready to submit)
signed_tx = await autofill_and_sign(tx, wallet, client) signed_tx = await autofill_and_sign(tx, client, wallet)
print("Transaction:", signed_tx) print("Transaction:", signed_tx)
# Submit the transaction and wait for response (validated or rejected) # Submit the transaction and wait for response (validated or rejected)

View File

@@ -55,7 +55,7 @@ tx_set_signer_list = SignerListSet(
# Sign transaction locally and submit # Sign transaction locally and submit
print("Submitting a SignerListSet transaction to update our account to use our new Signers...") print("Submitting a SignerListSet transaction to update our account to use our new Signers...")
tx_set_signer_list_signed = sign_and_submit(transaction=tx_set_signer_list, wallet=test_wallet, client=client) tx_set_signer_list_signed = sign_and_submit(transaction=tx_set_signer_list, client=client, wallet=test_wallet)
# Construct a TicketCreate transaction, 3 tickets will be created # Construct a TicketCreate transaction, 3 tickets will be created
tx_create_ticket = TicketCreate( tx_create_ticket = TicketCreate(
@@ -65,7 +65,7 @@ tx_create_ticket = TicketCreate(
# Sign transaction locally and submit # Sign transaction locally and submit
print("Submitting a TicketCreate transaction to get Ticket Sequences for future transactions...") print("Submitting a TicketCreate transaction to get Ticket Sequences for future transactions...")
tx_create_ticket_signed = sign_and_submit(transaction=tx_create_ticket, wallet=test_wallet, client=client) tx_create_ticket_signed = sign_and_submit(transaction=tx_create_ticket, client=client, wallet=test_wallet)
# Get a Ticket Sequence # Get a Ticket Sequence
get_ticket_sequence = client.request(AccountObjects( get_ticket_sequence = client.request(AccountObjects(

View File

@@ -19,7 +19,7 @@ tx = TicketCreate(
) )
# Sign transaction locally and submit # Sign transaction locally and submit
my_tx_payment_signed = sign_and_submit(transaction=tx, wallet=test_wallet, client=client) my_tx_payment_signed = sign_and_submit(transaction=tx, client=client, wallet=test_wallet)
# Get a Ticket Sequence # Get a Ticket Sequence
get_ticket_sequence = AccountObjects( get_ticket_sequence = AccountObjects(