Skip to content

Commit

Permalink
Fixes issue where wrong tx id was returned if order reused. (#456)
Browse files Browse the repository at this point in the history
* Fixes issue where wrong tx id was returned if order reused.

* Bump version: 1.0.11 → 1.0.12
  • Loading branch information
calina-c authored May 26, 2022
1 parent f432d23 commit 14a3f18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.11
current_version = 1.0.12
commit = True
tag = True

Expand Down
9 changes: 5 additions & 4 deletions ocean_provider/utils/datatoken.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ def verify_order_tx(
raise AssertionError("Failed to get tx receipt referenced in OrderReused..")
if tx_receipt.status == 0:
raise AssertionError("order referenced in OrderReused failed.")
else:
event_logs = datatoken_contract.events.OrderStarted().processReceipt(
tx_receipt, errors=DISCARD
)
order_log = event_logs[0] if event_logs else None

event_logs = datatoken_contract.events.OrderStarted().processReceipt(
tx_receipt, errors=DISCARD
)
order_log = event_logs[0] if event_logs else None
if not order_log:
raise AssertionError(
f"Cannot find the event for the order transaction with tx id {tx_id}."
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
url="https://github.com/oceanprotocol/provider-py",
# fmt: off
# bumpversion needs single quotes
version='1.0.11',
version='1.0.12',
# fmt: on
zip_safe=False,
)

0 comments on commit 14a3f18

Please sign in to comment.