coins should be (nickname, coins) not just coins

This commit is contained in:
jesopo 2018-10-18 13:43:26 +01:00
parent 7f8acf58c7
commit ebdbc75a7e

View file

@ -85,7 +85,8 @@ class Module(ModuleManager.BaseModule):
coins = server.get_all_user_settings("wallets", [])
for i, (nickname, wallet) in enumerate(coins):
coins[i] = sum([decimal.Decimal(v) for v in wallet.values()])
user_coins = sum([decimal.Decimal(v) for v in wallet.values()])
coins[i] = (nickname, wallet)
coins = list(filter(lambda coin: decimal.Decimal(coin[1]), coins))
return dict([(coin[0], decimal.Decimal(coin[1])) for coin in coins])