Skip to content

Commit

Permalink
Merge branch 'release/v1.20.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
algojack committed Nov 10, 2022
2 parents 3b231ac + fd663c2 commit a411457
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Changelog
# v1.20.1

## What's Changed
### Bugfixes
* Bug-fix: Implement `TransactionRejectedError` by @jdtzmn in https://github.com/algorand/py-algorand-sdk/pull/396
* Decoding: Fix roundtrip encode/decode tests for transactions by @algochoi in https://github.com/algorand/py-algorand-sdk/pull/398

**Full Changelog**: https://github.com/algorand/py-algorand-sdk/compare/v1.20.0...v1.20.1

# v1.20.0

Expand Down
8 changes: 7 additions & 1 deletion algosdk/box_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ def __init__(self, app_index: int, name: bytes):

@staticmethod
def translate_box_reference(
ref: Tuple[int, Union[bytes, bytearray, str, int]],
ref: Union[
Tuple[int, Union[bytes, bytearray, str, int]], "BoxReference"
],
foreign_apps: List[int],
this_app_id: int,
) -> "BoxReference":
# Do not need to translate the references if they are already BoxReference type.
if isinstance(ref, BoxReference):
return ref

# Try checking reference id and name type.
ref_id, ref_name = ref[0], encoding.encode_as_bytes(ref[1])
if not isinstance(ref_id, int):
Expand Down
4 changes: 4 additions & 0 deletions algosdk/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ class ConfirmationTimeoutError(Exception):
pass


class TransactionRejectedError(Exception):
pass


class ABITypeError(Exception):
def __init__(self, msg):
super().__init__(msg)
Expand Down
8 changes: 4 additions & 4 deletions algosdk/future/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1519,8 +1519,8 @@ def dictify(self):
@staticmethod
def undictify(d):
return StateSchema(
num_uints=d["nui"] if "nui" in d else None,
num_byte_slices=d["nbs"] if "nbs" in d else None,
num_uints=d["nui"] if "nui" in d else 0,
num_byte_slices=d["nbs"] if "nbs" in d else 0,
)

def __eq__(self, other):
Expand Down Expand Up @@ -1628,13 +1628,13 @@ def __init__(
self, sender, sp, note, lease, constants.appcall_txn, rekey_to
)
self.index = self.creatable_index(index)
self.on_complete = on_complete
self.on_complete = on_complete if on_complete else 0
self.local_schema = self.state_schema(local_schema)
self.global_schema = self.state_schema(global_schema)
self.approval_program = self.teal_bytes(approval_program)
self.clear_program = self.teal_bytes(clear_program)
self.app_args = self.bytes_list(app_args)
self.accounts = accounts
self.accounts = accounts if accounts else None
self.foreign_apps = self.int_list(foreign_apps)
self.foreign_assets = self.int_list(foreign_assets)
self.extra_pages = extra_pages
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
description="Algorand SDK in Python",
author="Algorand",
author_email="[email protected]",
version="v1.20.0",
version="v1.20.1",
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
Expand Down

0 comments on commit a411457

Please sign in to comment.