Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion async_substrate_interface/async_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ async def process_events(self):
# Process other events
possible_success = False
for event in await self.triggered_events:
# TODO make this more readable
# Check events
if (
event["event"]["module_id"] == "System"
Expand Down Expand Up @@ -378,7 +379,9 @@ async def process_events(self):
event["event"]["module_id"] == "Balances"
and event["event"]["event_id"] == "Deposit"
):
self.__total_fee_amount += event.value["attributes"]["amount"]
self.__total_fee_amount += event["event"]["attributes"][
"amount"
]
if possible_success is True and self.__error_message is None:
# we delay the positive setting of the __is_success flag until we have finished iteration of the
# events and have ensured nothing has set an error message
Expand Down
5 changes: 4 additions & 1 deletion async_substrate_interface/sync_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def process_events(self):
# Process other events
possible_success = False
for event in self.triggered_events:
# TODO make this more readable
# Check events
if (
event["event"]["module_id"] == "System"
Expand Down Expand Up @@ -331,7 +332,9 @@ def process_events(self):
event["event"]["module_id"] == "Balances"
and event["event"]["event_id"] == "Deposit"
):
self.__total_fee_amount += event.value["attributes"]["amount"]
self.__total_fee_amount += event["event"]["attributes"][
"amount"
]
if possible_success is True and self.__error_message is None:
# we delay the positive setting of the __is_success flag until we have finished iteration of the
# events and have ensured nothing has set an error message
Expand Down
Loading