Skip to content

Commit

Permalink
Try to fix missing key error reported in #14
Browse files Browse the repository at this point in the history
  • Loading branch information
emesik committed Jan 27, 2022
1 parent 414bbab commit f7ccfb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cardano/backends/walletrest/__init__.py
Expand Up @@ -166,7 +166,8 @@ def asset_balances(self, wid):
assets[aid] = assets[aid] if aid in assets else {}
assets[aid]["available"] = ast["quantity"]
return {
aid: Balance(bal["total"], bal["available"], None)
# NOTE: The get() below is due to suspected missing field reported in #14
aid: Balance(bal["total"], bal.get("available", Decimal(0)), None)
for aid, bal in assets.items()
}

Expand Down

0 comments on commit f7ccfb0

Please sign in to comment.