Hide "dust" from /balance
This commit is contained in:
parent
bb057408b0
commit
792d2dbe32
@ -307,11 +307,14 @@ class Telegram(RPC):
|
|||||||
result = self._rpc_balance(self._config.get('fiat_display_currency', ''))
|
result = self._rpc_balance(self._config.get('fiat_display_currency', ''))
|
||||||
output = ''
|
output = ''
|
||||||
for currency in result['currencies']:
|
for currency in result['currencies']:
|
||||||
output += "*{currency}:*\n" \
|
if currency['est_btc'] > 0.0001:
|
||||||
"\t`Available: {available: .8f}`\n" \
|
output += "*{currency}:*\n" \
|
||||||
"\t`Balance: {balance: .8f}`\n" \
|
"\t`Available: {available: .8f}`\n" \
|
||||||
"\t`Pending: {pending: .8f}`\n" \
|
"\t`Balance: {balance: .8f}`\n" \
|
||||||
"\t`Est. BTC: {est_btc: .8f}`\n".format(**currency)
|
"\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" \
|
output += "\n*Estimated Value*:\n" \
|
||||||
"\t`BTC: {total: .8f}`\n" \
|
"\t`BTC: {total: .8f}`\n" \
|
||||||
|
Loading…
Reference in New Issue
Block a user