Use dot to access attribute in NamedTuple

This should fix the crash in #1359
This commit is contained in:
Pan Long 2018-11-26 09:18:29 +08:00 committed by GitHub
parent 200484ab8b
commit 16eec078d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,8 +35,8 @@ class Wallets(object):
return 999.9
balance = self.wallets.get(currency)
if balance and balance['free']:
return balance['free']
if balance and balance.free:
return balance.free
else:
return 0