1
0

use decimals in text mode

This commit is contained in:
ThomasV
2012-02-06 07:48:52 +01:00
parent 9d396e6a56
commit 69ab0aeb32
3 changed files with 26 additions and 21 deletions

View File

@@ -213,12 +213,22 @@ def raw_tx( inputs, outputs, for_sig = None ):
def format_satoshis(x, is_diff=False):
from decimal import Decimal
s = str( Decimal(x) /100000000 )
if is_diff and x>0:
s = "+" + s
if not '.' in s: s += '.'
p = s.find('.')
s += " "*( 9 - ( len(s) - p ))
s = " "*( 5 - ( p )) + s
return s
from version import ELECTRUM_VERSION, SEED_VERSION
class Wallet:
def __init__(self, interface):