Fix coins name collision (coins.py)

This commit is contained in:
jesopo 2019-01-23 08:22:08 +00:00
parent b456132318
commit c39f1e002f

View file

@ -60,12 +60,12 @@ class Module(ModuleManager.BaseModule):
user.set_setting("coins", self._coin_str(coins)) user.set_setting("coins", self._coin_str(coins))
def _all_coins(self, server): def _all_coins(self, server):
coins = server.get_all_user_settings("coins", []) all_coins = server.get_all_user_settings("coins", [])
for i, (nickname, coins) in enumerate(coins): for i, (nickname, coins) in enumerate(coins):
coins[i] = (nickname, decimal.Decimal(coins)) all_coins[i] = (nickname, decimal.Decimal(coins))
return dict(filter(lambda coin: coin[1], coins)) return dict(filter(lambda coin: coin[1], all_coins))
def _redeem_amount(self, server): def _redeem_amount(self, server):
return decimal.Decimal(server.get_setting("redeem-amount", return decimal.Decimal(server.get_setting("redeem-amount",