Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: improve SignedTransaction type signature for dryrun and send_transaction #457

Merged
merged 2 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion algosdk/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3233,7 +3233,7 @@ def wait_for_confirmation(

def create_dryrun(
client: algod.AlgodClient,
txns: List[Union[SignedTransaction, LogicSigTransaction]],
txns: List["GenericSignedTransaction"],
protocol_version=None,
latest_timestamp=None,
round=None,
Expand Down
4 changes: 2 additions & 2 deletions algosdk/v2client/algod.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ def status_after_block(
return self.algod_request("GET", req, **kwargs)

def send_transaction(
self, txn: "transaction.Transaction", **kwargs: Any
self, txn: "transaction.GenericSignedTransaction", **kwargs: Any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we still need the quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It failed CI the first time with a message about partially initialized module transaction, didnt dig deep but quoting fixed it

) -> str:
"""
Broadcast a signed transaction object to the network.

Args:
txn (SignedTransaction or MultisigTransaction): transaction to send
txn (SignedTransaction, LogicSigTransaction, or MultisigTransaction): transaction to send
request_header (dict, optional): additional header for request

Returns:
Expand Down