Browse Source

Merge #144: Don't calculate and display interest rate if profit is zero

c089063 Don't display interest rate if profit is zero (Kristaps Kaupe)
master
AdamISZ 8 years ago
parent
commit
562b78620a
No known key found for this signature in database
GPG Key ID: B3AE09F1E9A3197A
  1. 5
      jmclient/jmclient/wallet_utils.py

5
jmclient/jmclient/wallet_utils.py

@ -727,7 +727,10 @@ def wallet_fetch_history(wallet, options):
now = jm_single().bc_interface.rpc('getblock', [bestblockhash])['time']
print(' %s best block is %s' % (datetime.fromtimestamp(now)
.strftime("%Y-%m-%d %H:%M"), bestblockhash))
print('total profit = ' + str(float(balance - sum(deposits)) / float(100000000)) + ' BTC')
total_profit = float(balance - sum(deposits)) / float(100000000)
print('total profit = ' + str(total_profit) + ' BTC')
if abs(total_profit) > 0:
try:
# https://gist.github.com/chris-belcher/647da261ce718fc8ca10
import numpy as np

Loading…
Cancel
Save