electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit b6e7dbe5f728bf520a81205f96d13d81f8820f9c
parent 65ff969d076fcb2c37652874e45e1406520a8a63
Author: ThomasV <thomasv@gitorious>
Date:   Thu,  6 Aug 2015 12:02:09 +0200

fix plot plugin

Diffstat:
Mplugins/plot.py | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/plugins/plot.py b/plugins/plot.py @@ -5,7 +5,7 @@ from electrum.i18n import _ import datetime from electrum.util import format_satoshis - +from electrum.bitcoin import COIN try: import matplotlib.pyplot as plt @@ -55,14 +55,12 @@ class Plugin(BasePlugin): counter_trans = 0 balance = 0 for item in history: - tx_hash, confirmations, value, timestamp = item - balance += value + tx_hash, confirmations, value, timestamp, balance = item if confirmations: if timestamp is not None: try: datenums.append(md.date2num(datetime.datetime.fromtimestamp(timestamp))) - balance_string = format_satoshis(balance, False) - balance_Val.append(float((format_satoshis(balance,False)))*1000.0) + balance_Val.append(1000.*balance/COIN) except [RuntimeError, TypeError, NameError] as reason: unknown_trans += 1 pass @@ -71,9 +69,7 @@ class Plugin(BasePlugin): else: pending_trans += 1 - value_string = format_satoshis(value, True) - value_val.append(float(value_string)*1000.0) - + value_val.append(1000.*value/COIN) if tx_hash: label, is_default_label = wallet.get_label(tx_hash) label = label.encode('utf-8')