Hide "dust" from /balance

This commit is contained in:
Matthias 2018-10-10 21:29:40 +02:00
parent bb057408b0
commit 792d2dbe32

View File

@ -307,11 +307,14 @@ class Telegram(RPC):
result = self._rpc_balance(self._config.get('fiat_display_currency', ''))
output = ''
for currency in result['currencies']:
output += "*{currency}:*\n" \
"\t`Available: {available: .8f}`\n" \
"\t`Balance: {balance: .8f}`\n" \
"\t`Pending: {pending: .8f}`\n" \
"\t`Est. BTC: {est_btc: .8f}`\n".format(**currency)
if currency['est_btc'] > 0.0001:
output += "*{currency}:*\n" \
"\t`Available: {available: .8f}`\n" \
"\t`Balance: {balance: .8f}`\n" \
"\t`Pending: {pending: .8f}`\n" \
"\t`Est. BTC: {est_btc: .8f}`\n".format(**currency)
else:
output += "*{currency}*: not showing <1$ amount \n".format(**currency)
output += "\n*Estimated Value*:\n" \
"\t`BTC: {total: .8f}`\n" \