Skip to content

Commit

Permalink
v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberomanov committed Feb 17, 2023
1 parent 82c2851 commit 7fdba21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions nym.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def nym():
telegram_response = telegram.send_log(head=message.head, body=message.body)
else:
logger.warning('something is not ok.')
telegram_response = telegram.send_log(head=message.head, body=message.body)
telegram_response = telegram.send_alarm(head=message.head, body=message.body)

if not telegram_response.ok:
Expand Down
6 changes: 5 additions & 1 deletion sdk/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def get_mixnode_uptime(self) -> Uptime:
return Uptime.parse_obj(self._get_mixnode_info(specific='uptime'))

def get_estimated_rewards(self) -> Rewards:
return Rewards.parse_obj(self._get_mixnode_info(specific='estimated_reward'))
response = self._get_mixnode_info(specific='estimated_reward')
try:
return Rewards.parse_obj(response)
except:
return Rewards(operator=0)

def get_owner_balance(self) -> Balance:
response = self.session.get(f"{self.explorer}/accounts/{self.owner}/balance")
Expand Down

0 comments on commit 7fdba21

Please sign in to comment.