Skip to content

Commit

Permalink
BugFix: ATC error message improvement (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin authored Apr 6, 2023
1 parent 40af2c9 commit 44db7b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions algosdk/atomic_transaction_composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,18 @@ def add_method_call(
# or encode a ABI value.
for i, arg in enumerate(method.args):
if abi.is_abi_transaction_type(arg.type):
if not isinstance(
method_args[i], TransactionWithSigner
) or not abi.check_abi_transaction_type(
if not isinstance(method_args[i], TransactionWithSigner):
raise error.AtomicTransactionComposerError(
"expected TransactionWithSigner as method argument, "
f"but received: {method_args[i]}"
)

if not abi.check_abi_transaction_type(
arg.type, method_args[i].txn
):
raise error.AtomicTransactionComposerError(
"expected TransactionWithSigner as method argument, but received: {}".format(
method_args[i]
)
f"expected Transaction type {arg.type} as method argument, "
f"but received: {method_args[i].txn.type}"
)
txn_list.append(method_args[i])
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def parse_string(text):
algod_port = 60000
kmd_port = 60001

DEV_ACCOUNT_INITIAL_MICROALGOS: int = 10_000_000
DEV_ACCOUNT_INITIAL_MICROALGOS: int = 100_000_000


def wait_for_algod_transaction_processing_to_complete():
Expand Down

0 comments on commit 44db7b2

Please sign in to comment.